using APT.BaseData.Domain.Entities.BD;
using APT.BaseData.Domain.Enums;
using APT.Infrastructure.Core;
using APT.Infrastructure.Utility;
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace APT.BaseData.Domain.Entities
{

    [Description("树形页面配置表")]
    [IgnoreT4]
    [Redis("PAGE_FORM_ID", "ID", "CODE")]
    [APT.Infrastructure.Api.RootOrg]
    public partial class T_PF_PAGE_TREE : MesEntityBase
    {
        public T_PF_PAGE_TREE()
        {
            this.BATCH_DEL_SEND_TYPE = (int)SendTypeEnum.POST;
            this.QUERY_SEND_TYPE = (int)SendTypeEnum.POST;
            this.FILTER_ORG_TYPE = 0;
        }
        /// <summary>编码</summary>
        public string CODE { get; set; }
        /// <summary>
        /// 窗体ID
        /// </summary>
        public Guid? PAGE_FORM_ID { get; set; }
        /// <summary>
        /// 数据库表名称
        /// </summary>
        /// <summary>
        /// 显示名称
        /// </summary>
        [Description("显示名称")]
        public string LABEL_NAME { get; set; }
        /// <summary>
        /// 数据库表名称
        /// </summary>
        /// <summary>
        /// 显示名称
        /// </summary>
        [Description("显示模式")]
        [EnumName("PFTreeShowModelEnum")]
        public int SHOW_MODEL { get; set; }
        /// <summary>
        /// 查询的API地址
        /// </summary>
        [Description("查询的API地址")]
        public string QUERY_API_URL { get; set; }
        /// <summary>
        /// 发送方式
        /// </summary>
        [Description("查询发送方式")]
        public int QUERY_SEND_TYPE { get; set; }
        /// <summary>
        /// 查询的API地址
        /// </summary>
        [Description("删除API地址")]
        public string BATCH_DEL_API_URL { get; set; }
        /// <summary>
        /// 发送方式
        /// </summary>
        [Description("删除发送方式")]
        public int BATCH_DEL_SEND_TYPE { get; set; }
        /// 顺序
        /// </summary>
        [Description("顺序")]
        public int NUM { get; set; }
        /// <summary>
        /// 排序字段
        /// </summary>
        [Description("排序字段")]
        public string SORT { get; set; }
        /// <summary>
        /// 排序方式
        /// </summary>
        [Description("排序方式 0 正序  1 倒序")]
        public int ORDER { get; set; }

        [Description("展开层级，默认0全展开")]
        public int LEVEL { get; set; }

        [Description("树选中节点过滤参数")]
        public string TREE_SELECTED_PARAM { get; set; }

        /// <summary>
        /// 关联字段 用于主从表时
        /// </summary>
        [Description("关联字段")]
        public string RELATION_FIELD { get; set; }

        [Description("是否多选")]
        public bool MULTI_CHECK { get; set; }

        [Description("最多选择个数")]
        public int MULTI_CHECK_COUNT { get; set; }

        [Description("允许新增节点")]
        public bool CAN_ADD_NODE { get; set; }


        /// <summary>
        /// 格式：FIELD,OP,VALUE,PICODE|FIELD,OP,VALUE,PICODE，（1）为空则显示默认的图片 （2）全局图片配置 ，，，C001|ORDER_STATUS,1,1,C002
        /// </summary>
        //[Description("图标")]
        //public string PICTURE_CODE { get; set; }

        [Description("节点可选条件")]
        public string SELECT_CONDITION { get; set; }

        /// <summary>自定义参数 参数名称=参数值  多个参数时以||分割</summary>
        public string CUSTOM_PARAMS { get; set; }

        /// <summary>
        /// 过滤组织类型
        /// </summary>
        [EnumName("PFFilterOrgTypeEnum")]
        public int? FILTER_ORG_TYPE { get; set; }

        /// <summary>
        /// 是否忽略组织权限
        /// </summary>
        public bool IGNORE_ORG_RULE { get; set; }

        /// <summary>
        /// 窗体
        /// </summary>
        public virtual T_PF_FORM Nav_PageForm { get; set; }

        /// <summary>
        /// 导航属性，字段列表
        /// </summary>
        [Description("导航属性:字段列表")]
        public virtual ICollection<T_PF_TREE_COLUMN> Nav_Columns { get; set; }

        [Description("源ID")]
        public Guid? SRC_ID { get; set; }

    }
}
