using APT.Infrastructure.Core;
using APT.Infrastructure.Utility;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace APT.BaseData.Domain.Entities.OP
{
    [Description("租户表")]
    [Redis("ID","ID", "CODE")]
    public class T_OP_TENANT : MesEntityBase
    {

        [Description("租户名")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(50)]
        public string NAME { get; set; }
        [CUnique]
        [Description("租户编码")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(50)]
        public string CODE { get; set; }


        [Description("导航：域名列表")]
        public virtual ICollection<T_OP_TENANT_DOMAIN> Nav_Domains { get; set; }

        [Description("有效日期")]
        [FormFieldTable]
        [FormFieldEdit]
        public DateTime EXPIRATION_TIME { get; set; }

        [Description("备注")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(200)]
        public string REMARK { get; set; }

        [Description("授权租户菜单")]
        [DataFieldIngore]
        public List<string> CheckKeys { get; set; }

        [Description("启用标志")]
        [FormFieldTable]
        [FormFieldEdit]
        [EnumName("FMEnableStatusEnum")]

        public int ENABLE_STATUS { get; set; }

        [Description("数据库连接")]
        [DataFieldForeignKey("Nav_TenantDB")]
        [FormFieldEdit]
        public Guid? DB_CONN_ID { get; set; }
        public virtual T_OP_TENANT_DB_CONN Nav_TenantDB { get; set; }

        [Description("是否设置为模板租户")]
        [FormFieldTable]
        [FormFieldEdit]
        public bool IS_TEMPLATE { get; set; }

        [Description("模板ID")]
        [DataFieldForeignKey("Nav_Tenant")]
        [FormFieldEdit]
        public Guid? TEMPLATE_ID { get; set; }
        public virtual T_OP_TENANT Nav_Tenant { get; set; }
        [Description("管理员ID")]
        public Guid? USER_ID { get; set; }

        [Description("微信支付Key")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(50)]
        public string WXPAYKEY { get; set; }

        [Description("商户ID")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(50)]
        public string MCH_ID { get; set; }

        [Description("证书路径")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(100)]
        public string CERTPATH { get; set; }

        [Description("证书秘钥")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(100)]
        public string CERTPASSWORD { get; set; }

        [Description("项目类型")]
        [FormFieldTable]
        [FormFieldEdit]
        [EnumName("OPProjectTypeEnum")]
        public int PROJECT_TYPE { get; set; }
    }
}
