mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
44 lines
962 B
C#
44 lines
962 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Immutable;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BTCPayServer.Data
|
|
{
|
|
public class APIKeyData
|
|
{
|
|
[MaxLength(50)]
|
|
public string Id
|
|
{
|
|
get;
|
|
set;
|
|
}
|
|
|
|
[MaxLength(50)] public string StoreId { get; set; }
|
|
|
|
[MaxLength(50)] public string UserId { get; set; }
|
|
|
|
public APIKeyType Type { get; set; } = APIKeyType.Legacy;
|
|
|
|
public byte[] Blob { get; set; }
|
|
public StoreData StoreData { get; set; }
|
|
public ApplicationUser User { get; set; }
|
|
public string Label { get; set; }
|
|
}
|
|
|
|
public class APIKeyBlob
|
|
{
|
|
public string[] Permissions { get; set; }
|
|
|
|
}
|
|
|
|
public enum APIKeyType
|
|
{
|
|
Legacy,
|
|
Permanent
|
|
}
|
|
}
|