Files
F8WebAI/backend/AgriculturalPlatform.Api/Models/SysDict.cs
T

48 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace AgriculturalPlatform.Api.Models;
/// <summary>数据字典类型</summary>
public class SysDict
{
public int Id { get; set; }
/// <summary>字典名称(如:收购等级)</summary>
public string Name { get; set; } = string.Empty;
/// <summary>字典编码(如:purchase_grade / price_type / receipt_format / announcement_type</summary>
public string Code { get; set; } = string.Empty;
public string Remark { get; set; } = string.Empty;
/// <summary>系统内置字典不可删除</summary>
public bool IsSystem { get; set; }
public int Sort { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.Now;
public ICollection<SysDictItem> Items { get; set; } = new List<SysDictItem>();
}
/// <summary>数据字典项</summary>
public class SysDictItem
{
public int Id { get; set; }
public int DictId { get; set; }
/// <summary>显示名称(如:一等)</summary>
public string Label { get; set; } = string.Empty;
/// <summary>值(如:1</summary>
public string Value { get; set; } = string.Empty;
/// <summary>扩展属性(如等级对应基准价、票据格式的纸张描述等)</summary>
public string Ext { get; set; } = string.Empty;
public bool IsDefault { get; set; }
public bool Enabled { get; set; } = true;
public int Sort { get; set; }
}