Merge branch 'feature-nxdev' of https://gitea.nxsir.cn/code/IM into feature-nxdev
This commit is contained in:
@@ -1,58 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace IM_API.Models;
|
||||
|
||||
[Table("admins")]
|
||||
[Index("RoleId", Name = "RoleId")]
|
||||
[MySqlCharSet("utf8mb4")]
|
||||
[MySqlCollation("utf8mb4_general_ci")]
|
||||
public partial class Admin
|
||||
{
|
||||
[Key]
|
||||
[Column("ID", TypeName = "int(11)")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
[StringLength(50)]
|
||||
public string Username { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 密码
|
||||
/// </summary>
|
||||
[StringLength(50)]
|
||||
public string Password { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 角色
|
||||
/// </summary>
|
||||
[Column(TypeName = "int(11)")]
|
||||
public int RoleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态(0:正常,2:封禁)
|
||||
/// </summary>
|
||||
[Column(TypeName = "tinyint(4)")]
|
||||
public sbyte State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Column(TypeName = "datetime")]
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[Column(TypeName = "datetime")]
|
||||
public DateTime Updated { get; set; }
|
||||
|
||||
[ForeignKey("RoleId")]
|
||||
[InverseProperty("Admins")]
|
||||
public virtual Role Role { get; set; } = null!;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user