IM/backend/IM_API/Models/Friendrequest.cs

58 lines
1.5 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;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace IM_API.Models;
[Table("friendrequest")]
[Index("RequestUser", Name = "RequestUser")]
[Index("ResponseUser", Name = "ResponseUser")]
[MySqlCharSet("utf8mb4")]
[MySqlCollation("utf8mb4_general_ci")]
public partial class Friendrequest
{
[Key]
[Column("ID", TypeName = "int(11)")]
public int Id { get; set; }
/// <summary>
/// 申请人
/// </summary>
[Column(TypeName = "int(11)")]
public int RequestUser { get; set; }
/// <summary>
/// 被申请人
/// </summary>
[Column(TypeName = "int(11)")]
public int ResponseUser { get; set; }
/// <summary>
/// 申请时间
/// </summary>
[Column(TypeName = "datetime")]
public DateTime Created { get; set; }
/// <summary>
/// 申请附言
/// </summary>
[Column(TypeName = "text")]
public string? Description { get; set; }
/// <summary>
/// 申请状态0待通过,1:拒绝,2:同意,3拉黑
/// </summary>
[Column(TypeName = "tinyint(4)")]
public sbyte State { get; set; }
[ForeignKey("RequestUser")]
[InverseProperty("FriendrequestRequestUserNavigations")]
public virtual User RequestUserNavigation { get; set; } = null!;
[ForeignKey("ResponseUser")]
[InverseProperty("FriendrequestResponseUserNavigations")]
public virtual User ResponseUserNavigation { get; set; } = null!;
}