29 lines
No EOL
838 B
C#
29 lines
No EOL
838 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using IdentityShroud.Core.Contracts;
|
|
using IdentityShroud.Core.Security;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace IdentityShroud.Core.Model;
|
|
|
|
[Table("client_secret")]
|
|
public class ClientSecret
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
public Guid ClientId { get; set; }
|
|
public DateTime CreatedAt { get; set; }
|
|
public DateTime? RevokedAt { get; set; }
|
|
public EncryptedValue? Secret { get; set; }
|
|
}
|
|
|
|
public class ClientSecretConfiguration : IEntityTypeConfiguration<ClientSecret>
|
|
{
|
|
public void Configure(EntityTypeBuilder<ClientSecret> b)
|
|
{
|
|
b.ToTable("client_secret");
|
|
b.HasKey(e => e.Id);
|
|
b.ComplexProperty(e => e.Secret);
|
|
}
|
|
} |