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; } /// /// 用户ID /// [Column(TypeName = "int(11)")] public int Userld { get; set; } /// /// 用户2ID /// [Column(TypeName = "int(11)")] public int Friendld { get; set; } /// /// 当前好友关系状态 /// (0:待通过,1:已添加,2:已拒绝,3:已拉黑) /// [Column(TypeName = "tinyint(4)")] public sbyte Status { get; set; } /// /// 好友关系创建时间 /// [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!; }