using APT.BaseData.Domain.ApiModel.Platform;
using System;
using System.Collections.Generic;
using System.Text;
namespace APT.BaseData.Domain.ApiModel.PF
{
    /// 
    /// 可编辑的Table的模型
    /// 
    public class EditListModel
    {
        /// 
        /// List(外):数据集合
        /// List(里):字段值集合
        /// 
        public List> data { get; set; }
        /// 
        /// table的列头定义
        /// 
        public List columns { get; set; }
    }
    /// 
    /// 单元格属性
    /// 
    public class DataValModel
    {
        /// 
        /// 字段名称
        /// 
        public string fieldName { get; set; }
        /// 
        /// 字段值
        /// 
        public string value { get; set; }
        /// 
        /// 列合并
        /// 
        public int colSpan { get; set; } = 1;
        /// 
        /// 行合并
        /// 
        public int rowSpan { get; set; } = 1;
        /// 
        /// PFControlTypeEnum  暂时只支持1 文本  7 数值文本
        /// 
        public int controlType { get; set; } = 1;
        /// 
        /// 单元格的背景颜色
        /// 
        public string backgroundColor { get; set; }
        /// 
        /// 单元格的字体颜色
        /// 
        public string fontColor { get; set; }
        /// 
        /// 是否不可编辑(默认可编辑)
        /// 
        public bool disabled { get; set; } = false;
        /// 
        /// 正则表达式
        /// 
        public string rule { get; set; }
        /// 
        /// 检验失败提示信息
        /// 
        public string errorMsg { get; set; }
    }
    /// 
    /// 可编辑表格列头部定义
    /// 
    public class Column
    {
        public Column(string dataTitle, string dataFieldName)
        {
            this.title = dataTitle;
            this.key = dataFieldName;
            this.dataIndex = dataFieldName;
            this.children = new List();
        }
        public Column()
        {
           // this.children = new List();
        }
        /// 
        /// 显示名称
        /// 
        public string title { get; set; }
        /// 
        /// 字段
        /// 
        public string key { get; set; }
        /// 
        /// 列宽度
        /// 
        public int width { get; set; }
        /// 
        /// 字段
        /// 
        public string dataIndex { get; set; }
        /// 
        /// 子集
        /// 
        public List children { get; set; }
    }
}