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初始化，否则导航查询不到
    }
}
