using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Atomx.Common.Entities
{
    [Table("Permissions")]
    public class Permission
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 权限名称 例如: "User.Read"
        /// </summary>
        [Column(TypeName = "varchar(128)")]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 权限点说明
        /// </summary>
        [Column(TypeName = "varchar(255)")]
        public string Description { get; set; } = string.Empty;

       /// <summary>
       /// 权限分类
       /// </summary>
        [Column(TypeName = "varchar(128)")]
        public string Category { get; set; } = string.Empty; // 权限分类
    }
}
