banboshi_V1/halftoneproject-master/Models/Classes.cs
2023-10-31 13:19:29 +08:00

27 lines
860 B
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.

using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Models
{
[SugarIndex("index_{table}_Tag_Name", nameof(Classes.Tag), OrderByType.Asc, nameof(Classes.Name), OrderByType.Asc, isUnique: true)]
public class Classes : BaseTable
{
/// <summary>
/// 0-产品类别 10-缺陷类别
/// </summary>
public int Tag { get; set; }
public string Name { get; set; }
public int Order { get; set; }
/// <summary>
/// 父级Id
/// </summary>
public int Pid { get; set; } = 0;
[Navigate(NavigateType.OneToMany, nameof(Classes.Pid))]
public List<Classes> SubClassesList { get; set; }//注意禁止给books手动赋值,也不能new初始化否则导航查询不到
}
}