detect/detect.gui/Models/Entities/UserEntity.cs

26 lines
825 B
C#
Raw Normal View History

2024-11-13 17:09:15 +08:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace detect.gui.Models.Entities;
[Table("User")]
[Index(nameof(Username), IsUnique = true)]
public class UserEntity
{
[Key] public long? Id { get; set; }
[NotMapped] public List<AuthorityEntity>? AuthorityList { get; set; }
[StringLength(255), Comment("姓名")] public string? RealName { get; set; }
[StringLength(255), Comment("用户名")] public string? Username { get; set; }
[StringLength(255), Comment("密码")] public string? Password { get; set; }
[Comment("创建时间")] public DateTime? CreateTime { get; set; }
[Comment("更新时间")] public DateTime? UpdateTime { get; set; }
}