Merge pull request '更新 📘 接口响应 Code 设计文档.md' (#7) from test into main
Reviewed-on: code/Chat#7
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace IM_API.Models;
|
||||
|
||||
[Table("friends")]
|
||||
[Index("Id", Name = "ID")]
|
||||
[Index("Userld", "Friendld", Name = "Userld")]
|
||||
[Index("Friendld", Name = "用户2id")]
|
||||
[MySqlCharSet("utf8mb4")]
|
||||
[MySqlCollation("utf8mb4_general_ci")]
|
||||
public partial class Friend
|
||||
{
|
||||
[Key]
|
||||
[Column("ID", TypeName = "int(11)")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
[Column(TypeName = "int(11)")]
|
||||
public int Userld { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户2ID
|
||||
/// </summary>
|
||||
[Column(TypeName = "int(11)")]
|
||||
public int Friendld { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前好友关系状态
|
||||
/// (0:待通过,1:已添加,2:已拒绝,3:已拉黑)
|
||||
/// </summary>
|
||||
[Column(TypeName = "tinyint(4)")]
|
||||
public sbyte Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 好友关系创建时间
|
||||
/// </summary>
|
||||
[Column(TypeName = "datetime")]
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
[ForeignKey("Friendld")]
|
||||
[InverseProperty("FriendFriendldNavigations")]
|
||||
public virtual User FriendldNavigation { get; set; } = null!;
|
||||
|
||||
[ForeignKey("Userld")]
|
||||
[InverseProperty("FriendUserldNavigations")]
|
||||
public virtual User UserldNavigation { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user