
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using AyCode.Interfaces.Entities;
using AyCode.Interfaces.TimeStampInfo;

namespace TIAM.Entities.Permissions;

[Table("PermissionsTypes")]
public class PermissionsType : IEntityGuid, ITimeStampInfo
{
    [Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
    public Guid Id { get; set; }
    public Guid ContextId { get; set; }

    public string PermissionName { get; set; }
    public int PermissionBit { get; set; }

    public DateTime Created { get; set; }
    public DateTime Modified { get; set; }

    public PermissionsType(Guid contextId, string permissionName) : this(Guid.NewGuid(), contextId, permissionName) { }
    public PermissionsType(Guid id, Guid contextId, string permissionName)
    {
        Id = Guid.NewGuid();
        ContextId = contextId;
        PermissionName = permissionName;
    }
}