From 936d3cf690ace9adfdfe0fb44193c11a0cb26d95 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 9 Jan 2025 17:28:46 +0200 Subject: Added goose for migrations, refactored SQL schema, server and client are broken --- internal/data/models.go | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'internal/data/models.go') diff --git a/internal/data/models.go b/internal/data/models.go index 3b5425f..bb0b271 100644 --- a/internal/data/models.go +++ b/internal/data/models.go @@ -9,6 +9,11 @@ import ( "github.com/kyren223/eko/pkg/snowflake" ) +type BlockedUser struct { + BlockingUserID snowflake.ID + BlockedUserID snowflake.ID +} + type Frequency struct { ID snowflake.ID NetworkID snowflake.ID @@ -18,6 +23,17 @@ type Frequency struct { Position int64 } +type Member struct { + UserID snowflake.ID + NetworkID snowflake.ID + JoinedAt string + IsMember bool + IsAdmin bool + IsMuted bool + IsBanned bool + BanReason *string +} + type Message struct { ID snowflake.ID SenderID snowflake.ID @@ -37,6 +53,12 @@ type Network struct { IsPublic bool } +type TrustedUser struct { + TrustingUserID snowflake.ID + TrustedUserID snowflake.ID + TrustedPublicKey []byte +} + type User struct { ID snowflake.ID Name string @@ -45,26 +67,3 @@ type User struct { IsPublicDM bool IsDeleted bool } - -type UserBlockedUser struct { - BlockerUserID snowflake.ID - BlockedUserID snowflake.ID -} - -type UserNetwork struct { - UserID snowflake.ID - NetworkID snowflake.ID - JoinedAt string - IsMember bool - IsAdmin bool - IsMuted bool - IsBanned bool - BanReason *string - Position *int64 -} - -type UserTrustedUser struct { - TrusterUserID snowflake.ID - TrustedUserID snowflake.ID - TrustedPublicKey []byte -} -- cgit v1.3.1