banboshi_V1/halftoneproject-master/Models/User.cs

30 lines
772 B
C#
Raw Normal View History

2023-10-31 13:19:29 +08:00
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(User.Code), OrderByType.Asc, isUnique: true)]
public class User:BaseTable
{
[SugarColumn(Length =16)]
public string Code { get; set; }
public string Name { get; set; }
[SugarColumn(IsNullable = true)]
public string Password { get; set; }
public int RoleId { get; set; }
[Navigate(NavigateType.ManyToOne, nameof(RoleId))]
public Role RoleInfo { get; set; }
public bool State { get; set; } = true;
[SugarColumn(IsNullable = true)]
public string Note { get; set; }
}
}