using MadRunFabric.Common;
using MongoDB.Bson.Serialization.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace MadRunFabric.Model
{ 
    public class Sys_Role_Function : IBaseModel<string>
    {
        /// <summary>
        /// id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }

        /// <summary>
        /// 角色id外键
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string role_id { get; set; }

        /// <summary>
        /// Role分类1-角色2-部门-3用户
        /// </summary>
        public int role_type { get; set; } = 1;

        /// <summary>
        /// 类型1-模块2-按钮
        /// </summary>
        public int function_type { get; set; } = 1;

        /// <summary>
        /// 功能id外键
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string function_id { get; set; }
    }
}
