IM/backend/IM_API/Models/User.cs
nanxun d1db5e6490 后端:
完善注册页面
2026-03-15 22:27:34 +08:00

100 lines
3.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace IM_API.Models;
public partial class User
{
public int Id { get; set; }
/// <summary>
/// 唯一用户名
/// </summary>
public string Username { get; set; } = null!;
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; } = null!;
/// <summary>
/// 用户昵称
/// </summary>
public string? NickName { get; set; }
/// <summary>
/// 用户邮箱
/// </summary>
public string? Email { get; set; }
/// <summary>
/// 用户签名
/// </summary>
public string? Description { get; set; } = "";
/// <summary>
/// 地区
/// </summary>
public string? Region { get; set; } = "未知地区";
/// <summary>
/// 用户在线状态
/// 0默认不在线
/// 1在线
/// </summary>
public sbyte OnlineStatus { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTimeOffset Created { get; set; }
/// <summary>
/// 修改时间
/// </summary>
[Column(TypeName = "datetimeoffset")]
public DateTimeOffset? Updated { get; set; }
/// <summary>
/// 账户状态
/// (0未激活,1正常,2封禁)
/// </summary>
public sbyte Status { get; set; }
/// <summary>
/// 软删除标识
/// 0账号正常
/// 1账号已删除
/// </summary>
public sbyte IsDeleted { get; set; }
/// <summary>
/// 用户头像链接
/// </summary>
public string? Avatar { get; set; }
[JsonIgnore]
public virtual ICollection<Conversation> Conversations { get; set; } = new List<Conversation>();
[JsonIgnore]
public virtual ICollection<Device> Devices { get; set; } = new List<Device>();
[JsonIgnore]
public virtual ICollection<Friend> FriendFriendNavigations { get; set; } = new List<Friend>();
[JsonIgnore]
public virtual ICollection<FriendRequest> FriendRequestRequestUserNavigations { get; set; } = new List<FriendRequest>();
[JsonIgnore]
public virtual ICollection<FriendRequest> FriendRequestResponseUserNavigations { get; set; } = new List<FriendRequest>();
[JsonIgnore]
public virtual ICollection<Friend> FriendUsers { get; set; } = new List<Friend>();
[JsonIgnore]
public virtual ICollection<GroupMember> GroupMembers { get; set; } = new List<GroupMember>();
[JsonIgnore]
public virtual ICollection<GroupRequest> GroupRequests { get; set; } = new List<GroupRequest>();
[JsonIgnore]
public virtual ICollection<Group> Groups { get; set; } = new List<Group>();
[JsonIgnore]
public virtual ICollection<LoginLog> LoginLogs { get; set; } = new List<LoginLog>();
[JsonIgnore]
public virtual ICollection<Message> Messages { get; set; } = new List<Message>();
[JsonIgnore]
public virtual ICollection<Notification> Notifications { get; set; } = new List<Notification>();
}