Merge pull request '更新 📘 接口响应 Code 设计文档.md' (#7) from test into main
Reviewed-on: code/Chat#7
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace IM_API.Models;
|
||||
|
||||
[Table("users")]
|
||||
[Index("Id", Name = "ID")]
|
||||
[Index("Username", Name = "Username", IsUnique = true)]
|
||||
[MySqlCharSet("utf8mb4")]
|
||||
[MySqlCollation("utf8mb4_general_ci")]
|
||||
public partial class User
|
||||
{
|
||||
[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>
|
||||
[StringLength(50)]
|
||||
public string NickName { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// 用户在线状态
|
||||
/// 0(默认):不在线
|
||||
/// 1:在线
|
||||
/// </summary>
|
||||
[Column(TypeName = "tinyint(4)")]
|
||||
public sbyte OlineStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[Column(TypeName = "datetime")]
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
[Column(TypeName = "datetime")]
|
||||
public DateTime? Updated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 账户状态
|
||||
/// (0:未激活,1:正常,2:封禁)
|
||||
/// </summary>
|
||||
[Column(TypeName = "tinyint(4)")]
|
||||
public sbyte Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 软删除标识
|
||||
/// 0:账号正常
|
||||
/// 1:账号已删除
|
||||
/// </summary>
|
||||
[Column(TypeName = "tinyint(4)")]
|
||||
public sbyte IsDeleted { get; set; }
|
||||
|
||||
[InverseProperty("User")]
|
||||
public virtual ICollection<Conversation> Conversations { get; set; } = new List<Conversation>();
|
||||
|
||||
[InverseProperty("User")]
|
||||
public virtual ICollection<Device> Devices { get; set; } = new List<Device>();
|
||||
|
||||
[InverseProperty("FriendldNavigation")]
|
||||
public virtual ICollection<Friend> FriendFriendldNavigations { get; set; } = new List<Friend>();
|
||||
|
||||
[InverseProperty("UserldNavigation")]
|
||||
public virtual ICollection<Friend> FriendUserldNavigations { get; set; } = new List<Friend>();
|
||||
|
||||
[InverseProperty("RequestUserNavigation")]
|
||||
public virtual ICollection<Friendrequest> FriendrequestRequestUserNavigations { get; set; } = new List<Friendrequest>();
|
||||
|
||||
[InverseProperty("ResponseUserNavigation")]
|
||||
public virtual ICollection<Friendrequest> FriendrequestResponseUserNavigations { get; set; } = new List<Friendrequest>();
|
||||
|
||||
[InverseProperty("InviteUserNavigation")]
|
||||
public virtual ICollection<Groupinvite> GroupinviteInviteUserNavigations { get; set; } = new List<Groupinvite>();
|
||||
|
||||
[InverseProperty("InvitedUserNavigation")]
|
||||
public virtual ICollection<Groupinvite> GroupinviteInvitedUserNavigations { get; set; } = new List<Groupinvite>();
|
||||
|
||||
[InverseProperty("GroupldNavigation")]
|
||||
public virtual ICollection<Groupmember> GroupmemberGroupldNavigations { get; set; } = new List<Groupmember>();
|
||||
|
||||
[InverseProperty("UserldNavigation")]
|
||||
public virtual ICollection<Groupmember> GroupmemberUserldNavigations { get; set; } = new List<Groupmember>();
|
||||
|
||||
[InverseProperty("GroupNavigation")]
|
||||
public virtual ICollection<Grouprequest> Grouprequests { get; set; } = new List<Grouprequest>();
|
||||
|
||||
[InverseProperty("GroupMasterNavigation")]
|
||||
public virtual ICollection<Group> Groups { get; set; } = new List<Group>();
|
||||
|
||||
[InverseProperty("UserldNavigation")]
|
||||
public virtual ICollection<LoginLog> LoginLogs { get; set; } = new List<LoginLog>();
|
||||
|
||||
[InverseProperty("SenderNavigation")]
|
||||
public virtual ICollection<Message> Messages { get; set; } = new List<Message>();
|
||||
|
||||
[InverseProperty("UserldNavigation")]
|
||||
public virtual ICollection<Notification> Notifications { get; set; } = new List<Notification>();
|
||||
}
|
||||
Reference in New Issue
Block a user