Files
RBMESAPICore/Models/SelfClass.cs
yuyubohh e8494ba988 qqq
2025-09-09 22:41:29 +08:00

72 lines
2.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RB_MES_API.Models
{
/// <summary>
/// 动态类配置
/// </summary>
public class SelfClass
{
/// <summary>
/// 主键
/// </summary>
[Key]
public int FID { get; set; }
/// <summary>
/// SelectJoinID的主键
/// </summary>
[DisplayName("字段名")]
public int FSID { get; set; }
/// <summary>
/// ForeignKey属性
/// </summary>
[DisplayName("外键")]
[StringLength(80)]
public string FForeignKey { get; set; } = string.Empty;
/// <summary>
/// Name属性
/// </summary>
[Required]
[DisplayName("字段名")]
[StringLength(80)]
public string FFieldName { get; set; }= string.Empty;
/// <summary>
/// DataType属性
/// </summary>
[Required]
[DisplayName("数据类型")]
[StringLength(80)]
public string FDbTypeName { get; set; }= string.Empty;
/// <summary>
/// DisplayName属性
/// </summary>
[DisplayName("显示名")]
[StringLength(80)]
public string FDisplayName { get; set; }= string.Empty;
/// <summary>
/// 是否需要必录校验当为必录时增加Required属性
/// </summary>
[DisplayName("是否必录控制")]
[DefaultValue(true)]
public bool FIsRequired { get; set; }
/// <summary>
/// 是否需要空值校验
/// </summary>
[DisplayName("允许为空")]
[DefaultValue(true)]
public bool FIsNull { get; set; }
/// <summary>
/// 根据字段来源不同,决定默认值的校验方式
/// </summary>
[DisplayName("默认值")]
public string FDefaultValue { get; set; }=string.Empty;
/// <summary>
/// 外键
/// </summary>
[ForeignKey("FSID")]
public SelectJoinID selectjoins { get; set; } = new SelectJoinID();
}
}