using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Iceshrimp.Backend.Core.Database.Tables;
[Table("follow_request")]
[Index("FolloweeId")]
[Index("FollowerId")]
[Index("FollowerId", "FolloweeId", IsUnique = true)]
public class FollowRequest {
[Key]
[Column("id")]
[StringLength(32)]
public string Id { get; set; } = null!;
///
/// The created date of the FollowRequest.
///
[Column("createdAt")]
public DateTime CreatedAt { get; set; }
///
/// The followee user ID.
///
[Column("followeeId")]
[StringLength(32)]
public string FolloweeId { get; set; } = null!;
///
/// The follower user ID.
///
[Column("followerId")]
[StringLength(32)]
public string FollowerId { get; set; } = null!;
///
/// id of Follow Activity.
///
[Column("requestId")]
[StringLength(128)]
public string? RequestId { get; set; }
///
/// [Denormalized]
///
[Column("followerHost")]
[StringLength(512)]
public string? FollowerHost { get; set; }
///
/// [Denormalized]
///
[Column("followerInbox")]
[StringLength(512)]
public string? FollowerInbox { get; set; }
///
/// [Denormalized]
///
[Column("followerSharedInbox")]
[StringLength(512)]
public string? FollowerSharedInbox { get; set; }
///
/// [Denormalized]
///
[Column("followeeHost")]
[StringLength(512)]
public string? FolloweeHost { get; set; }
///
/// [Denormalized]
///
[Column("followeeInbox")]
[StringLength(512)]
public string? FolloweeInbox { get; set; }
///
/// [Denormalized]
///
[Column("followeeSharedInbox")]
[StringLength(512)]
public string? FolloweeSharedInbox { get; set; }
[ForeignKey("FolloweeId")]
[InverseProperty("FollowRequestFollowees")]
public virtual User Followee { get; set; } = null!;
[ForeignKey("FollowerId")]
[InverseProperty("FollowRequestFollowers")]
public virtual User Follower { get; set; } = null!;
[InverseProperty("FollowRequest")]
public virtual ICollection Notifications { get; set; } = new List();
}