namespace Admin.NET.Application
{
///
/// 表单输出Dto
///
public class FormDto
{
///
/// 无参构造函数
///
public FormDto()
{
}
///
/// 有参构造函数
///
///
public FormDto(FormDto formDto)
{
this.Id = formDto.Id;
this.Title = formDto.Title;
this.FormJson = formDto.FormJson;
this.Publish = formDto.Publish;
this.TypeId = formDto.TypeId;
this.TypeName = formDto.TypeName;
this.Version = formDto.Version;
this.CreatedUserName = formDto.CreatedUserName;
this.CreatedUserId = formDto.CreatedUserId;
this.CreatedTime = formDto.CreatedTime;
this.NodesList = formDto.NodesList;
}
///
/// 有参构造函数
///
///
///
///
///
///
///
///
///
///
///
///
public FormDto(long id, string title, string formjson, bool publish, long typeId, string typeName, int version, string createdUserName, long? createdUserId, DateTimeOffset? createdTime, FormList nodesList)
{
this.Id = id;
this.Title = title;
this.FormJson = formjson;
this.Publish = publish;
this.TypeId = typeId;
this.TypeName = typeName;
this.Version = version;
this.CreatedUserName = createdUserName;
this.CreatedUserId = createdUserId;
this.CreatedTime = createdTime;
this.NodesList = nodesList;
}
///
/// 主键
///
public long Id { get; set; }
///
///表单标题 不可重复
///
public string Title { get; set; }
///
/// form表单Json
///
public string FormJson { get; set; }
///
/// 是否发布
///
public bool Publish { get; set; }
///
/// 表单类型ID
///
public long TypeId { get; set; }
///
/// 表单类型名称
///
public string TypeName { get; set; }
///
/// 版本
///
public int Version { get; set; }
///
/// 创建人姓名
///
public string CreatedUserName { get; set; }
///
/// 创建人ID
///
public long? CreatedUserId { get; set; }
///
/// 创建时间
///
public DateTimeOffset? CreatedTime { get; set; }
///
/// 节点列表
///
public FormList NodesList { get; set; }
}
///
/// 表单列表
///
public class FormList
{
///
/// 节点列表
///
public List List { get; set; }
///
/// 配置
///
public FormConfig Config { get; set; }
}
///
/// 表单节点
///
public class FormNode
{
///
/// 类型
///
public string Type { get; set; }
///
/// 标题
///
public string Label { get; set; }
///
/// 属性设置
///
public FormOptions Options { get; set; }
///
///
///
public string Model { get; set; }
///
///
///
public string Key { get; set; }
///
/// 帮助
///
public string Help { get; set; }
///
/// 前缀
///
public string Prefix { get; set; }
///
/// 后缀
///
public string Suffix { get; set; }
///
/// 校验规则
///
public List Rules { get; set; }
}
///
/// 节点属性
///
public class FormOptions
{
///
/// 类型
///
public string Type { get; set; }
///
/// 宽度
///
public string Width { get; set; }
///
/// 默认值
///
public string DefaultValue { get; set; }
///
/// 帮助信息
///
public string Placeholder { get; set; }
///
///
///
public bool Clearable { get; set; }
///
///
///
public string MaxLength { get; set; }
///
/// 是否隐藏
///
public bool Hidden { get; set; }
///
/// 是否可用
///
public bool Disabled { get; set; }
}
///
/// 校验规则
///
public class FormRules
{
///
/// 是否必填
///
public bool Required { get; set; }
///
/// 信息
///
public string Message { get; set; }
}
///
/// 表单配置
///
public class FormConfig
{
///
///
///
public string Layout { get; set; }
///
///
///
public FormLabelCol LabelCol { get; set; }
///
///
///
public FormWrapperCol WrapperCol { get; set; }
///
///
///
public bool HideRequiredMark { get; set; }
///
///
///
public string CustomStyle { get; set; }
}
///
///
///
public class FormLabelCol
{
///
///
///
public int XS { get; set; }
///
///
///
public int SM { get; set; }
///
///
///
public int MD { get; set; }
///
///
///
public int LG { get; set; }
///
///
///
public int XL { get; set; }
///
///
///
public int XXL { get; set; }
}
///
///
///
public class FormWrapperCol
{
///
///
///
public int XS { get; set; }
///
///
///
public int SM { get; set; }
///
///
///
public int MD { get; set; }
///
///
///
public int LG { get; set; }
///
///
///
public int XL { get; set; }
///
///
///
public int XXL { get; set; }
}
}