30 lines
807 B
C#
30 lines
807 B
C#
|
|
using LMS.Common.Extensions;
|
|||
|
|
using System.ComponentModel.DataAnnotations;
|
|||
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|||
|
|
|
|||
|
|
namespace LMS.Repository.DB
|
|||
|
|
{
|
|||
|
|
public class MJApiTokens
|
|||
|
|
{
|
|||
|
|
[Key]
|
|||
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|||
|
|
public long Id { get; set; }
|
|||
|
|
|
|||
|
|
[Required]
|
|||
|
|
[StringLength(64)]
|
|||
|
|
public required string Token { get; set; }
|
|||
|
|
[Required]
|
|||
|
|
public required string UseToken { get; set; } // 实际使用的Token
|
|||
|
|
|
|||
|
|
public int DailyLimit { get; set; } = 0;
|
|||
|
|
|
|||
|
|
public int TotalLimit { get; set; } = 0;
|
|||
|
|
|
|||
|
|
public int ConcurrencyLimit { get; set; } = 1;
|
|||
|
|
|
|||
|
|
public DateTime CreatedAt { get; set; } = BeijingTimeExtension.GetBeijingTime();
|
|||
|
|
|
|||
|
|
public DateTime? ExpiresAt { get; set; }
|
|||
|
|
}
|
|||
|
|
}
|