Merge pull request '更新 📘 接口响应 Code 设计文档.md' (#7) from test into main
Reviewed-on: code/Chat#7
This commit is contained in:
@@ -0,0 +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("roles")]
|
||||
[MySqlCharSet("utf8mb4")]
|
||||
[MySqlCollation("utf8mb4_general_ci")]
|
||||
public partial class Role
|
||||
{
|
||||
[Key]
|
||||
[Column("ID", TypeName = "int(11)")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色名称
|
||||
/// </summary>
|
||||
[StringLength(20)]
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 角色描述
|
||||
/// </summary>
|
||||
[Column(TypeName = "text")]
|
||||
public string Description { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Column(TypeName = "datetime")]
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
[InverseProperty("Role")]
|
||||
public virtual ICollection<Admin> Admins { get; set; } = new List<Admin>();
|
||||
|
||||
[InverseProperty("RoleldNavigation")]
|
||||
public virtual ICollection<Permissionarole> Permissionaroles { get; set; } = new List<Permissionarole>();
|
||||
}
|
||||
Reference in New Issue
Block a user