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

namespace MadRunFabric.Model
{
    public class Sys_ModuleButton_Info : 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 moudle_id { get; set; }

        /// <summary>
        /// 父级节点ID
        /// </summary>
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string parent_id { get; set; }

        /// <summary>
        /// 层次
        /// </summary>
        public int? layers { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string encode { get; set; }

        /// <summary>
        /// 全名
        /// </summary>
        public string full_name { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        public string icon { get; set; }

        /// <summary>
        /// 位置
        /// </summary>
        public int? location { get; set; }

        /// <summary>
        /// 前端JS事件名称
        /// </summary>
        public string jsevent { get; set; }

        /// <summary>
        /// 后端地址
        /// </summary>
        public string url_address { get; set; }

        /// <summary>
        /// 分隔符
        /// </summary>
        public bool? split { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int sort { get; set; } = 0;

        /// <summary>
        /// 功能状态－（0：不可以用；1：可用 2：表示删除）
        /// </summary>
        public int state_flag { get; set; } = 1;

        /// <summary>
        /// 备注
        /// </summary>
        public string remark { get; set; }

        private DateTime _create_time;
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime create_time
        {
            set { _create_time = value.ToLocalTime(); }
            get { return _create_time.ToLocalTime(); }
        }

        private DateTime _lastmodify_time;
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime lastmodify_time
        {
            set { _lastmodify_time = value.ToLocalTime(); }
            get { return _lastmodify_time.ToLocalTime(); }
        }

        private DateTime _delete_time;
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime delete_time
        {
            set { _delete_time = value.ToLocalTime(); }
            get { return _delete_time.ToLocalTime(); }
        }
        /// <summary>
        /// 创建人
        /// </summary>
        public string create_uid { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string lastmodify_uid { get; set; }

        /// <summary>
        /// 删除人
        /// </summary>
        public string delete_uid { get; set; }



    }
}
