Files
EBoard/电子展板/Models/MyConfig.cs
2025-09-26 17:42:33 +08:00

138 lines
4.9 KiB
C#

using Nancy.Swagger.Annotations.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Documents;
using .Base;
namespace .Models
{
/// <summary>
/// 配置类
/// </summary>
[Model("配置项")]
public class MyConfig : ModelBase
{
/// <summary>
/// 时间
/// </summary>
[Comment("时间")]
[ModelProperty(Description = "时间", Required = true)]
public string Time { get; set; }
/// <summary>
/// 时间字体大小
/// </summary>
[Comment("时间字体大小")]
[ModelProperty(Description = "时间字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int TimeSize { get; set; }
/// <summary>
/// 负责人
/// </summary>
[Comment("负责人")]
[ModelProperty(Description = "负责人", Required = true)]
public string Charger { get; set; }
/// <summary>
/// 负责人字体大小
/// </summary>
[Comment("负责人字体大小")]
[ModelProperty(Description = "负责人字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int ChargerSize { get; set; }
/// <summary>
/// 风险等级
/// </summary>
[Comment("风险等级")]
[ModelProperty(Description = "风险等级", Required = true)]
public string RiskLevel { get; set; }
/// <summary>
/// 风险等级字体大小
/// </summary>
[Comment("风险等级字体大小")]
[ModelProperty(Description = "风险等级字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int RiskLevelSize { get; set; }
/// <summary>
/// 工作内容
/// </summary>
[Comment("工作内容")]
[ModelProperty(Description = "工作内容", Required = true)]
public string Content { get; set; }
/// <summary>
/// 工作内容字体大小
/// </summary>
[Comment("工作内容字体大小")]
[ModelProperty(Description = "工作内容字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int ContentSize { get; set; }
/// <summary>
/// 危险点
/// </summary>
[Comment("危险点")]
[ModelProperty(Description = "危险点", Required = true)]
public string DangerPoint { get; set; }
/// <summary>
/// 危险点
/// </summary>
[Comment("危险点字体大小")]
[ModelProperty(Description = "危险点字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int DangerPointSize { get; set; }
/// <summary>
/// 重点措施
/// </summary>
[Comment("重点措施")]
[ModelProperty(Description = "重点措施", Required = true)]
public string Measures { get; set; }
[Comment("重点措施字体大小")]
[ModelProperty(Description = "重点措施字体大小", Required = true)]
public int MeasuresSize { get; set; }
[Comment("党员1图片路径")]
[ModelProperty(Description = "党员1图片路径", Required = true)]
public string CPCMember1Path { get; set; }
[Comment("党员1姓名")]
[ModelProperty(Description = "党员1姓名", Required = true)]
public string CPCMember1Name { get; set; }
[Comment("党员2图片路径")]
[ModelProperty(Description = "党员2图片路径", Required = true)]
public string CPCMember2Path { get; set; }
[Comment("党员2姓名")]
[ModelProperty(Description = "党员2姓名", Required = true)]
public string CPCMember2Name { get; set; }
[Comment("党员3图片路径")]
[ModelProperty(Description = "党员3图片路径", Required = true)]
public string CPCMember3Path { get; set; }
[Comment("党员3姓名")]
[ModelProperty(Description = "党员3姓名", Required = true)]
public string CPCMember3Name { get; set; }
[Comment("党员4图片路径")]
[ModelProperty(Description = "党员4图片路径", Required = true)]
public string CPCMember4Path { get; set; }
[Comment("党员4姓名")]
[ModelProperty(Description = "党员4姓名", Required = true)]
public string CPCMember4Name { get; set; }
[Comment("党员字体大小")]
[ModelProperty(Description = "党员字体大小", Required = true, Minimum = 15, Maximum = 60)]
public int CPCMemberSize { get; set; }
public List<UploadFiles> FileUploadList { get; set; }
}
public class CommentAttribute : Attribute
{
public string Comment { get; set; }
public CommentAttribute(string comment)
{
Comment = comment;
}
}
}