53 lines
1.4 KiB
C#
53 lines
1.4 KiB
C#
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; }
|
|
|
|
/// <summary>
|
|
/// 用户编号
|
|
/// </summary>
|
|
[Column(TypeName = "int(11)")]
|
|
public int Userld { get; set; }
|
|
|
|
/// <summary>
|
|
/// 群聊编号
|
|
/// </summary>
|
|
[Column(TypeName = "int(11)")]
|
|
public int Groupld { get; set; }
|
|
|
|
/// <summary>
|
|
/// 成员角色(0:普通成员,1:管理员,2:群主)
|
|
/// </summary>
|
|
[Column(TypeName = "tinyint(4)")]
|
|
public sbyte Role { get; set; }
|
|
|
|
/// <summary>
|
|
/// 加入群聊时间
|
|
/// </summary>
|
|
[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!;
|
|
}
|