using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; namespace Iceshrimp.Backend.Core.Database.Tables; [Table("user")] [Index("Host", Name = "IDX_3252a5df8d5bbd16b281f7799e")] [Index("UsernameLower", "Host", Name = "IDX_5deb01ae162d1d70b80d064c27", IsUnique = true)] [Index("UpdatedAt", Name = "IDX_80ca6e6ef65fb9ef34ea8c90f4")] [Index("UsernameLower", Name = "IDX_a27b942a0d6dcff90e3ee9b5e8")] [Index("Token", Name = "IDX_a854e557b1b14814750c7c7b0c", IsUnique = true)] [Index("Uri", Name = "IDX_be623adaa4c566baf5d29ce0c8")] [Index("LastActiveDate", Name = "IDX_c8cc87bd0f2f4487d17c651fbf")] [Index("IsExplorable", Name = "IDX_d5a1b83c7cab66f167e6888188")] [Index("CreatedAt", Name = "IDX_e11e649824a45d8ed01d597fd9")] [Index("Tags", Name = "IDX_fa99d777623947a5b05f394cae")] [Index("AvatarId", Name = "REL_58f5c71eaab331645112cf8cfa", IsUnique = true)] [Index("BannerId", Name = "REL_afc64b53f8db3707ceb34eb28e", IsUnique = true)] [Index("Token", Name = "UQ_a854e557b1b14814750c7c7b0c9", IsUnique = true)] public class User { [Key] [Column("id")] [StringLength(32)] public string Id { get; set; } = null!; /// /// The created date of the User. /// [Column("createdAt")] public DateTime CreatedAt { get; set; } /// /// The updated date of the User. /// [Column("updatedAt")] public DateTime? UpdatedAt { get; set; } [Column("lastFetchedAt")] public DateTime? LastFetchedAt { get; set; } /// /// The username of the User. /// [Column("username")] [StringLength(128)] public string Username { get; set; } = null!; /// /// The username (lowercased) of the User. /// [Column("usernameLower")] [StringLength(128)] public string UsernameLower { get; set; } = null!; /// /// The name of the User. /// [Column("name")] [StringLength(128)] public string? Name { get; set; } /// /// The count of followers. /// [Column("followersCount")] public int FollowersCount { get; set; } /// /// The count of following. /// [Column("followingCount")] public int FollowingCount { get; set; } /// /// The count of notes. /// [Column("notesCount")] public int NotesCount { get; set; } /// /// The ID of avatar DriveFile. /// [Column("avatarId")] [StringLength(32)] public string? AvatarId { get; set; } /// /// The ID of banner DriveFile. /// [Column("bannerId")] [StringLength(32)] public string? BannerId { get; set; } [Column("tags", TypeName = "character varying(128)[]")] public List Tags { get; set; } = null!; /// /// Whether the User is suspended. /// [Column("isSuspended")] public bool IsSuspended { get; set; } /// /// Whether the User is silenced. /// [Column("isSilenced")] public bool IsSilenced { get; set; } /// /// Whether the User is locked. /// [Column("isLocked")] public bool IsLocked { get; set; } /// /// Whether the User is a bot. /// [Column("isBot")] public bool IsBot { get; set; } /// /// Whether the User is a cat. /// [Column("isCat")] public bool IsCat { get; set; } /// /// Whether the User is the admin. /// [Column("isAdmin")] public bool IsAdmin { get; set; } /// /// Whether the User is a moderator. /// [Column("isModerator")] public bool IsModerator { get; set; } [Column("emojis", TypeName = "character varying(128)[]")] public List Emojis { get; set; } = null!; /// /// The host of the User. It will be null if the origin of the user is local. /// [Column("host")] [StringLength(512)] public string? Host { get; set; } /// /// The inbox URL of the User. It will be null if the origin of the user is local. /// [Column("inbox")] [StringLength(512)] public string? Inbox { get; set; } /// /// The sharedInbox URL of the User. It will be null if the origin of the user is local. /// [Column("sharedInbox")] [StringLength(512)] public string? SharedInbox { get; set; } /// /// The featured URL of the User. It will be null if the origin of the user is local. /// [Column("featured")] [StringLength(512)] public string? Featured { get; set; } /// /// The URI of the User. It will be null if the origin of the user is local. /// [Column("uri")] [StringLength(512)] public string? Uri { get; set; } /// /// The native access token of the User. It will be null if the origin of the user is local. /// [Column("token")] [StringLength(16)] public string? Token { get; set; } /// /// Whether the User is explorable. /// [Column("isExplorable")] public bool IsExplorable { get; set; } /// /// The URI of the user Follower Collection. It will be null if the origin of the user is local. /// [Column("followersUri")] [StringLength(512)] public string? FollowersUri { get; set; } [Column("lastActiveDate")] public DateTime? LastActiveDate { get; set; } [Column("hideOnlineStatus")] public bool HideOnlineStatus { get; set; } /// /// Whether the User is deleted. /// [Column("isDeleted")] public bool IsDeleted { get; set; } /// /// Overrides user drive capacity limit /// [Column("driveCapacityOverrideMb")] public int? DriveCapacityOverrideMb { get; set; } /// /// The URI of the new account of the User /// [Column("movedToUri")] [StringLength(512)] public string? MovedToUri { get; set; } /// /// URIs the user is known as too /// [Column("alsoKnownAs")] public string? AlsoKnownAs { get; set; } /// /// Whether to speak as a cat if isCat. /// [Column("speakAsCat")] public bool SpeakAsCat { get; set; } /// /// The URL of the avatar DriveFile /// [Column("avatarUrl")] [StringLength(512)] public string? AvatarUrl { get; set; } /// /// The blurhash of the avatar DriveFile /// [Column("avatarBlurhash")] [StringLength(128)] public string? AvatarBlurhash { get; set; } /// /// The URL of the banner DriveFile /// [Column("bannerUrl")] [StringLength(512)] public string? BannerUrl { get; set; } /// /// The blurhash of the banner DriveFile /// [Column("bannerBlurhash")] [StringLength(128)] public string? BannerBlurhash { get; set; } [InverseProperty("Assignee")] public virtual ICollection AbuseUserReportAssignees { get; set; } = new List(); [InverseProperty("Reporter")] public virtual ICollection AbuseUserReportReporters { get; set; } = new List(); [InverseProperty("TargetUser")] public virtual ICollection AbuseUserReportTargetUsers { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection AccessTokens { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection AnnouncementReads { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection Antennas { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection Apps { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection AttestationChallenges { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection AuthSessions { get; set; } = new List(); [ForeignKey("AvatarId")] [InverseProperty("UserAvatar")] public virtual DriveFile? Avatar { get; set; } [ForeignKey("BannerId")] [InverseProperty("UserBanner")] public virtual DriveFile? Banner { get; set; } [InverseProperty("Blockee")] public virtual ICollection BlockingBlockees { get; set; } = new List(); [InverseProperty("Blocker")] public virtual ICollection BlockingBlockers { get; set; } = new List(); [InverseProperty("Follower")] public virtual ICollection ChannelFollowings { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection Channels { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection Clips { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection DriveFiles { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection DriveFolders { get; set; } = new List(); [InverseProperty("Followee")] public virtual ICollection FollowRequestFollowees { get; set; } = new List(); [InverseProperty("Follower")] public virtual ICollection FollowRequestFollowers { get; set; } = new List(); [InverseProperty("Followee")] public virtual ICollection FollowingFollowees { get; set; } = new List(); [InverseProperty("Follower")] public virtual ICollection FollowingFollowers { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection GalleryLikes { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection GalleryPosts { get; set; } = new List(); [InverseProperty("User")] public virtual HtmlUserCacheEntry? HtmlUserCacheEntry { get; set; } [InverseProperty("Recipient")] public virtual ICollection MessagingMessageRecipients { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection MessagingMessageUsers { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection ModerationLogs { get; set; } = new List(); [InverseProperty("Mutee")] public virtual ICollection MutingMutees { get; set; } = new List(); [InverseProperty("Muter")] public virtual ICollection MutingMuters { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection NoteFavorites { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection NoteReactions { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection NoteThreadMutings { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection NoteUnreads { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection NoteWatchings { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection Notes { get; set; } = new List(); [InverseProperty("Notifiee")] public virtual ICollection NotificationNotifiees { get; set; } = new List(); [InverseProperty("Notifier")] public virtual ICollection NotificationNotifiers { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection OauthTokens { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection PageLikes { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection Pages { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection PasswordResetRequests { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection PollVotes { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection PromoReads { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection RegistryItems { get; set; } = new List(); [InverseProperty("Mutee")] public virtual ICollection RenoteMutingMutees { get; set; } = new List(); [InverseProperty("Muter")] public virtual ICollection RenoteMutingMuters { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection Sessions { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection Signins { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection SwSubscriptions { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection UserGroupInvitations { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection UserGroupInvites { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection UserGroupJoinings { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection UserGroups { get; set; } = new List(); [InverseProperty("User")] public virtual UserKeypair? UserKeypair { get; set; } [InverseProperty("User")] public virtual ICollection UserListJoinings { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection UserLists { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection UserNotePinings { get; set; } = new List(); [InverseProperty("User")] public virtual UserProfile? UserProfile { get; set; } [InverseProperty("User")] public virtual UserPublickey? UserPublickey { get; set; } [InverseProperty("User")] public virtual ICollection UserSecurityKeys { get; set; } = new List(); [InverseProperty("User")] public virtual ICollection Webhooks { get; set; } = new List(); }