using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Models
{
    [SugarIndex("index_{table}_code", nameof(Role.Code), OrderByType.Asc, isUnique: true)]
    public class Role:BaseTable 
    {
        [SugarColumn(Length = 16)]
        public string Code { get; set; }
        public string Name { get; set; }

        [Navigate(typeof(RoleRightMap), nameof(RoleRightMap.RoleId), nameof(RoleRightMap.RightId))]//注意顺序
        public List<Right> RightList { get; set; }
    }
}
