using JNPF.Common.Extension; using JNPF.DependencyInjection; namespace JNPF.Systems.Entitys.Model.DataBase; /// /// 数据表字段模型. /// [SuppressSniffer] public class DbTableFieldModel { /// /// 字段名. /// public string field { get; set; } /// /// 小写字段名称. /// public string LowerTableName => string.IsNullOrWhiteSpace(field) ? null : field.ReplaceRegex("^f_", string.Empty).ParseToPascalCase().ToLowerCase(); /// /// 字段说明. /// public string fieldName { get; set; } /// /// 数据类型. /// public string dataType { get; set; } /// /// 数据长度. /// public string dataLength { get; set; } /// /// 自增. /// public bool identity { get; set; } /// /// 主键. /// public bool primaryKey { get; set; } /// /// 允许null值. /// public int? allowNull { get; set; } /// /// 默认值. /// public string defaults { get; set; } /// /// 说明. /// public string description { get { return this.field + "(" + this.fieldName + ")"; } } }