31 lines
641 B
C#
Raw Normal View History

2024-04-16 16:17:48 -05:00
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")]
2024-04-22 17:34:27 -05:00
public class AuditGrant : AuditModel<Grant>
2024-04-16 16:17:48 -05:00
{
[Column("name")]
[MaxLength(128)]
public string name { get; set; } = null!;
[Column("permissionId")]
public ulong permissionId { get; set; }
2024-04-22 17:34:27 -05:00
public override Grant adaptToModel()
{
return new Grant
{
2024-07-09 18:01:12 -05:00
id = originalId,
2024-04-22 17:34:27 -05:00
name = name,
permissionId = permissionId,
updated = updated,
updater = updater
};
}
2024-04-16 16:17:48 -05:00
}
}