namespace AgriculturalPlatform.Api.Models;
/// 数据字典类型
public class SysDict
{
public int Id { get; set; }
/// 字典名称(如:收购等级)
public string Name { get; set; } = string.Empty;
/// 字典编码(如:purchase_grade / price_type / receipt_format / announcement_type)
public string Code { get; set; } = string.Empty;
public string Remark { get; set; } = string.Empty;
/// 系统内置字典不可删除
public bool IsSystem { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.Now;
public ICollection Items { get; set; } = new List();
}
/// 数据字典项
public class SysDictItem
{
public int Id { get; set; }
public int DictId { get; set; }
/// 显示名称(如:一等)
public string Label { get; set; } = string.Empty;
/// 值(如:1)
public string Value { get; set; } = string.Empty;
/// 扩展属性(如等级对应基准价、票据格式的纸张描述等)
public string Ext { get; set; } = string.Empty;
public bool IsDefault { get; set; }
public bool Enabled { get; set; } = true;
public int Sort { get; set; }
}