Table of Contents

Class IndependentExtraProperty

Namespace
CMS.Plugin.MesSuite.Abstractions.Models
Assembly
CMS.Plugin.MesSuite.Abstractions.dll

扩展属性,对应单独的表的一列,可支持字段搜索.

public class IndependentExtraProperty : ExtraProperty, IHasExtraProperties, IValidatableObject
Inheritance
IndependentExtraProperty
Implements
IHasExtraProperties
Inherited Members

Properties

DbType

数据库字段类型(目前支持Byte,String).

public DbType DbType { get; set; }

Property Value

DbType

DefaultValue

默认值.

public string DefaultValue { get; set; }

Property Value

string

IsNullable

是否可null.

public bool IsNullable { get; set; }

Property Value

bool

Length

类型长度.

public int Length { get; set; }

Property Value

int

ManualMigrationFunc

自定义该字段EF迁移.可包含字段脚本,索引脚本等 为null则LMES自动生成迁移脚本.可以处理单纯的字段迁移,不生成高级功能(如索引,外键等). 传入参数为表名. 例子:ManualMigrationFunc = (tableName) => $"ALTER TABLE {tableName} ADD COLUMN InspectionType smallint DEFAULT 0".

public Func<string, string> ManualMigrationFunc { get; set; }

Property Value

Func<string, string>

MigrationId

该字段的EF迁移唯一标识 必填 例子:20240802093803_AddInspectionType(AddInspectionType代表迁移的目的).

public string MigrationId { get; set; }

Property Value

string