27 lines
572 B
C#
27 lines
572 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace DAL.Models.Audits
|
|
{
|
|
[Table("audit_permissions")]
|
|
[Index("id", Name = "audit_permissions_permissions_id_fk")]
|
|
public class AuditPermission : AuditModel<Permission>
|
|
{
|
|
[Column("name")]
|
|
[MaxLength(64)]
|
|
public string name { get; set; } = null!;
|
|
|
|
public override Permission adaptToModel()
|
|
{
|
|
return new Permission
|
|
{
|
|
id = originalId,
|
|
name = name,
|
|
updated = updated,
|
|
updater = updater
|
|
};
|
|
}
|
|
}
|
|
}
|