diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
new file mode 100644
index 0000000..fccc806
--- /dev/null
+++ b/.config/dotnet-tools.json
@@ -0,0 +1,12 @@
+{
+ "version": 1,
+ "isRoot": true,
+ "tools": {
+ "dotnet-ef": {
+ "version": "7.0.0",
+ "commands": [
+ "dotnet-ef"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 2cdcd7a..831cb14 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -2,6 +2,11 @@
true
+
+
+
+
+
diff --git a/README.md b/README.md
index 4dfedd1..8992c29 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,31 @@ To run the WebApp, you can navigate to the `\WebApp` folder from your preferred
dotnet run watch
```
+### Using Entity Framework Core
+
+#### 1. Install EF Core CLI tool
+```bash
+dotnet tool restore
+```
+
+#### 2. Create a local database user for smilodon
+```postgresql
+CREATE USER smilodon WITH PASSWORD 'smilodon' CREATEDB;
+CREATE DATABASE smilodon;
+```
+
+#### 3. Initialize your local database
+```bash
+cd ./src/Infrastructure/Persistence
+dotnet ef database update
+```
+
+#### Creating a migration
+```bash
+cd ./src/Infrastructure/Persistence
+dotnet ef migrations add
+```
+
## Project Documentation
For information about the project, see the [Smilodon Documentation](https://devchatter.github.io/Smilodon)
diff --git a/Smilodon.sln b/Smilodon.sln
index 5ba0a86..ce10310 100644
--- a/Smilodon.sln
+++ b/Smilodon.sln
@@ -11,10 +11,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9EC4E573-0
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApp.Test", "test\WebApp.Test\WebApp.Test.csproj", "{972B3171-DDE1-4CF8-863E-B45875440A80}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure.Database", "src\Infrastructure.Database\Infrastructure.Database.csproj", "{5D89CB6E-02DA-483F-B0CA-03E235EA795B}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "src\Infrastructure\Infrastructure.csproj", "{5D89CB6E-02DA-483F-B0CA-03E235EA795B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ActivityPub.Domain", "src\ActivityPub.Domain\ActivityPub.Domain.csproj", "{5538990A-29DE-448B-A5F3-30266AA66C17}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "src\Domain\Domain.csproj", "{46FC91AA-B4F6-4339-A414-5126474048C6}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -37,6 +39,10 @@ Global
{5538990A-29DE-448B-A5F3-30266AA66C17}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5538990A-29DE-448B-A5F3-30266AA66C17}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5538990A-29DE-448B-A5F3-30266AA66C17}.Release|Any CPU.Build.0 = Release|Any CPU
+ {46FC91AA-B4F6-4339-A414-5126474048C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {46FC91AA-B4F6-4339-A414-5126474048C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {46FC91AA-B4F6-4339-A414-5126474048C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {46FC91AA-B4F6-4339-A414-5126474048C6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -46,6 +52,7 @@ Global
{972B3171-DDE1-4CF8-863E-B45875440A80} = {9EC4E573-048F-40B7-8721-E28857532DF0}
{5D89CB6E-02DA-483F-B0CA-03E235EA795B} = {74FC9674-053B-480C-84AC-F6AAF8B82239}
{5538990A-29DE-448B-A5F3-30266AA66C17} = {74FC9674-053B-480C-84AC-F6AAF8B82239}
+ {46FC91AA-B4F6-4339-A414-5126474048C6} = {74FC9674-053B-480C-84AC-F6AAF8B82239}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B464DC23-8514-4B57-BA12-524A7C3994FA}
diff --git a/src/ActivityPub.Domain/Accounts/Account.cs b/src/ActivityPub.Domain/Accounts/Account.cs
index aeca9f7..0649b16 100644
--- a/src/ActivityPub.Domain/Accounts/Account.cs
+++ b/src/ActivityPub.Domain/Accounts/Account.cs
@@ -4,13 +4,31 @@ namespace ActivityPub.Domain.Accounts;
public class Account
{
- public Account(string id, string username, string accountUri,
- string url, string displayName, string note, string avatar,
- string avatarStatic, string headerImage, string headerStatic,
- bool isLocked, ProfileField[] fields, Emoji[] emojis, bool isBot,
- bool isGroup, bool? isDiscoverable, Account hasMovedTo, bool? isSuspended,
- bool isLimited, DateTime createdAt, DateTime? lastStatusAt,
- int statusCount, int followerCount, int followingCount)
+ public Account(
+ string id,
+ string username,
+ string accountUri,
+ string url,
+ string displayName,
+ string note,
+ string avatar,
+ string avatarStatic,
+ string headerImage,
+ string headerStatic,
+ bool isLocked,
+ ProfileField[] fields,
+ Emoji[] emojis,
+ bool isBot,
+ bool isGroup,
+ bool? isDiscoverable,
+ Account hasMovedTo,
+ bool? isSuspended,
+ bool isLimited,
+ DateTime createdAt,
+ DateTime? lastStatusAt,
+ int statusCount,
+ int followerCount,
+ int followingCount)
{
Id = id;
Username = username;
diff --git a/src/Infrastructure.Database/Infrastructure.Database.csproj b/src/Domain/Domain.csproj
similarity index 78%
rename from src/Infrastructure.Database/Infrastructure.Database.csproj
rename to src/Domain/Domain.csproj
index 4cb84ae..1a9d34a 100644
--- a/src/Infrastructure.Database/Infrastructure.Database.csproj
+++ b/src/Domain/Domain.csproj
@@ -4,7 +4,7 @@
net7.0
enable
enable
- true
+ Smilodon.Domain
diff --git a/src/Domain/Models/Account.cs b/src/Domain/Models/Account.cs
new file mode 100644
index 0000000..78358ea
--- /dev/null
+++ b/src/Domain/Models/Account.cs
@@ -0,0 +1,117 @@
+namespace Smilodon.Domain.Models
+{
+ public class Account
+ {
+ public long Id { get; set; }
+ public string Username { get; set; } = null!;
+ public string? Domain { get; set; }
+ public string? PrivateKey { get; set; }
+ public string PublicKey { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string Note { get; set; } = null!;
+ public string DisplayName { get; set; } = null!;
+ public string Uri { get; set; } = null!;
+ public string? Url { get; set; }
+ public string? AvatarFileName { get; set; }
+ public string? AvatarContentType { get; set; }
+ public int? AvatarFileSize { get; set; }
+ public DateTime? AvatarUpdatedAt { get; set; }
+ public string? HeaderFileName { get; set; }
+ public string? HeaderContentType { get; set; }
+ public int? HeaderFileSize { get; set; }
+ public DateTime? HeaderUpdatedAt { get; set; }
+ public string? AvatarRemoteUrl { get; set; }
+ public bool Locked { get; set; }
+ public string HeaderRemoteUrl { get; set; } = null!;
+ public DateTime? LastWebfingeredAt { get; set; }
+ public string InboxUrl { get; set; } = null!;
+ public string OutboxUrl { get; set; } = null!;
+ public string SharedInboxUrl { get; set; } = null!;
+ public string FollowersUrl { get; set; } = null!;
+ public int Protocol { get; set; }
+ public bool Memorial { get; set; }
+ public long? MovedToAccountId { get; set; }
+ public string? FeaturedCollectionUrl { get; set; }
+ public string? Fields { get; set; }
+ public string? ActorType { get; set; }
+ public bool? Discoverable { get; set; }
+ public string[]? AlsoKnownAs { get; set; }
+ public DateTime? SilencedAt { get; set; }
+ public DateTime? SuspendedAt { get; set; }
+ public bool? HideCollections { get; set; }
+ public int? AvatarStorageSchemaVersion { get; set; }
+ public int? HeaderStorageSchemaVersion { get; set; }
+ public string? DevicesUrl { get; set; }
+ public int? SuspensionOrigin { get; set; }
+ public DateTime? SensitizedAt { get; set; }
+ public bool? Trendable { get; set; }
+ public DateTime? ReviewedAt { get; set; }
+ public DateTime? RequestedReviewAt { get; set; }
+
+ public virtual Account? MovedToAccount { get; set; }
+ public virtual AccountStat AccountStat { get; set; } = null!;
+ public virtual FollowRecommendationSuppression FollowRecommendationSuppression { get; set; } = null!;
+ public virtual ICollection AccountAliases { get; set; } = new HashSet();
+ public virtual ICollection AccountConversations { get; set; } = new HashSet();
+ public virtual ICollection AccountDeletionRequests { get; set; } = new HashSet();
+ public virtual ICollection AccountDomainBlocks { get; set; } = new HashSet();
+ public virtual ICollection AccountMigrationAccounts { get; set; } = new HashSet();
+ public virtual ICollection AccountMigrationTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection AccountModerationNoteAccounts { get; set; } = new HashSet();
+ public virtual ICollection AccountModerationNoteTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection AccountNoteAccounts { get; set; } = new HashSet();
+ public virtual ICollection AccountNoteTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection AccountPinAccounts { get; set; } = new HashSet();
+ public virtual ICollection AccountPinTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection AccountStatusesCleanupPolicies { get; set; } = new HashSet();
+ public virtual ICollection AccountWarningAccounts { get; set; } = new HashSet();
+ public virtual ICollection AccountWarningTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection AdminActionLogs { get; set; } = new HashSet();
+ public virtual ICollection AnnouncementMutes { get; set; } = new HashSet();
+ public virtual ICollection AnnouncementReactions { get; set; } = new HashSet();
+ public virtual ICollection AppealAccounts { get; set; } = new HashSet();
+ public virtual ICollection AppealApprovedByAccounts { get; set; } = new HashSet();
+ public virtual ICollection AppealRejectedByAccounts { get; set; } = new HashSet();
+ public virtual ICollection BlockAccounts { get; set; } = new HashSet();
+ public virtual ICollection BlockTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection Bookmarks { get; set; } = new HashSet();
+ public virtual ICollection CanonicalEmailBlocks { get; set; } = new HashSet();
+ public virtual ICollection ConversationMutes { get; set; } = new HashSet();
+ public virtual ICollection CustomFilters { get; set; } = new HashSet();
+ public virtual ICollection Devices { get; set; } = new HashSet();
+ public virtual ICollection EncryptedMessages { get; set; } = new HashSet();
+ public virtual ICollection Favourites { get; set; } = new HashSet();
+ public virtual ICollection FeaturedTags { get; set; } = new HashSet();
+ public virtual ICollection FollowAccounts { get; set; } = new HashSet();
+ public virtual ICollection FollowRequestAccounts { get; set; } = new HashSet();
+ public virtual ICollection FollowRequestTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection FollowTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection Imports { get; set; } = new HashSet();
+ public virtual ICollection InverseMovedToAccount { get; set; } = new HashSet();
+ public virtual ICollection ListAccounts { get; set; } = new HashSet();
+ public virtual ICollection Lists { get; set; } = new HashSet();
+ public virtual ICollection MediaAttachments { get; set; } = new HashSet();
+ public virtual ICollection Mentions { get; set; } = new HashSet();
+ public virtual ICollection MuteAccounts { get; set; } = new HashSet();
+ public virtual ICollection MuteTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection NotificationAccounts { get; set; } = new HashSet();
+ public virtual ICollection NotificationFromAccounts { get; set; } = new HashSet();
+ public virtual ICollection PollVotes { get; set; } = new HashSet();
+ public virtual ICollection Polls { get; set; } = new HashSet();
+ public virtual ICollection ReportAccounts { get; set; } = new HashSet();
+ public virtual ICollection ReportActionTakenByAccounts { get; set; } = new HashSet();
+ public virtual ICollection ReportAssignedAccounts { get; set; } = new HashSet();
+ public virtual ICollection ReportNotes { get; set; } = new HashSet();
+ public virtual ICollection ReportTargetAccounts { get; set; } = new HashSet();
+ public virtual ICollection ScheduledStatuses { get; set; } = new HashSet();
+ public virtual ICollection StatusAccounts { get; set; } = new HashSet();
+ public virtual ICollection StatusEdits { get; set; } = new HashSet();
+ public virtual ICollection StatusInReplyToAccounts { get; set; } = new HashSet();
+ public virtual ICollection StatusPins { get; set; } = new HashSet();
+ public virtual ICollection StatusTrends { get; set; } = new HashSet();
+ public virtual ICollection TagFollows { get; set; } = new HashSet();
+ public virtual ICollection Tombstones { get; set; } = new HashSet();
+ public virtual ICollection Users { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/AccountAlias.cs b/src/Domain/Models/AccountAlias.cs
new file mode 100644
index 0000000..b287255
--- /dev/null
+++ b/src/Domain/Models/AccountAlias.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountAlias
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public string Acct { get; set; } = null!;
+ public string Uri { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account? Account { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AccountConversation.cs b/src/Domain/Models/AccountConversation.cs
new file mode 100644
index 0000000..2cc4bb1
--- /dev/null
+++ b/src/Domain/Models/AccountConversation.cs
@@ -0,0 +1,17 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountConversation
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public long? ConversationId { get; set; }
+ public long[] ParticipantAccountIds { get; set; } = null!;
+ public long[] StatusIds { get; set; } = null!;
+ public long? LastStatusId { get; set; }
+ public int LockVersion { get; set; }
+ public bool Unread { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Conversation? Conversation { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AccountDeletionRequest.cs b/src/Domain/Models/AccountDeletionRequest.cs
new file mode 100644
index 0000000..0699cba
--- /dev/null
+++ b/src/Domain/Models/AccountDeletionRequest.cs
@@ -0,0 +1,12 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountDeletionRequest
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account? Account { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AccountDomainBlock.cs b/src/Domain/Models/AccountDomainBlock.cs
new file mode 100644
index 0000000..8f355d0
--- /dev/null
+++ b/src/Domain/Models/AccountDomainBlock.cs
@@ -0,0 +1,13 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountDomainBlock
+ {
+ public long Id { get; set; }
+ public string? Domain { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long? AccountId { get; set; }
+
+ public virtual Account? Account { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AccountMigration.cs b/src/Domain/Models/AccountMigration.cs
new file mode 100644
index 0000000..afc1089
--- /dev/null
+++ b/src/Domain/Models/AccountMigration.cs
@@ -0,0 +1,16 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountMigration
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public string Acct { get; set; } = null!;
+ public long FollowersCount { get; set; }
+ public long? TargetAccountId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Account? TargetAccount { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AccountModerationNote.cs b/src/Domain/Models/AccountModerationNote.cs
new file mode 100644
index 0000000..44e06e7
--- /dev/null
+++ b/src/Domain/Models/AccountModerationNote.cs
@@ -0,0 +1,15 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountModerationNote
+ {
+ public long Id { get; set; }
+ public string Content { get; set; } = null!;
+ public long AccountId { get; set; }
+ public long TargetAccountId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Account TargetAccount { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/AccountNote.cs b/src/Domain/Models/AccountNote.cs
new file mode 100644
index 0000000..13a2d32
--- /dev/null
+++ b/src/Domain/Models/AccountNote.cs
@@ -0,0 +1,15 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountNote
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public long? TargetAccountId { get; set; }
+ public string Comment { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Account? TargetAccount { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AccountPin.cs b/src/Domain/Models/AccountPin.cs
new file mode 100644
index 0000000..af511b8
--- /dev/null
+++ b/src/Domain/Models/AccountPin.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountPin
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public long? TargetAccountId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Account? TargetAccount { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AccountStat.cs b/src/Domain/Models/AccountStat.cs
new file mode 100644
index 0000000..1ef23d8
--- /dev/null
+++ b/src/Domain/Models/AccountStat.cs
@@ -0,0 +1,16 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountStat
+ {
+ public long Id { get; set; }
+ public long AccountId { get; set; }
+ public long StatusesCount { get; set; }
+ public long FollowingCount { get; set; }
+ public long FollowersCount { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public DateTime? LastStatusAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/AccountStatusesCleanupPolicy.cs b/src/Domain/Models/AccountStatusesCleanupPolicy.cs
new file mode 100644
index 0000000..8529dfa
--- /dev/null
+++ b/src/Domain/Models/AccountStatusesCleanupPolicy.cs
@@ -0,0 +1,22 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountStatusesCleanupPolicy
+ {
+ public long Id { get; set; }
+ public long AccountId { get; set; }
+ public bool Enabled { get; set; }
+ public int MinStatusAge { get; set; }
+ public bool KeepDirect { get; set; }
+ public bool KeepPinned { get; set; }
+ public bool KeepPolls { get; set; }
+ public bool KeepMedia { get; set; }
+ public bool KeepSelfFav { get; set; }
+ public bool KeepSelfBookmark { get; set; }
+ public int? MinFavs { get; set; }
+ public int? MinReblogs { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/AccountSummary.cs b/src/Domain/Models/AccountSummary.cs
new file mode 100644
index 0000000..82949ca
--- /dev/null
+++ b/src/Domain/Models/AccountSummary.cs
@@ -0,0 +1,9 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountSummary
+ {
+ public long? AccountId { get; set; }
+ public string? Language { get; set; }
+ public bool? Sensitive { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AccountTag.cs b/src/Domain/Models/AccountTag.cs
new file mode 100644
index 0000000..109b056
--- /dev/null
+++ b/src/Domain/Models/AccountTag.cs
@@ -0,0 +1,8 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountTag
+ {
+ public long AccountId { get; set; }
+ public long TagId { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AccountWarning.cs b/src/Domain/Models/AccountWarning.cs
new file mode 100644
index 0000000..f706a29
--- /dev/null
+++ b/src/Domain/Models/AccountWarning.cs
@@ -0,0 +1,21 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountWarning
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public long? TargetAccountId { get; set; }
+ public int Action { get; set; }
+ public string Text { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long? ReportId { get; set; }
+ public string[]? StatusIds { get; set; }
+ public DateTime? OverruledAt { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Report? Report { get; set; }
+ public virtual Account? TargetAccount { get; set; }
+ public virtual Appeal Appeal { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/AccountWarningPreset.cs b/src/Domain/Models/AccountWarningPreset.cs
new file mode 100644
index 0000000..1bc6003
--- /dev/null
+++ b/src/Domain/Models/AccountWarningPreset.cs
@@ -0,0 +1,11 @@
+namespace Smilodon.Domain.Models
+{
+ public class AccountWarningPreset
+ {
+ public long Id { get; set; }
+ public string Text { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string Title { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/AdminActionLog.cs b/src/Domain/Models/AdminActionLog.cs
new file mode 100644
index 0000000..282a7c9
--- /dev/null
+++ b/src/Domain/Models/AdminActionLog.cs
@@ -0,0 +1,18 @@
+namespace Smilodon.Domain.Models
+{
+ public class AdminActionLog
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public string Action { get; set; } = null!;
+ public string? TargetType { get; set; }
+ public long? TargetId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string? HumanIdentifier { get; set; }
+ public string? RouteParam { get; set; }
+ public string? Permalink { get; set; }
+
+ public virtual Account? Account { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Announcement.cs b/src/Domain/Models/Announcement.cs
new file mode 100644
index 0000000..0329225
--- /dev/null
+++ b/src/Domain/Models/Announcement.cs
@@ -0,0 +1,20 @@
+namespace Smilodon.Domain.Models
+{
+ public class Announcement
+ {
+ public long Id { get; set; }
+ public string Text { get; set; } = null!;
+ public bool Published { get; set; }
+ public bool AllDay { get; set; }
+ public DateTime? ScheduledAt { get; set; }
+ public DateTime? StartsAt { get; set; }
+ public DateTime? EndsAt { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public DateTime? PublishedAt { get; set; }
+ public long[]? StatusIds { get; set; }
+
+ public virtual ICollection AnnouncementMutes { get; set; } = new HashSet();
+ public virtual ICollection AnnouncementReactions { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/AnnouncementMute.cs b/src/Domain/Models/AnnouncementMute.cs
new file mode 100644
index 0000000..64df353
--- /dev/null
+++ b/src/Domain/Models/AnnouncementMute.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class AnnouncementMute
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public long? AnnouncementId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Announcement? Announcement { get; set; }
+ }
+}
diff --git a/src/Domain/Models/AnnouncementReaction.cs b/src/Domain/Models/AnnouncementReaction.cs
new file mode 100644
index 0000000..f3c4b53
--- /dev/null
+++ b/src/Domain/Models/AnnouncementReaction.cs
@@ -0,0 +1,17 @@
+namespace Smilodon.Domain.Models
+{
+ public class AnnouncementReaction
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public long? AnnouncementId { get; set; }
+ public string Name { get; set; } = null!;
+ public long? CustomEmojiId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Announcement? Announcement { get; set; }
+ public virtual CustomEmoji? CustomEmoji { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Appeal.cs b/src/Domain/Models/Appeal.cs
new file mode 100644
index 0000000..d8199b3
--- /dev/null
+++ b/src/Domain/Models/Appeal.cs
@@ -0,0 +1,21 @@
+namespace Smilodon.Domain.Models
+{
+ public class Appeal
+ {
+ public long Id { get; set; }
+ public long AccountId { get; set; }
+ public long AccountWarningId { get; set; }
+ public string Text { get; set; } = null!;
+ public DateTime? ApprovedAt { get; set; }
+ public long? ApprovedByAccountId { get; set; }
+ public DateTime? RejectedAt { get; set; }
+ public long? RejectedByAccountId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual AccountWarning AccountWarning { get; set; } = null!;
+ public virtual Account? ApprovedByAccount { get; set; }
+ public virtual Account? RejectedByAccount { get; set; }
+ }
+}
diff --git a/src/Domain/Models/ArInternalMetadatum.cs b/src/Domain/Models/ArInternalMetadatum.cs
new file mode 100644
index 0000000..2a49a2e
--- /dev/null
+++ b/src/Domain/Models/ArInternalMetadatum.cs
@@ -0,0 +1,10 @@
+namespace Smilodon.Domain.Models
+{
+ public class ArInternalMetadatum
+ {
+ public string Key { get; set; } = null!;
+ public string? Value { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Backup.cs b/src/Domain/Models/Backup.cs
new file mode 100644
index 0000000..46c98b7
--- /dev/null
+++ b/src/Domain/Models/Backup.cs
@@ -0,0 +1,17 @@
+namespace Smilodon.Domain.Models
+{
+ public class Backup
+ {
+ public long Id { get; set; }
+ public long? UserId { get; set; }
+ public string? DumpFileName { get; set; }
+ public string? DumpContentType { get; set; }
+ public DateTime? DumpUpdatedAt { get; set; }
+ public bool Processed { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long? DumpFileSize { get; set; }
+
+ public virtual User? User { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Block.cs b/src/Domain/Models/Block.cs
new file mode 100644
index 0000000..8d362e1
--- /dev/null
+++ b/src/Domain/Models/Block.cs
@@ -0,0 +1,15 @@
+namespace Smilodon.Domain.Models
+{
+ public class Block
+ {
+ public long Id { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long AccountId { get; set; }
+ public long TargetAccountId { get; set; }
+ public string? Uri { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Account TargetAccount { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Bookmark.cs b/src/Domain/Models/Bookmark.cs
new file mode 100644
index 0000000..8c282aa
--- /dev/null
+++ b/src/Domain/Models/Bookmark.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class Bookmark
+ {
+ public long Id { get; set; }
+ public long AccountId { get; set; }
+ public long StatusId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Status Status { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/CanonicalEmailBlock.cs b/src/Domain/Models/CanonicalEmailBlock.cs
new file mode 100644
index 0000000..7e22f1c
--- /dev/null
+++ b/src/Domain/Models/CanonicalEmailBlock.cs
@@ -0,0 +1,13 @@
+namespace Smilodon.Domain.Models
+{
+ public class CanonicalEmailBlock
+ {
+ public long Id { get; set; }
+ public string CanonicalEmailHash { get; set; } = null!;
+ public long? ReferenceAccountId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account? ReferenceAccount { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Conversation.cs b/src/Domain/Models/Conversation.cs
new file mode 100644
index 0000000..d112be1
--- /dev/null
+++ b/src/Domain/Models/Conversation.cs
@@ -0,0 +1,13 @@
+namespace Smilodon.Domain.Models
+{
+ public class Conversation
+ {
+ public long Id { get; set; }
+ public string? Uri { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual ICollection AccountConversations { get; set; } = new HashSet();
+ public virtual ICollection ConversationMutes { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/ConversationMute.cs b/src/Domain/Models/ConversationMute.cs
new file mode 100644
index 0000000..3850ba2
--- /dev/null
+++ b/src/Domain/Models/ConversationMute.cs
@@ -0,0 +1,12 @@
+namespace Smilodon.Domain.Models
+{
+ public class ConversationMute
+ {
+ public long Id { get; set; }
+ public long ConversationId { get; set; }
+ public long AccountId { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Conversation Conversation { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/CustomEmoji.cs b/src/Domain/Models/CustomEmoji.cs
new file mode 100644
index 0000000..2c637df
--- /dev/null
+++ b/src/Domain/Models/CustomEmoji.cs
@@ -0,0 +1,23 @@
+namespace Smilodon.Domain.Models
+{
+ public class CustomEmoji
+ {
+ public long Id { get; set; }
+ public string Shortcode { get; set; } = null!;
+ public string? Domain { get; set; }
+ public string? ImageFileName { get; set; }
+ public string? ImageContentType { get; set; }
+ public int? ImageFileSize { get; set; }
+ public DateTime? ImageUpdatedAt { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public bool Disabled { get; set; }
+ public string? Uri { get; set; }
+ public string? ImageRemoteUrl { get; set; }
+ public bool VisibleInPicker { get; set; }
+ public long? CategoryId { get; set; }
+ public int? ImageStorageSchemaVersion { get; set; }
+
+ public virtual ICollection AnnouncementReactions { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/CustomEmojiCategory.cs b/src/Domain/Models/CustomEmojiCategory.cs
new file mode 100644
index 0000000..ca7ef6f
--- /dev/null
+++ b/src/Domain/Models/CustomEmojiCategory.cs
@@ -0,0 +1,10 @@
+namespace Smilodon.Domain.Models
+{
+ public class CustomEmojiCategory
+ {
+ public long Id { get; set; }
+ public string? Name { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ }
+}
diff --git a/src/Domain/Models/CustomFilter.cs b/src/Domain/Models/CustomFilter.cs
new file mode 100644
index 0000000..6a01029
--- /dev/null
+++ b/src/Domain/Models/CustomFilter.cs
@@ -0,0 +1,18 @@
+namespace Smilodon.Domain.Models
+{
+ public class CustomFilter
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public DateTime? ExpiresAt { get; set; }
+ public string Phrase { get; set; } = null!;
+ public string[] Context { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public int Action { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual ICollection CustomFilterKeywords { get; set; } = new HashSet();
+ public virtual ICollection CustomFilterStatuses { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/CustomFilterKeyword.cs b/src/Domain/Models/CustomFilterKeyword.cs
new file mode 100644
index 0000000..1b416eb
--- /dev/null
+++ b/src/Domain/Models/CustomFilterKeyword.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class CustomFilterKeyword
+ {
+ public long Id { get; set; }
+ public long CustomFilterId { get; set; }
+ public string Keyword { get; set; } = null!;
+ public bool WholeWord { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual CustomFilter CustomFilter { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/CustomFilterStatus.cs b/src/Domain/Models/CustomFilterStatus.cs
new file mode 100644
index 0000000..47fe785
--- /dev/null
+++ b/src/Domain/Models/CustomFilterStatus.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class CustomFilterStatus
+ {
+ public long Id { get; set; }
+ public long CustomFilterId { get; set; }
+ public long StatusId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual CustomFilter CustomFilter { get; set; } = null!;
+ public virtual Status Status { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Device.cs b/src/Domain/Models/Device.cs
new file mode 100644
index 0000000..0c5188f
--- /dev/null
+++ b/src/Domain/Models/Device.cs
@@ -0,0 +1,20 @@
+namespace Smilodon.Domain.Models
+{
+ public class Device
+ {
+ public long Id { get; set; }
+ public long? AccessTokenId { get; set; }
+ public long? AccountId { get; set; }
+ public string DeviceId { get; set; } = null!;
+ public string Name { get; set; } = null!;
+ public string FingerprintKey { get; set; } = null!;
+ public string IdentityKey { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual OAuthAccessToken? AccessToken { get; set; }
+ public virtual Account? Account { get; set; }
+ public virtual ICollection EncryptedMessages { get; set; } = new HashSet();
+ public virtual ICollection OneTimeKeys { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/DomainAllow.cs b/src/Domain/Models/DomainAllow.cs
new file mode 100644
index 0000000..4941e4b
--- /dev/null
+++ b/src/Domain/Models/DomainAllow.cs
@@ -0,0 +1,10 @@
+namespace Smilodon.Domain.Models
+{
+ public class DomainAllow
+ {
+ public long Id { get; set; }
+ public string Domain { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ }
+}
diff --git a/src/Domain/Models/DomainBlock.cs b/src/Domain/Models/DomainBlock.cs
new file mode 100644
index 0000000..31be2b2
--- /dev/null
+++ b/src/Domain/Models/DomainBlock.cs
@@ -0,0 +1,16 @@
+namespace Smilodon.Domain.Models
+{
+ public class DomainBlock
+ {
+ public long Id { get; set; }
+ public string Domain { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public int? Severity { get; set; }
+ public bool RejectMedia { get; set; }
+ public bool RejectReports { get; set; }
+ public string? PrivateComment { get; set; }
+ public string? PublicComment { get; set; }
+ public bool Obfuscate { get; set; }
+ }
+}
diff --git a/src/Domain/Models/EmailDomainBlock.cs b/src/Domain/Models/EmailDomainBlock.cs
new file mode 100644
index 0000000..63e585c
--- /dev/null
+++ b/src/Domain/Models/EmailDomainBlock.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class EmailDomainBlock
+ {
+ public long Id { get; set; }
+ public string Domain { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long? ParentId { get; set; }
+
+ public virtual EmailDomainBlock? Parent { get; set; }
+ public virtual ICollection InverseParent { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/EncryptedMessage.cs b/src/Domain/Models/EncryptedMessage.cs
new file mode 100644
index 0000000..31e29a3
--- /dev/null
+++ b/src/Domain/Models/EncryptedMessage.cs
@@ -0,0 +1,19 @@
+namespace Smilodon.Domain.Models
+{
+ public class EncryptedMessage
+ {
+ public long Id { get; set; }
+ public long? DeviceId { get; set; }
+ public long? FromAccountId { get; set; }
+ public string FromDeviceId { get; set; } = null!;
+ public int Type { get; set; }
+ public string Body { get; set; } = null!;
+ public string Digest { get; set; } = null!;
+ public string MessageFranking { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Device? Device { get; set; }
+ public virtual Account? FromAccount { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Favourite.cs b/src/Domain/Models/Favourite.cs
new file mode 100644
index 0000000..8eb965b
--- /dev/null
+++ b/src/Domain/Models/Favourite.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class Favourite
+ {
+ public long Id { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long AccountId { get; set; }
+ public long StatusId { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Status Status { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/FeaturedTag.cs b/src/Domain/Models/FeaturedTag.cs
new file mode 100644
index 0000000..f934d40
--- /dev/null
+++ b/src/Domain/Models/FeaturedTag.cs
@@ -0,0 +1,17 @@
+namespace Smilodon.Domain.Models
+{
+ public class FeaturedTag
+ {
+ public long Id { get; set; }
+ public long AccountId { get; set; }
+ public long TagId { get; set; }
+ public long StatusesCount { get; set; }
+ public DateTime? LastStatusAt { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string? Name { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Tag Tag { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Follow.cs b/src/Domain/Models/Follow.cs
new file mode 100644
index 0000000..3c54bf0
--- /dev/null
+++ b/src/Domain/Models/Follow.cs
@@ -0,0 +1,19 @@
+namespace Smilodon.Domain.Models
+{
+ public class Follow
+ {
+ public long Id { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long AccountId { get; set; }
+ public long TargetAccountId { get; set; }
+ public bool ShowReblogs { get; set; }
+ public string? Uri { get; set; }
+ public bool Notify { get; set; }
+ public string[]? Languages { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Account TargetAccount { get; set; } = null!;
+ public virtual ICollection ListAccounts { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/FollowRecommendation.cs b/src/Domain/Models/FollowRecommendation.cs
new file mode 100644
index 0000000..dd8bbe8
--- /dev/null
+++ b/src/Domain/Models/FollowRecommendation.cs
@@ -0,0 +1,9 @@
+namespace Smilodon.Domain.Models
+{
+ public class FollowRecommendation
+ {
+ public long? AccountId { get; set; }
+ public decimal? Rank { get; set; }
+ public string[]? Reason { get; set; }
+ }
+}
diff --git a/src/Domain/Models/FollowRecommendationSuppression.cs b/src/Domain/Models/FollowRecommendationSuppression.cs
new file mode 100644
index 0000000..7205119
--- /dev/null
+++ b/src/Domain/Models/FollowRecommendationSuppression.cs
@@ -0,0 +1,12 @@
+namespace Smilodon.Domain.Models
+{
+ public class FollowRecommendationSuppression
+ {
+ public long Id { get; set; }
+ public long AccountId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/FollowRequest.cs b/src/Domain/Models/FollowRequest.cs
new file mode 100644
index 0000000..362d3df
--- /dev/null
+++ b/src/Domain/Models/FollowRequest.cs
@@ -0,0 +1,18 @@
+namespace Smilodon.Domain.Models
+{
+ public class FollowRequest
+ {
+ public long Id { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long AccountId { get; set; }
+ public long TargetAccountId { get; set; }
+ public bool ShowReblogs { get; set; }
+ public string? Uri { get; set; }
+ public bool Notify { get; set; }
+ public string[]? Languages { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Account TargetAccount { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Identity.cs b/src/Domain/Models/Identity.cs
new file mode 100644
index 0000000..424670e
--- /dev/null
+++ b/src/Domain/Models/Identity.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class Identity
+ {
+ public long Id { get; set; }
+ public string Provider { get; set; } = null!;
+ public string Uid { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long? UserId { get; set; }
+
+ public virtual User? User { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Import.cs b/src/Domain/Models/Import.cs
new file mode 100644
index 0000000..89a0af3
--- /dev/null
+++ b/src/Domain/Models/Import.cs
@@ -0,0 +1,19 @@
+namespace Smilodon.Domain.Models
+{
+ public class Import
+ {
+ public long Id { get; set; }
+ public int Type { get; set; }
+ public bool Approved { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string? DataFileName { get; set; }
+ public string? DataContentType { get; set; }
+ public int? DataFileSize { get; set; }
+ public DateTime? DataUpdatedAt { get; set; }
+ public long AccountId { get; set; }
+ public bool Overwrite { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Instance.cs b/src/Domain/Models/Instance.cs
new file mode 100644
index 0000000..e0e5ee4
--- /dev/null
+++ b/src/Domain/Models/Instance.cs
@@ -0,0 +1,8 @@
+namespace Smilodon.Domain.Models
+{
+ public class Instance
+ {
+ public string? Domain { get; set; }
+ public long? AccountsCount { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Invite.cs b/src/Domain/Models/Invite.cs
new file mode 100644
index 0000000..647abbb
--- /dev/null
+++ b/src/Domain/Models/Invite.cs
@@ -0,0 +1,19 @@
+namespace Smilodon.Domain.Models
+{
+ public class Invite
+ {
+ public long Id { get; set; }
+ public long UserId { get; set; }
+ public string Code { get; set; } = null!;
+ public DateTime? ExpiresAt { get; set; }
+ public int? MaxUses { get; set; }
+ public int Uses { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public bool Autofollow { get; set; }
+ public string? Comment { get; set; }
+
+ public virtual User User { get; set; } = null!;
+ public virtual ICollection Users { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/IpBlock.cs b/src/Domain/Models/IpBlock.cs
new file mode 100644
index 0000000..558b49b
--- /dev/null
+++ b/src/Domain/Models/IpBlock.cs
@@ -0,0 +1,15 @@
+using System.Net;
+
+namespace Smilodon.Domain.Models
+{
+ public class IpBlock
+ {
+ public long Id { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public DateTime? ExpiresAt { get; set; }
+ public IPAddress Ip { get; set; } = null!;
+ public int Severity { get; set; }
+ public string Comment { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/List.cs b/src/Domain/Models/List.cs
new file mode 100644
index 0000000..a60c1b3
--- /dev/null
+++ b/src/Domain/Models/List.cs
@@ -0,0 +1,15 @@
+namespace Smilodon.Domain.Models
+{
+ public class List
+ {
+ public long Id { get; set; }
+ public long AccountId { get; set; }
+ public string Title { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public int RepliesPolicy { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual ICollection ListAccounts { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/ListAccount.cs b/src/Domain/Models/ListAccount.cs
new file mode 100644
index 0000000..6a21dc0
--- /dev/null
+++ b/src/Domain/Models/ListAccount.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class ListAccount
+ {
+ public long Id { get; set; }
+ public long ListId { get; set; }
+ public long AccountId { get; set; }
+ public long? FollowId { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Follow? Follow { get; set; }
+ public virtual List List { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/LoginActivity.cs b/src/Domain/Models/LoginActivity.cs
new file mode 100644
index 0000000..92e1736
--- /dev/null
+++ b/src/Domain/Models/LoginActivity.cs
@@ -0,0 +1,19 @@
+using System.Net;
+
+namespace Smilodon.Domain.Models
+{
+ public class LoginActivity
+ {
+ public long Id { get; set; }
+ public long UserId { get; set; }
+ public string? AuthenticationMethod { get; set; }
+ public string? Provider { get; set; }
+ public bool? Success { get; set; }
+ public string? FailureReason { get; set; }
+ public IPAddress? Ip { get; set; }
+ public string? UserAgent { get; set; }
+ public DateTime? CreatedAt { get; set; }
+
+ public virtual User User { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Marker.cs b/src/Domain/Models/Marker.cs
new file mode 100644
index 0000000..d996a0e
--- /dev/null
+++ b/src/Domain/Models/Marker.cs
@@ -0,0 +1,15 @@
+namespace Smilodon.Domain.Models
+{
+ public class Marker
+ {
+ public long Id { get; set; }
+ public long? UserId { get; set; }
+ public string Timeline { get; set; } = null!;
+ public long LastReadId { get; set; }
+ public int LockVersion { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual User? User { get; set; }
+ }
+}
diff --git a/src/Domain/Models/MediaAttachment.cs b/src/Domain/Models/MediaAttachment.cs
new file mode 100644
index 0000000..2df3afb
--- /dev/null
+++ b/src/Domain/Models/MediaAttachment.cs
@@ -0,0 +1,33 @@
+namespace Smilodon.Domain.Models
+{
+ public class MediaAttachment
+ {
+ public long Id { get; set; }
+ public long? StatusId { get; set; }
+ public string? FileFileName { get; set; }
+ public string? FileContentType { get; set; }
+ public int? FileFileSize { get; set; }
+ public DateTime? FileUpdatedAt { get; set; }
+ public string RemoteUrl { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string? Shortcode { get; set; }
+ public int Type { get; set; }
+ public string? FileMeta { get; set; }
+ public long? AccountId { get; set; }
+ public string? Description { get; set; }
+ public long? ScheduledStatusId { get; set; }
+ public string? Blurhash { get; set; }
+ public int? Processing { get; set; }
+ public int? FileStorageSchemaVersion { get; set; }
+ public string? ThumbnailFileName { get; set; }
+ public string? ThumbnailContentType { get; set; }
+ public int? ThumbnailFileSize { get; set; }
+ public DateTime? ThumbnailUpdatedAt { get; set; }
+ public string? ThumbnailRemoteUrl { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual ScheduledStatus? ScheduledStatus { get; set; }
+ public virtual Status? Status { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Mention.cs b/src/Domain/Models/Mention.cs
new file mode 100644
index 0000000..7c6d59b
--- /dev/null
+++ b/src/Domain/Models/Mention.cs
@@ -0,0 +1,15 @@
+namespace Smilodon.Domain.Models
+{
+ public class Mention
+ {
+ public long Id { get; set; }
+ public long? StatusId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long? AccountId { get; set; }
+ public bool Silent { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Status? Status { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Mute.cs b/src/Domain/Models/Mute.cs
new file mode 100644
index 0000000..b20c54c
--- /dev/null
+++ b/src/Domain/Models/Mute.cs
@@ -0,0 +1,16 @@
+namespace Smilodon.Domain.Models
+{
+ public class Mute
+ {
+ public long Id { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public bool HideNotifications { get; set; }
+ public long AccountId { get; set; }
+ public long TargetAccountId { get; set; }
+ public DateTime? ExpiresAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Account TargetAccount { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Notification.cs b/src/Domain/Models/Notification.cs
new file mode 100644
index 0000000..4fafe7a
--- /dev/null
+++ b/src/Domain/Models/Notification.cs
@@ -0,0 +1,17 @@
+namespace Smilodon.Domain.Models
+{
+ public class Notification
+ {
+ public long Id { get; set; }
+ public long ActivityId { get; set; }
+ public string ActivityType { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long AccountId { get; set; }
+ public long FromAccountId { get; set; }
+ public string? Type { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Account FromAccount { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/OAuthAccessGrant.cs b/src/Domain/Models/OAuthAccessGrant.cs
new file mode 100644
index 0000000..b92e0a2
--- /dev/null
+++ b/src/Domain/Models/OAuthAccessGrant.cs
@@ -0,0 +1,18 @@
+namespace Smilodon.Domain.Models
+{
+ public class OAuthAccessGrant
+ {
+ public long Id { get; set; }
+ public string Token { get; set; } = null!;
+ public int ExpiresIn { get; set; }
+ public string RedirectUri { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime? RevokedAt { get; set; }
+ public string? Scopes { get; set; }
+ public long ApplicationId { get; set; }
+ public long ResourceOwnerId { get; set; }
+
+ public virtual OAuthApplication Application { get; set; } = null!;
+ public virtual User ResourceOwner { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/OAuthAccessToken.cs b/src/Domain/Models/OAuthAccessToken.cs
new file mode 100644
index 0000000..ce8d4b5
--- /dev/null
+++ b/src/Domain/Models/OAuthAccessToken.cs
@@ -0,0 +1,25 @@
+using System.Net;
+
+namespace Smilodon.Domain.Models
+{
+ public class OAuthAccessToken
+ {
+ public long Id { get; set; }
+ public string Token { get; set; } = null!;
+ public string? RefreshToken { get; set; }
+ public int? ExpiresIn { get; set; }
+ public DateTime? RevokedAt { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public string? Scopes { get; set; }
+ public long? ApplicationId { get; set; }
+ public long? ResourceOwnerId { get; set; }
+ public DateTime? LastUsedAt { get; set; }
+ public IPAddress? LastUsedIp { get; set; }
+
+ public virtual OAuthApplication? Application { get; set; }
+ public virtual User? ResourceOwner { get; set; }
+ public virtual ICollection Devices { get; set; } = new HashSet();
+ public virtual ICollection SessionActivations { get; set; } = new HashSet();
+ public virtual ICollection WebPushSubscriptions { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/OAuthApplication.cs b/src/Domain/Models/OAuthApplication.cs
new file mode 100644
index 0000000..1318996
--- /dev/null
+++ b/src/Domain/Models/OAuthApplication.cs
@@ -0,0 +1,24 @@
+namespace Smilodon.Domain.Models
+{
+ public class OAuthApplication
+ {
+ public long Id { get; set; }
+ public string Name { get; set; } = null!;
+ public string Uid { get; set; } = null!;
+ public string Secret { get; set; } = null!;
+ public string RedirectUri { get; set; } = null!;
+ public string Scopes { get; set; } = null!;
+ public DateTime? CreatedAt { get; set; }
+ public DateTime? UpdatedAt { get; set; }
+ public bool Superapp { get; set; }
+ public string? Website { get; set; }
+ public string? OwnerType { get; set; }
+ public long? OwnerId { get; set; }
+ public bool Confidential { get; set; }
+
+ public virtual User? Owner { get; set; }
+ public virtual ICollection OAuthAccessGrants { get; set; } = new HashSet();
+ public virtual ICollection OAuthAccessTokens { get; set; } = new HashSet();
+ public virtual ICollection Users { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/OneTimeKey.cs b/src/Domain/Models/OneTimeKey.cs
new file mode 100644
index 0000000..c9ba41b
--- /dev/null
+++ b/src/Domain/Models/OneTimeKey.cs
@@ -0,0 +1,15 @@
+namespace Smilodon.Domain.Models
+{
+ public class OneTimeKey
+ {
+ public long Id { get; set; }
+ public long? DeviceId { get; set; }
+ public string KeyId { get; set; } = null!;
+ public string Key { get; set; } = null!;
+ public string Signature { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Device? Device { get; set; }
+ }
+}
diff --git a/src/Domain/Models/PgheroSpaceStat.cs b/src/Domain/Models/PgheroSpaceStat.cs
new file mode 100644
index 0000000..e0ad123
--- /dev/null
+++ b/src/Domain/Models/PgheroSpaceStat.cs
@@ -0,0 +1,12 @@
+namespace Smilodon.Domain.Models
+{
+ public class PgheroSpaceStat
+ {
+ public long Id { get; set; }
+ public string? Database { get; set; }
+ public string? Schema { get; set; }
+ public string? Relation { get; set; }
+ public long? Size { get; set; }
+ public DateTime? CapturedAt { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Poll.cs b/src/Domain/Models/Poll.cs
new file mode 100644
index 0000000..2b49e71
--- /dev/null
+++ b/src/Domain/Models/Poll.cs
@@ -0,0 +1,24 @@
+namespace Smilodon.Domain.Models
+{
+ public class Poll
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public long? StatusId { get; set; }
+ public DateTime? ExpiresAt { get; set; }
+ public string[] Options { get; set; } = null!;
+ public long[] CachedTallies { get; set; } = null!;
+ public bool Multiple { get; set; }
+ public bool HideTotals { get; set; }
+ public long VotesCount { get; set; }
+ public DateTime? LastFetchedAt { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public int LockVersion { get; set; }
+ public long? VotersCount { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Status? Status { get; set; }
+ public virtual ICollection PollVotes { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/PollVote.cs b/src/Domain/Models/PollVote.cs
new file mode 100644
index 0000000..56f680c
--- /dev/null
+++ b/src/Domain/Models/PollVote.cs
@@ -0,0 +1,16 @@
+namespace Smilodon.Domain.Models
+{
+ public class PollVote
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public long? PollId { get; set; }
+ public int Choice { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string? Uri { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Poll? Poll { get; set; }
+ }
+}
diff --git a/src/Domain/Models/PreviewCard.cs b/src/Domain/Models/PreviewCard.cs
new file mode 100644
index 0000000..1613847
--- /dev/null
+++ b/src/Domain/Models/PreviewCard.cs
@@ -0,0 +1,34 @@
+namespace Smilodon.Domain.Models
+{
+ public class PreviewCard
+ {
+ public long Id { get; set; }
+ public string Url { get; set; } = null!;
+ public string Title { get; set; } = null!;
+ public string Description { get; set; } = null!;
+ public string? ImageFileName { get; set; }
+ public string? ImageContentType { get; set; }
+ public int? ImageFileSize { get; set; }
+ public DateTime? ImageUpdatedAt { get; set; }
+ public int Type { get; set; }
+ public string Html { get; set; } = null!;
+ public string AuthorName { get; set; } = null!;
+ public string AuthorUrl { get; set; } = null!;
+ public string ProviderName { get; set; } = null!;
+ public string ProviderUrl { get; set; } = null!;
+ public int Width { get; set; }
+ public int Height { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string EmbedUrl { get; set; } = null!;
+ public int? ImageStorageSchemaVersion { get; set; }
+ public string? Blurhash { get; set; }
+ public string? Language { get; set; }
+ public double? MaxScore { get; set; }
+ public DateTime? MaxScoreAt { get; set; }
+ public bool? Trendable { get; set; }
+ public int? LinkType { get; set; }
+
+ public virtual PreviewCardTrend PreviewCardTrend { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/PreviewCardProvider.cs b/src/Domain/Models/PreviewCardProvider.cs
new file mode 100644
index 0000000..1f83ff5
--- /dev/null
+++ b/src/Domain/Models/PreviewCardProvider.cs
@@ -0,0 +1,17 @@
+namespace Smilodon.Domain.Models
+{
+ public class PreviewCardProvider
+ {
+ public long Id { get; set; }
+ public string Domain { get; set; } = null!;
+ public string? IconFileName { get; set; }
+ public string? IconContentType { get; set; }
+ public long? IconFileSize { get; set; }
+ public DateTime? IconUpdatedAt { get; set; }
+ public bool? Trendable { get; set; }
+ public DateTime? ReviewedAt { get; set; }
+ public DateTime? RequestedReviewAt { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ }
+}
diff --git a/src/Domain/Models/PreviewCardStatus.cs b/src/Domain/Models/PreviewCardStatus.cs
new file mode 100644
index 0000000..a25919a
--- /dev/null
+++ b/src/Domain/Models/PreviewCardStatus.cs
@@ -0,0 +1,8 @@
+namespace Smilodon.Domain.Models
+{
+ public class PreviewCardStatus
+ {
+ public long PreviewCardId { get; set; }
+ public long StatusId { get; set; }
+ }
+}
diff --git a/src/Domain/Models/PreviewCardTrend.cs b/src/Domain/Models/PreviewCardTrend.cs
new file mode 100644
index 0000000..afbe6b9
--- /dev/null
+++ b/src/Domain/Models/PreviewCardTrend.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class PreviewCardTrend
+ {
+ public long Id { get; set; }
+ public long PreviewCardId { get; set; }
+ public double Score { get; set; }
+ public int Rank { get; set; }
+ public bool Allowed { get; set; }
+ public string? Language { get; set; }
+
+ public virtual PreviewCard PreviewCard { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Relay.cs b/src/Domain/Models/Relay.cs
new file mode 100644
index 0000000..5b3049a
--- /dev/null
+++ b/src/Domain/Models/Relay.cs
@@ -0,0 +1,12 @@
+namespace Smilodon.Domain.Models
+{
+ public class Relay
+ {
+ public long Id { get; set; }
+ public string InboxUrl { get; set; } = null!;
+ public string? FollowActivityId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public int State { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Report.cs b/src/Domain/Models/Report.cs
new file mode 100644
index 0000000..01e389f
--- /dev/null
+++ b/src/Domain/Models/Report.cs
@@ -0,0 +1,27 @@
+namespace Smilodon.Domain.Models
+{
+ public class Report
+ {
+ public long Id { get; set; }
+ public long[] StatusIds { get; set; } = null!;
+ public string Comment { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long AccountId { get; set; }
+ public long? ActionTakenByAccountId { get; set; }
+ public long TargetAccountId { get; set; }
+ public long? AssignedAccountId { get; set; }
+ public string? Uri { get; set; }
+ public bool? Forwarded { get; set; }
+ public int Category { get; set; }
+ public DateTime? ActionTakenAt { get; set; }
+ public long[]? RuleIds { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Account? ActionTakenByAccount { get; set; }
+ public virtual Account? AssignedAccount { get; set; }
+ public virtual Account TargetAccount { get; set; } = null!;
+ public virtual ICollection AccountWarnings { get; set; } = new HashSet();
+ public virtual ICollection ReportNotes { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/ReportNote.cs b/src/Domain/Models/ReportNote.cs
new file mode 100644
index 0000000..bae11f1
--- /dev/null
+++ b/src/Domain/Models/ReportNote.cs
@@ -0,0 +1,15 @@
+namespace Smilodon.Domain.Models
+{
+ public class ReportNote
+ {
+ public long Id { get; set; }
+ public string Content { get; set; } = null!;
+ public long ReportId { get; set; }
+ public long AccountId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Report Report { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Rule.cs b/src/Domain/Models/Rule.cs
new file mode 100644
index 0000000..fa37cd6
--- /dev/null
+++ b/src/Domain/Models/Rule.cs
@@ -0,0 +1,12 @@
+namespace Smilodon.Domain.Models
+{
+ public class Rule
+ {
+ public long Id { get; set; }
+ public int Priority { get; set; }
+ public DateTime? DeletedAt { get; set; }
+ public string Text { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ }
+}
diff --git a/src/Domain/Models/ScheduledStatus.cs b/src/Domain/Models/ScheduledStatus.cs
new file mode 100644
index 0000000..9ef2575
--- /dev/null
+++ b/src/Domain/Models/ScheduledStatus.cs
@@ -0,0 +1,13 @@
+namespace Smilodon.Domain.Models
+{
+ public class ScheduledStatus
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public DateTime? ScheduledAt { get; set; }
+ public string? Params { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual ICollection MediaAttachments { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/SessionActivation.cs b/src/Domain/Models/SessionActivation.cs
new file mode 100644
index 0000000..3e960aa
--- /dev/null
+++ b/src/Domain/Models/SessionActivation.cs
@@ -0,0 +1,20 @@
+using System.Net;
+
+namespace Smilodon.Domain.Models
+{
+ public class SessionActivation
+ {
+ public long Id { get; set; }
+ public string SessionId { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string UserAgent { get; set; } = null!;
+ public IPAddress? Ip { get; set; }
+ public long? AccessTokenId { get; set; }
+ public long UserId { get; set; }
+ public long? WebPushSubscriptionId { get; set; }
+
+ public virtual OAuthAccessToken? AccessToken { get; set; }
+ public virtual User User { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Setting.cs b/src/Domain/Models/Setting.cs
new file mode 100644
index 0000000..1db2cec
--- /dev/null
+++ b/src/Domain/Models/Setting.cs
@@ -0,0 +1,13 @@
+namespace Smilodon.Domain.Models
+{
+ public class Setting
+ {
+ public long Id { get; set; }
+ public string Var { get; set; } = null!;
+ public string? Value { get; set; }
+ public string? ThingType { get; set; }
+ public DateTime? CreatedAt { get; set; }
+ public DateTime? UpdatedAt { get; set; }
+ public long? ThingId { get; set; }
+ }
+}
diff --git a/src/Domain/Models/SiteUpload.cs b/src/Domain/Models/SiteUpload.cs
new file mode 100644
index 0000000..4e18f3f
--- /dev/null
+++ b/src/Domain/Models/SiteUpload.cs
@@ -0,0 +1,16 @@
+namespace Smilodon.Domain.Models
+{
+ public class SiteUpload
+ {
+ public long Id { get; set; }
+ public string Var { get; set; } = null!;
+ public string? FileFileName { get; set; }
+ public string? FileContentType { get; set; }
+ public int? FileFileSize { get; set; }
+ public DateTime? FileUpdatedAt { get; set; }
+ public string? Meta { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string? Blurhash { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Status.cs b/src/Domain/Models/Status.cs
new file mode 100644
index 0000000..564f411
--- /dev/null
+++ b/src/Domain/Models/Status.cs
@@ -0,0 +1,46 @@
+namespace Smilodon.Domain.Models
+{
+ public class Status
+ {
+ public long Id { get; set; }
+ public string? Uri { get; set; }
+ public string Text { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long? InReplyToId { get; set; }
+ public long? ReblogOfId { get; set; }
+ public string? Url { get; set; }
+ public bool Sensitive { get; set; }
+ public int Visibility { get; set; }
+ public string SpoilerText { get; set; } = null!;
+ public bool Reply { get; set; }
+ public string? Language { get; set; }
+ public long? ConversationId { get; set; }
+ public bool? Local { get; set; }
+ public long AccountId { get; set; }
+ public long? ApplicationId { get; set; }
+ public long? InReplyToAccountId { get; set; }
+ public long? PollId { get; set; }
+ public DateTime? DeletedAt { get; set; }
+ public DateTime? EditedAt { get; set; }
+ public bool? Trendable { get; set; }
+ public long[]? OrderedMediaAttachmentIds { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Status? InReplyTo { get; set; }
+ public virtual Account? InReplyToAccount { get; set; }
+ public virtual Status? ReblogOf { get; set; }
+ public virtual StatusStat StatusStat { get; set; } = null!;
+ public virtual StatusTrend StatusTrend { get; set; } = null!;
+ public virtual ICollection Bookmarks { get; set; } = new HashSet();
+ public virtual ICollection CustomFilterStatuses { get; set; } = new HashSet();
+ public virtual ICollection Favourites { get; set; } = new HashSet();
+ public virtual ICollection InverseInReplyTo { get; set; } = new HashSet();
+ public virtual ICollection InverseReblogOf { get; set; } = new HashSet();
+ public virtual ICollection MediaAttachments { get; set; } = new HashSet();
+ public virtual ICollection Mentions { get; set; } = new HashSet();
+ public virtual ICollection Polls { get; set; } = new HashSet();
+ public virtual ICollection StatusEdits { get; set; } = new HashSet();
+ public virtual ICollection StatusPins { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/StatusEdit.cs b/src/Domain/Models/StatusEdit.cs
new file mode 100644
index 0000000..4acae7a
--- /dev/null
+++ b/src/Domain/Models/StatusEdit.cs
@@ -0,0 +1,20 @@
+namespace Smilodon.Domain.Models
+{
+ public class StatusEdit
+ {
+ public long Id { get; set; }
+ public long StatusId { get; set; }
+ public long? AccountId { get; set; }
+ public string Text { get; set; } = null!;
+ public string SpoilerText { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long[]? OrderedMediaAttachmentIds { get; set; }
+ public string[]? MediaDescriptions { get; set; }
+ public string[]? PollOptions { get; set; }
+ public bool? Sensitive { get; set; }
+
+ public virtual Account? Account { get; set; }
+ public virtual Status Status { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/StatusPin.cs b/src/Domain/Models/StatusPin.cs
new file mode 100644
index 0000000..8c7fb43
--- /dev/null
+++ b/src/Domain/Models/StatusPin.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class StatusPin
+ {
+ public long Id { get; set; }
+ public long AccountId { get; set; }
+ public long StatusId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Status Status { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/StatusStat.cs b/src/Domain/Models/StatusStat.cs
new file mode 100644
index 0000000..1e31b3a
--- /dev/null
+++ b/src/Domain/Models/StatusStat.cs
@@ -0,0 +1,15 @@
+namespace Smilodon.Domain.Models
+{
+ public class StatusStat
+ {
+ public long Id { get; set; }
+ public long StatusId { get; set; }
+ public long RepliesCount { get; set; }
+ public long ReblogsCount { get; set; }
+ public long FavouritesCount { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Status Status { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/StatusTag.cs b/src/Domain/Models/StatusTag.cs
new file mode 100644
index 0000000..210ac6d
--- /dev/null
+++ b/src/Domain/Models/StatusTag.cs
@@ -0,0 +1,11 @@
+namespace Smilodon.Domain.Models
+{
+ public class StatusTag
+ {
+ public long StatusId { get; set; }
+ public long TagId { get; set; }
+
+ public virtual Status Status { get; set; } = null!;
+ public virtual Tag Tag { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/StatusTrend.cs b/src/Domain/Models/StatusTrend.cs
new file mode 100644
index 0000000..0eea60f
--- /dev/null
+++ b/src/Domain/Models/StatusTrend.cs
@@ -0,0 +1,16 @@
+namespace Smilodon.Domain.Models
+{
+ public class StatusTrend
+ {
+ public long Id { get; set; }
+ public long StatusId { get; set; }
+ public long AccountId { get; set; }
+ public double Score { get; set; }
+ public int Rank { get; set; }
+ public bool Allowed { get; set; }
+ public string? Language { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Status Status { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/SystemKey.cs b/src/Domain/Models/SystemKey.cs
new file mode 100644
index 0000000..a2dc564
--- /dev/null
+++ b/src/Domain/Models/SystemKey.cs
@@ -0,0 +1,10 @@
+namespace Smilodon.Domain.Models
+{
+ public class SystemKey
+ {
+ public long Id { get; set; }
+ public byte[]? Key { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ }
+}
diff --git a/src/Domain/Models/Tag.cs b/src/Domain/Models/Tag.cs
new file mode 100644
index 0000000..f656f43
--- /dev/null
+++ b/src/Domain/Models/Tag.cs
@@ -0,0 +1,22 @@
+namespace Smilodon.Domain.Models
+{
+ public class Tag
+ {
+ public long Id { get; set; }
+ public string Name { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public bool? Usable { get; set; }
+ public bool? Trendable { get; set; }
+ public bool? Listable { get; set; }
+ public DateTime? ReviewedAt { get; set; }
+ public DateTime? RequestedReviewAt { get; set; }
+ public DateTime? LastStatusAt { get; set; }
+ public double? MaxScore { get; set; }
+ public DateTime? MaxScoreAt { get; set; }
+ public string? DisplayName { get; set; }
+
+ public virtual ICollection FeaturedTags { get; set; } = new HashSet();
+ public virtual ICollection TagFollows { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/TagFollow.cs b/src/Domain/Models/TagFollow.cs
new file mode 100644
index 0000000..568f851
--- /dev/null
+++ b/src/Domain/Models/TagFollow.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class TagFollow
+ {
+ public long Id { get; set; }
+ public long TagId { get; set; }
+ public long AccountId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual Tag Tag { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Tombstone.cs b/src/Domain/Models/Tombstone.cs
new file mode 100644
index 0000000..1946735
--- /dev/null
+++ b/src/Domain/Models/Tombstone.cs
@@ -0,0 +1,14 @@
+namespace Smilodon.Domain.Models
+{
+ public class Tombstone
+ {
+ public long Id { get; set; }
+ public long? AccountId { get; set; }
+ public string Uri { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public bool? ByModerator { get; set; }
+
+ public virtual Account? Account { get; set; }
+ }
+}
diff --git a/src/Domain/Models/UnavailableDomain.cs b/src/Domain/Models/UnavailableDomain.cs
new file mode 100644
index 0000000..3b06e53
--- /dev/null
+++ b/src/Domain/Models/UnavailableDomain.cs
@@ -0,0 +1,10 @@
+namespace Smilodon.Domain.Models
+{
+ public class UnavailableDomain
+ {
+ public long Id { get; set; }
+ public string Domain { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ }
+}
diff --git a/src/Domain/Models/User.cs b/src/Domain/Models/User.cs
new file mode 100644
index 0000000..fb2215c
--- /dev/null
+++ b/src/Domain/Models/User.cs
@@ -0,0 +1,62 @@
+using System.Net;
+
+namespace Smilodon.Domain.Models
+{
+ public class User
+ {
+ public long Id { get; set; }
+ public string Email { get; set; } = null!;
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public string EncryptedPassword { get; set; } = null!;
+ public string? ResetPasswordToken { get; set; }
+ public DateTime? ResetPasswordSentAt { get; set; }
+ public int SignInCount { get; set; }
+ public DateTime? CurrentSignInAt { get; set; }
+ public DateTime? LastSignInAt { get; set; }
+ public bool Admin { get; set; }
+ public string? ConfirmationToken { get; set; }
+ public DateTime? ConfirmedAt { get; set; }
+ public DateTime? ConfirmationSentAt { get; set; }
+ public string? UnconfirmedEmail { get; set; }
+ public string? Locale { get; set; }
+ public string? EncryptedOtpSecret { get; set; }
+ public string? EncryptedOtpSecretIv { get; set; }
+ public string? EncryptedOtpSecretSalt { get; set; }
+ public int? ConsumedTimestep { get; set; }
+ public bool OtpRequiredForLogin { get; set; }
+ public DateTime? LastEmailedAt { get; set; }
+ public string[]? OtpBackupCodes { get; set; }
+ public long AccountId { get; set; }
+ public bool Disabled { get; set; }
+ public bool Moderator { get; set; }
+ public long? InviteId { get; set; }
+ public string[]? ChosenLanguages { get; set; }
+ public long? CreatedByApplicationId { get; set; }
+ public bool Approved { get; set; }
+ public string? SignInToken { get; set; }
+ public DateTime? SignInTokenSentAt { get; set; }
+ public string? WebAuthnId { get; set; }
+ public IPAddress? SignUpIp { get; set; }
+ public bool? SkipSignInToken { get; set; }
+ public long? RoleId { get; set; }
+
+ public virtual Account Account { get; set; } = null!;
+ public virtual OAuthApplication? CreatedByApplication { get; set; }
+ public virtual Invite? Invite { get; set; }
+ public virtual UserRole? Role { get; set; }
+ public virtual WebSetting WebSetting { get; set; } = null!;
+ public virtual ICollection Backups { get; set; } = new HashSet();
+ public virtual ICollection Identities { get; set; } = new HashSet();
+ public virtual ICollection Invites { get; set; } = new HashSet();
+ public virtual ICollection LoginActivities { get; set; } = new HashSet();
+ public virtual ICollection Markers { get; set; } = new HashSet();
+ public virtual ICollection OAuthAccessGrants { get; set; } = new HashSet();
+ public virtual ICollection OAuthAccessTokens { get; set; } = new HashSet();
+ public virtual ICollection OAuthApplications { get; set; } = new HashSet();
+ public virtual ICollection SessionActivations { get; set; } = new HashSet();
+ public virtual ICollection UserInviteRequests { get; set; } = new HashSet();
+ public virtual ICollection WebPushSubscriptions { get; set; } = new HashSet();
+ public virtual ICollection WebAuthnCredentials { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/UserInviteRequest.cs b/src/Domain/Models/UserInviteRequest.cs
new file mode 100644
index 0000000..7e2c4b5
--- /dev/null
+++ b/src/Domain/Models/UserInviteRequest.cs
@@ -0,0 +1,13 @@
+namespace Smilodon.Domain.Models
+{
+ public class UserInviteRequest
+ {
+ public long Id { get; set; }
+ public long? UserId { get; set; }
+ public string? Text { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual User? User { get; set; }
+ }
+}
diff --git a/src/Domain/Models/UserIp.cs b/src/Domain/Models/UserIp.cs
new file mode 100644
index 0000000..0ea3c3e
--- /dev/null
+++ b/src/Domain/Models/UserIp.cs
@@ -0,0 +1,11 @@
+using System.Net;
+
+namespace Smilodon.Domain.Models
+{
+ public class UserIp
+ {
+ public long? UserId { get; set; }
+ public IPAddress? Ip { get; set; }
+ public DateTime? UsedAt { get; set; }
+ }
+}
diff --git a/src/Domain/Models/UserRole.cs b/src/Domain/Models/UserRole.cs
new file mode 100644
index 0000000..cfa0784
--- /dev/null
+++ b/src/Domain/Models/UserRole.cs
@@ -0,0 +1,16 @@
+namespace Smilodon.Domain.Models
+{
+ public class UserRole
+ {
+ public long Id { get; set; }
+ public string Name { get; set; } = null!;
+ public string Color { get; set; } = null!;
+ public int Position { get; set; }
+ public long Permissions { get; set; }
+ public bool Highlighted { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual ICollection Users { get; set; } = new HashSet();
+ }
+}
diff --git a/src/Domain/Models/WebAuthnCredential.cs b/src/Domain/Models/WebAuthnCredential.cs
new file mode 100644
index 0000000..6c6e807
--- /dev/null
+++ b/src/Domain/Models/WebAuthnCredential.cs
@@ -0,0 +1,16 @@
+namespace Smilodon.Domain.Models
+{
+ public class WebAuthnCredential
+ {
+ public long Id { get; set; }
+ public string ExternalId { get; set; } = null!;
+ public string PublicKey { get; set; } = null!;
+ public string Nickname { get; set; } = null!;
+ public long SignCount { get; set; }
+ public long? UserId { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+
+ public virtual User? User { get; set; }
+ }
+}
diff --git a/src/Domain/Models/WebPushSubscription.cs b/src/Domain/Models/WebPushSubscription.cs
new file mode 100644
index 0000000..e7a4052
--- /dev/null
+++ b/src/Domain/Models/WebPushSubscription.cs
@@ -0,0 +1,18 @@
+namespace Smilodon.Domain.Models
+{
+ public class WebPushSubscription
+ {
+ public long Id { get; set; }
+ public string Endpoint { get; set; } = null!;
+ public string KeyP256dh { get; set; } = null!;
+ public string KeyAuth { get; set; } = null!;
+ public string? Data { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long? AccessTokenId { get; set; }
+ public long? UserId { get; set; }
+
+ public virtual OAuthAccessToken? AccessToken { get; set; }
+ public virtual User? User { get; set; }
+ }
+}
diff --git a/src/Domain/Models/WebSetting.cs b/src/Domain/Models/WebSetting.cs
new file mode 100644
index 0000000..2942ae9
--- /dev/null
+++ b/src/Domain/Models/WebSetting.cs
@@ -0,0 +1,13 @@
+namespace Smilodon.Domain.Models
+{
+ public class WebSetting
+ {
+ public long Id { get; set; }
+ public string? Data { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ public long UserId { get; set; }
+
+ public virtual User User { get; set; } = null!;
+ }
+}
diff --git a/src/Domain/Models/Webhook.cs b/src/Domain/Models/Webhook.cs
new file mode 100644
index 0000000..85feefd
--- /dev/null
+++ b/src/Domain/Models/Webhook.cs
@@ -0,0 +1,13 @@
+namespace Smilodon.Domain.Models
+{
+ public class Webhook
+ {
+ public long Id { get; set; }
+ public string Url { get; set; } = null!;
+ public string[] Events { get; set; } = null!;
+ public string Secret { get; set; } = null!;
+ public bool Enabled { get; set; }
+ public DateTime CreatedAt { get; set; }
+ public DateTime UpdatedAt { get; set; }
+ }
+}
diff --git a/src/Infrastructure/Infrastructure.csproj b/src/Infrastructure/Infrastructure.csproj
new file mode 100644
index 0000000..58d5827
--- /dev/null
+++ b/src/Infrastructure/Infrastructure.csproj
@@ -0,0 +1,24 @@
+
+
+
+ net7.0
+ enable
+ enable
+ true
+ Smilodon.Infrastructure
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
diff --git a/src/Infrastructure/Persistence/Configuration/AccountAliasEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountAliasEntityConfiguration.cs
new file mode 100644
index 0000000..4158710
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountAliasEntityConfiguration.cs
@@ -0,0 +1,45 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountAliasEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_aliases");
+
+ builder.HasKey(e => e.Id).HasName("account_aliases_pkey");
+
+ builder.HasIndex(e => e.AccountId).HasDatabaseName("index_account_aliases_on_account_id");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.Acct)
+ .HasColumnType("character varying")
+ .HasColumnName("acct")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.Property(e => e.Uri)
+ .HasColumnType("character varying")
+ .HasColumnName("uri")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountAliases)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_fc91575d08");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountConversationEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountConversationEntityConfiguration.cs
new file mode 100644
index 0000000..e5b3bd4
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountConversationEntityConfiguration.cs
@@ -0,0 +1,54 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountConversationEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_conversations");
+
+ builder.HasKey(e => e.Id).HasName("account_conversations_pkey");
+
+ builder.HasIndex(e => e.ConversationId)
+ .HasDatabaseName("index_account_conversations_on_conversation_id");
+
+ builder.HasIndex(e => new { e.AccountId, e.ConversationId, e.ParticipantAccountIds })
+ .HasDatabaseName("index_unique_conversations")
+ .IsUnique();
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.ConversationId).HasColumnName("conversation_id");
+
+ builder.Property(e => e.LastStatusId).HasColumnName("last_status_id");
+
+ builder.Property(e => e.LockVersion).HasColumnName("lock_version");
+
+ builder.Property(e => e.ParticipantAccountIds)
+ .HasColumnName("participant_account_ids")
+ .HasDefaultValueSql("'{}'::bigint[]");
+
+ builder.Property(e => e.StatusIds)
+ .HasColumnName("status_ids")
+ .HasDefaultValueSql("'{}'::bigint[]");
+
+ builder.Property(e => e.Unread).HasColumnName("unread");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountConversations)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_6f5278b6e9");
+
+ builder.HasOne(d => d.Conversation)
+ .WithMany(p => p.AccountConversations)
+ .HasForeignKey(d => d.ConversationId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_1491654f9f");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountDeletionRequestEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountDeletionRequestEntityConfiguration.cs
new file mode 100644
index 0000000..ea83072
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountDeletionRequestEntityConfiguration.cs
@@ -0,0 +1,35 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountDeletionRequestEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_deletion_requests");
+
+ builder.HasKey(e => e.Id).HasName("account_deletion_requests_pkey");
+
+ builder.HasIndex(e => e.AccountId).HasDatabaseName("index_account_deletion_requests_on_account_id");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountDeletionRequests)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_45bf2626b9");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountDomainBlockEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountDomainBlockEntityConfiguration.cs
new file mode 100644
index 0000000..ad3a7ba
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountDomainBlockEntityConfiguration.cs
@@ -0,0 +1,41 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountDomainBlockEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_domain_blocks");
+
+ builder.HasKey(e => e.Id).HasName("account_domain_blocks_pkey");
+
+ builder.HasIndex(e => new { e.AccountId, e.Domain })
+ .HasDatabaseName("index_account_domain_blocks_on_account_id_and_domain")
+ .IsUnique();
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.Domain)
+ .HasColumnType("character varying")
+ .HasColumnName("domain");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountDomainBlocks)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_206c6029bd");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountEntityConfiguration.cs
new file mode 100644
index 0000000..584700b
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountEntityConfiguration.cs
@@ -0,0 +1,198 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("accounts");
+
+ builder.HasKey(e => e.Id).HasName("accounts_pkey");
+
+ builder.HasIndex(e => e.MovedToAccountId)
+ .HasDatabaseName("index_accounts_on_moved_to_account_id")
+ .HasFilter("(moved_to_account_id IS NOT NULL)");
+
+ builder.HasIndex(e => e.Uri).HasDatabaseName("index_accounts_on_uri");
+
+ builder.HasIndex(e => e.Url)
+ .HasDatabaseName("index_accounts_on_url")
+ .HasFilter("(url IS NOT NULL)")
+ .HasOperators("text_pattern_ops");
+
+ builder.Property(e => e.Id)
+ .HasColumnName("id")
+ .HasDefaultValueSql("timestamp_id('accounts'::text)");
+
+ builder.Property(e => e.ActorType)
+ .HasColumnType("character varying")
+ .HasColumnName("actor_type");
+
+ builder.Property(e => e.AlsoKnownAs)
+ .HasColumnType("character varying[]")
+ .HasColumnName("also_known_as");
+
+ builder.Property(e => e.AvatarContentType)
+ .HasColumnType("character varying")
+ .HasColumnName("avatar_content_type");
+
+ builder.Property(e => e.AvatarFileName)
+ .HasColumnType("character varying")
+ .HasColumnName("avatar_file_name");
+
+ builder.Property(e => e.AvatarFileSize).HasColumnName("avatar_file_size");
+
+ builder.Property(e => e.AvatarRemoteUrl)
+ .HasColumnType("character varying")
+ .HasColumnName("avatar_remote_url");
+
+ builder.Property(e => e.AvatarStorageSchemaVersion).HasColumnName("avatar_storage_schema_version");
+
+ builder.Property(e => e.AvatarUpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("avatar_updated_at");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.DevicesUrl)
+ .HasColumnType("character varying")
+ .HasColumnName("devices_url");
+
+ builder.Property(e => e.Discoverable).HasColumnName("discoverable");
+
+ builder.Property(e => e.DisplayName)
+ .HasColumnType("character varying")
+ .HasColumnName("display_name")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.Domain)
+ .HasColumnType("character varying")
+ .HasColumnName("domain");
+
+ builder.Property(e => e.FeaturedCollectionUrl)
+ .HasColumnType("character varying")
+ .HasColumnName("featured_collection_url");
+
+ builder.Property(e => e.Fields)
+ .HasColumnType("jsonb")
+ .HasColumnName("fields");
+
+ builder.Property(e => e.FollowersUrl)
+ .HasColumnType("character varying")
+ .HasColumnName("followers_url")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.HeaderContentType)
+ .HasColumnType("character varying")
+ .HasColumnName("header_content_type");
+
+ builder.Property(e => e.HeaderFileName)
+ .HasColumnType("character varying")
+ .HasColumnName("header_file_name");
+
+ builder.Property(e => e.HeaderFileSize).HasColumnName("header_file_size");
+
+ builder.Property(e => e.HeaderRemoteUrl)
+ .HasColumnType("character varying")
+ .HasColumnName("header_remote_url")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.HeaderStorageSchemaVersion).HasColumnName("header_storage_schema_version");
+
+ builder.Property(e => e.HeaderUpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("header_updated_at");
+
+ builder.Property(e => e.HideCollections).HasColumnName("hide_collections");
+
+ builder.Property(e => e.InboxUrl)
+ .HasColumnType("character varying")
+ .HasColumnName("inbox_url")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.LastWebfingeredAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_webfingered_at");
+
+ builder.Property(e => e.Locked).HasColumnName("locked");
+
+ builder.Property(e => e.Memorial).HasColumnName("memorial");
+
+ builder.Property(e => e.MovedToAccountId).HasColumnName("moved_to_account_id");
+
+ builder.Property(e => e.Note)
+ .HasColumnName("note")
+ .HasDefaultValueSql("''::text");
+
+ builder.Property(e => e.OutboxUrl)
+ .HasColumnType("character varying")
+ .HasColumnName("outbox_url")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.PrivateKey).HasColumnName("private_key");
+
+ builder.Property(e => e.Protocol).HasColumnName("protocol");
+
+ builder.Property(e => e.PublicKey)
+ .HasColumnName("public_key")
+ .HasDefaultValueSql("''::text");
+
+ builder.Property(e => e.RequestedReviewAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("requested_review_at");
+
+ builder.Property(e => e.ReviewedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("reviewed_at");
+
+ builder.Property(e => e.SensitizedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("sensitized_at");
+
+ builder.Property(e => e.SharedInboxUrl)
+ .HasColumnType("character varying")
+ .HasColumnName("shared_inbox_url")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.SilencedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("silenced_at");
+
+ builder.Property(e => e.SuspendedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("suspended_at");
+
+ builder.Property(e => e.SuspensionOrigin).HasColumnName("suspension_origin");
+
+ builder.Property(e => e.Trendable).HasColumnName("trendable");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.Property(e => e.Uri)
+ .HasColumnType("character varying")
+ .HasColumnName("uri")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.Url)
+ .HasColumnType("character varying")
+ .HasColumnName("url");
+
+ builder.Property(e => e.Username)
+ .HasColumnType("character varying")
+ .HasColumnName("username")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.HasOne(d => d.MovedToAccount)
+ .WithMany(p => p.InverseMovedToAccount)
+ .HasForeignKey(d => d.MovedToAccountId)
+ .OnDelete(DeleteBehavior.SetNull)
+ .HasConstraintName("fk_rails_2320833084");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountMigrationEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountMigrationEntityConfiguration.cs
new file mode 100644
index 0000000..8436db0
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountMigrationEntityConfiguration.cs
@@ -0,0 +1,54 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountMigrationEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_migrations");
+
+ builder.HasKey(e => e.Id).HasName("account_migrations_pkey");
+
+ builder.HasIndex(e => e.AccountId).HasDatabaseName("index_account_migrations_on_account_id");
+
+ builder.HasIndex(e => e.TargetAccountId)
+ .HasDatabaseName("index_account_migrations_on_target_account_id")
+ .HasFilter("(target_account_id IS NOT NULL)");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.Acct)
+ .HasColumnType("character varying")
+ .HasColumnName("acct")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.FollowersCount).HasColumnName("followers_count");
+
+ builder.Property(e => e.TargetAccountId).HasColumnName("target_account_id");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountMigrationAccounts)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_c9f701caaf");
+
+ builder.HasOne(d => d.TargetAccount)
+ .WithMany(p => p.AccountMigrationTargetAccounts)
+ .HasForeignKey(d => d.TargetAccountId)
+ .OnDelete(DeleteBehavior.SetNull)
+ .HasConstraintName("fk_rails_d9a8dad070");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountModerationNoteEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountModerationNoteEntityConfiguration.cs
new file mode 100644
index 0000000..195a0a5
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountModerationNoteEntityConfiguration.cs
@@ -0,0 +1,47 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountModerationNoteEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_moderation_notes");
+
+ builder.HasKey(e => e.Id).HasName("account_moderation_notes_pkey");
+
+ builder.HasIndex(e => e.AccountId).HasDatabaseName("index_account_moderation_notes_on_account_id");
+
+ builder.HasIndex(e => e.TargetAccountId).HasDatabaseName("index_account_moderation_notes_on_target_account_id");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.Content).HasColumnName("content");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.TargetAccountId).HasColumnName("target_account_id");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountModerationNoteAccounts)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.ClientSetNull)
+ .HasConstraintName("fk_rails_3f8b75089b");
+
+ builder.HasOne(d => d.TargetAccount)
+ .WithMany(p => p.AccountModerationNoteTargetAccounts)
+ .HasForeignKey(d => d.TargetAccountId)
+ .OnDelete(DeleteBehavior.ClientSetNull)
+ .HasConstraintName("fk_rails_dd62ed5ac3");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountNoteEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountNoteEntityConfiguration.cs
new file mode 100644
index 0000000..6f778aa
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountNoteEntityConfiguration.cs
@@ -0,0 +1,49 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountNoteEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_notes");
+
+ builder.HasKey(e => e.Id).HasName("account_notes_pkey");
+
+ builder.HasIndex(e => new { e.AccountId, e.TargetAccountId })
+ .HasDatabaseName("index_account_notes_on_account_id_and_target_account_id")
+ .IsUnique();
+
+ builder.HasIndex(e => e.TargetAccountId).HasDatabaseName("index_account_notes_on_target_account_id");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.Comment).HasColumnName("comment");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.TargetAccountId).HasColumnName("target_account_id");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountNoteAccounts)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_4ee4503c69");
+
+ builder.HasOne(d => d.TargetAccount)
+ .WithMany(p => p.AccountNoteTargetAccounts)
+ .HasForeignKey(d => d.TargetAccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_2801b48f1a");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountPinEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountPinEntityConfiguration.cs
new file mode 100644
index 0000000..578cc9b
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountPinEntityConfiguration.cs
@@ -0,0 +1,47 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountPinEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_pins");
+
+ builder.HasKey(e => e.Id).HasName("account_pins_pkey");
+
+ builder.HasIndex(e => new { e.AccountId, e.TargetAccountId })
+ .HasDatabaseName("index_account_pins_on_account_id_and_target_account_id")
+ .IsUnique();
+
+ builder.HasIndex(e => e.TargetAccountId).HasDatabaseName("index_account_pins_on_target_account_id");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.TargetAccountId).HasColumnName("target_account_id");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountPinAccounts)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_d44979e5dd");
+
+ builder.HasOne(d => d.TargetAccount)
+ .WithMany(p => p.AccountPinTargetAccounts)
+ .HasForeignKey(d => d.TargetAccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_a176e26c37");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountStatEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountStatEntityConfiguration.cs
new file mode 100644
index 0000000..8cd9ff4
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountStatEntityConfiguration.cs
@@ -0,0 +1,46 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountStatEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_stats");
+
+ builder.HasKey(e => e.Id).HasName("account_stats_pkey");
+
+ builder.HasIndex(e => e.AccountId)
+ .HasDatabaseName("index_account_stats_on_account_id")
+ .IsUnique();
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.FollowersCount).HasColumnName("followers_count");
+
+ builder.Property(e => e.FollowingCount).HasColumnName("following_count");
+
+ builder.Property(e => e.LastStatusAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("last_status_at");
+
+ builder.Property(e => e.StatusesCount).HasColumnName("statuses_count");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithOne(p => p.AccountStat)
+ .HasForeignKey(d => d.AccountId)
+ .HasConstraintName("fk_rails_215bb31ff1");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountStatusesCleanupPolicyEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountStatusesCleanupPolicyEntityConfiguration.cs
new file mode 100644
index 0000000..b01b16e
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountStatusesCleanupPolicyEntityConfiguration.cs
@@ -0,0 +1,71 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountStatusesCleanupPolicyEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_statuses_cleanup_policies");
+
+ builder.HasKey(e => e.Id).HasName("account_statuses_cleanup_policies_pkey");
+
+ builder.HasIndex(e => e.AccountId).HasDatabaseName("index_account_statuses_cleanup_policies_on_account_id");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp(6) without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.Enabled)
+ .IsRequired()
+ .HasColumnName("enabled")
+ .HasDefaultValueSql("true");
+
+ builder.Property(e => e.KeepDirect)
+ .IsRequired()
+ .HasColumnName("keep_direct")
+ .HasDefaultValueSql("true");
+
+ builder.Property(e => e.KeepMedia).HasColumnName("keep_media");
+
+ builder.Property(e => e.KeepPinned)
+ .IsRequired()
+ .HasColumnName("keep_pinned")
+ .HasDefaultValueSql("true");
+
+ builder.Property(e => e.KeepPolls).HasColumnName("keep_polls");
+
+ builder.Property(e => e.KeepSelfBookmark)
+ .IsRequired()
+ .HasColumnName("keep_self_bookmark")
+ .HasDefaultValueSql("true");
+
+ builder.Property(e => e.KeepSelfFav)
+ .IsRequired()
+ .HasColumnName("keep_self_fav")
+ .HasDefaultValueSql("true");
+
+ builder.Property(e => e.MinFavs).HasColumnName("min_favs");
+
+ builder.Property(e => e.MinReblogs).HasColumnName("min_reblogs");
+
+ builder.Property(e => e.MinStatusAge)
+ .HasColumnName("min_status_age")
+ .HasDefaultValueSql("1209600");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp(6) without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountStatusesCleanupPolicies)
+ .HasForeignKey(d => d.AccountId)
+ .HasConstraintName("fk_rails_23d5f73cfe");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountSummaryEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountSummaryEntityConfiguration.cs
new file mode 100644
index 0000000..f205efe
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountSummaryEntityConfiguration.cs
@@ -0,0 +1,23 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountSummaryEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.HasNoKey();
+
+ builder.ToView("account_summaries");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.Language)
+ .HasColumnType("character varying")
+ .HasColumnName("language");
+
+ builder.Property(e => e.Sensitive).HasColumnName("sensitive");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountTagEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountTagEntityConfiguration.cs
new file mode 100644
index 0000000..a359113
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountTagEntityConfiguration.cs
@@ -0,0 +1,26 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountTagEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.HasNoKey();
+
+ builder.ToTable("accounts_tags");
+
+ builder.HasIndex(e => new { e.AccountId, e.TagId })
+ .HasDatabaseName("index_accounts_tags_on_account_id_and_tag_id");
+
+ builder.HasIndex(e => new { e.TagId, e.AccountId })
+ .HasDatabaseName("index_accounts_tags_on_tag_id_and_account_id")
+ .IsUnique();
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.TagId).HasColumnName("tag_id");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountWarningEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountWarningEntityConfiguration.cs
new file mode 100644
index 0000000..01a9244
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountWarningEntityConfiguration.cs
@@ -0,0 +1,67 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountWarningEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_warnings");
+
+ builder.HasKey(e => e.Id).HasName("account_warnings_pkey");
+
+ builder.HasIndex(e => e.AccountId).HasDatabaseName("index_account_warnings_on_account_id");
+
+ builder.HasIndex(e => e.TargetAccountId).HasDatabaseName("index_account_warnings_on_target_account_id");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.Action).HasColumnName("action");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.OverruledAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("overruled_at");
+
+ builder.Property(e => e.ReportId).HasColumnName("report_id");
+
+ builder.Property(e => e.StatusIds)
+ .HasColumnType("character varying[]")
+ .HasColumnName("status_ids");
+
+ builder.Property(e => e.TargetAccountId).HasColumnName("target_account_id");
+
+ builder.Property(e => e.Text)
+ .HasColumnName("text")
+ .HasDefaultValueSql("''::text");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AccountWarningAccounts)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.SetNull)
+ .HasConstraintName("fk_rails_a65a1bf71b");
+
+ builder.HasOne(d => d.Report)
+ .WithMany(p => p.AccountWarnings)
+ .HasForeignKey(d => d.ReportId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_8f2bab4b16");
+
+ builder.HasOne(d => d.TargetAccount)
+ .WithMany(p => p.AccountWarningTargetAccounts)
+ .HasForeignKey(d => d.TargetAccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_a7ebbb1e37");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AccountWarningPresetEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AccountWarningPresetEntityConfiguration.cs
new file mode 100644
index 0000000..7e8f7ff
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AccountWarningPresetEntityConfiguration.cs
@@ -0,0 +1,34 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AccountWarningPresetEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("account_warning_presets");
+
+ builder.HasKey(e => e.Id).HasName("account_warning_presets_pkey");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.Text)
+ .HasColumnName("text")
+ .HasDefaultValueSql("''::text");
+
+ builder.Property(e => e.Title)
+ .HasColumnType("character varying")
+ .HasColumnName("title")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AdminActionLogEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AdminActionLogEntityConfiguration.cs
new file mode 100644
index 0000000..f6b16c7
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AdminActionLogEntityConfiguration.cs
@@ -0,0 +1,61 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AdminActionLogEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder builder)
+ {
+ builder.ToTable("admin_action_logs");
+
+ builder.HasKey(e => e.Id).HasName("admin_action_logs_pkey");
+
+ builder.HasIndex(e => e.AccountId).HasDatabaseName("index_admin_action_logs_on_account_id");
+
+ builder.HasIndex(e => new { e.TargetType, e.TargetId })
+ .HasDatabaseName("index_admin_action_logs_on_target_type_and_target_id");
+
+ builder.Property(e => e.Id).HasColumnName("id");
+
+ builder.Property(e => e.AccountId).HasColumnName("account_id");
+
+ builder.Property(e => e.Action)
+ .HasColumnType("character varying")
+ .HasColumnName("action")
+ .HasDefaultValueSql("''::character varying");
+
+ builder.Property(e => e.CreatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("created_at");
+
+ builder.Property(e => e.HumanIdentifier)
+ .HasColumnType("character varying")
+ .HasColumnName("human_identifier");
+
+ builder.Property(e => e.Permalink)
+ .HasColumnType("character varying")
+ .HasColumnName("permalink");
+
+ builder.Property(e => e.RouteParam)
+ .HasColumnType("character varying")
+ .HasColumnName("route_param");
+
+ builder.Property(e => e.TargetId).HasColumnName("target_id");
+
+ builder.Property(e => e.TargetType)
+ .HasColumnType("character varying")
+ .HasColumnName("target_type");
+
+ builder.Property(e => e.UpdatedAt)
+ .HasColumnType("timestamp without time zone")
+ .HasColumnName("updated_at");
+
+ builder.HasOne(d => d.Account)
+ .WithMany(p => p.AdminActionLogs)
+ .HasForeignKey(d => d.AccountId)
+ .OnDelete(DeleteBehavior.Cascade)
+ .HasConstraintName("fk_rails_a7667297fa");
+ }
+}
\ No newline at end of file
diff --git a/src/Infrastructure/Persistence/Configuration/AnnouncementEntityConfiguration.cs b/src/Infrastructure/Persistence/Configuration/AnnouncementEntityConfiguration.cs
new file mode 100644
index 0000000..dc5a1f7
--- /dev/null
+++ b/src/Infrastructure/Persistence/Configuration/AnnouncementEntityConfiguration.cs
@@ -0,0 +1,51 @@
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata.Builders;
+using Smilodon.Domain.Models;
+
+namespace Smilodon.Infrastructure.Persistence.Configuration;
+
+public class AnnouncementEntityConfiguration : IEntityTypeConfiguration
+{
+ public void Configure(EntityTypeBuilder