using System.ComponentModel.DataAnnotations; namespace MiGu.Server.SimpleFields; public sealed class SimpleField { public Guid Id { get; set; } = Guid.NewGuid(); /// 车型唯一标识:assemblyName.shortName,如 StandardScene.QrLidar.Forklift。 [MaxLength(64)] public string CarType { get; set; } = ""; /// /// 字段类型唯一标识:assemblyName.shortName,如 StandardScene.QrLidar.Forklift。 /// [MaxLength(64)] public string FieldType { get; set; } = ""; /// /// 字段唯一标识:key,如 Forklift.PositionX。 /// [MaxLength(128)] public string Key { get; set; } = ""; /// /// 字段值,如 10.0。 /// public string Value { get; set; } = ""; /// /// 数据类型,如 System.String。 /// [MaxLength(128)] public string DataType { get; set; } = ""; /// /// 中文名称,如 位置 X。 /// [MaxLength(256)] public string? Chinese { get; set; } /// /// 英文名称,如 Position X。 /// [MaxLength(256)] public string? English { get; set; } /// /// 其他语言名称,如 位置 X。 /// [MaxLength(512)] public string Other { get; set; } = ""; /// /// 是否内置默认字段,如 true。 /// public bool IsDefault { get; set; } /// /// 创建时间,如 2021-01-01 12:00:00。 /// public DateTimeOffset CreateTime { get; set; } /// /// 更新时间,如 2021-01-01 12:00:00。 /// public DateTimeOffset UpdateTime { get; set; } } public sealed record SimpleFieldRequest( Guid? Id, string CarType, string FieldType, string Key, string? Value, string? DataType, string? Chinese, string? English, string? Other, bool IsDefault); public sealed record SimpleFieldBatchRequest( bool ReplaceAll, List Items);