31 lines
641 B
C#
31 lines
641 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace DAL.Models.Audits
|
|
{
|
|
[Table("audit_grants")]
|
|
[Index("id", Name = "audit_grants_grants_id_fk")]
|
|
public class AuditGrant : AuditModel<Grant>
|
|
{
|
|
[Column("name")]
|
|
[MaxLength(128)]
|
|
public string name { get; set; } = null!;
|
|
|
|
[Column("permissionId")]
|
|
public ulong permissionId { get; set; }
|
|
|
|
public override Grant adaptToModel()
|
|
{
|
|
return new Grant
|
|
{
|
|
id = originalId,
|
|
name = name,
|
|
permissionId = permissionId,
|
|
updated = updated,
|
|
updater = updater
|
|
};
|
|
}
|
|
}
|
|
}
|