38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace FutureMailAPI.Models
|
|
{
|
|
public class OAuthClient
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
[MaxLength(100)]
|
|
public string ClientId { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[MaxLength(255)]
|
|
public string ClientSecret { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[MaxLength(100)]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string RedirectUris { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
public string Scopes { get; set; } = string.Empty;
|
|
|
|
public bool IsActive { get; set; } = true;
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
// 导航属性
|
|
public virtual ICollection<OAuthToken> Tokens { get; set; } = new List<OAuthToken>();
|
|
}
|
|
} |