using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; namespace IM_API.Models; [Table("groupmember")] [Index("Groupld", Name = "Groupld")] [Index("Id", Name = "ID")] [Index("Userld", Name = "Userld")] [MySqlCharSet("utf8mb4")] [MySqlCollation("utf8mb4_general_ci")] public partial class Groupmember { [Key] [Column("ID", TypeName = "int(11)")] public int Id { get; set; } /// /// 用户编号 /// [Column(TypeName = "int(11)")] public int Userld { get; set; } /// /// 群聊编号 /// [Column(TypeName = "int(11)")] public int Groupld { get; set; } /// /// 成员角色(0:普通成员,1:管理员,2:群主) /// [Column(TypeName = "tinyint(4)")] public sbyte Role { get; set; } /// /// 加入群聊时间 /// [Column(TypeName = "datetime")] public DateTime Created { get; set; } [ForeignKey("Groupld")] [InverseProperty("GroupmemberGroupldNavigations")] public virtual User GroupldNavigation { get; set; } = null!; [ForeignKey("Userld")] [InverseProperty("GroupmemberUserldNavigations")] public virtual User UserldNavigation { get; set; } = null!; }