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