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

namespace MadRunFabric.Model
{
    public class Sys_AppModule_Info : IBaseModel<string>
    {
        /// <summary>
        /// 自增id
        /// </summary>
        [Key]
        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
        public string id { get; set; }
        
        /// <summary>
        /// App功能模块名称
        /// </summary>
        public string module_name { get; set; }

        /// <summary>
        /// App功能模块编码
        /// </summary>
        public string module_code { get; set; }

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

        /// <summary>
        /// 本节点常规顺序号（如：1、2、3）
        /// </summary>
        public int sort { get; set; }

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



        /// <summary>
        /// 图标路径
        /// </summary>
        ///     /// <summary>
        /// 系统图片
        /// </summary>
        public List<FileBaseModel> img_url { get; set; }

        /// <summary>
        /// 此字段 前端显示为type 1表示APP 2表示微信
        /// </summary>
        public int ismenu { get; set; } = 1;



        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; }

    }
}