feat: all of sql for release 1

This commit is contained in:
2025-06-16 20:30:58 +03:00
parent 6d844f211a
commit 8258ac0ad4
5 changed files with 1092 additions and 25 deletions

View File

@@ -8,39 +8,64 @@ import (
"github.com/jackc/pgx/v5/pgtype"
)
type BannedUser struct {
ID int64
UserID int64
Date pgtype.Timestamp
Reason pgtype.Text
ExpiresAt pgtype.Timestamp
BannedBy pgtype.Text
Pardoned pgtype.Bool
PardonedBy pgtype.Text
}
type ConfirmationCode struct {
ID int64
UserID int64
Type int32
Code string
CodeType int32
CodeHash string
ExpiresAt pgtype.Timestamp
Used pgtype.Bool
Deleted pgtype.Bool
}
type LoginInformation struct {
ID int64
UserID int64
Email pgtype.Text
PasswordHash string
TotpEncrypted pgtype.Text
Email2faEnabled pgtype.Bool
PasswordChangeDate pgtype.Timestamp
PasswordTimesChanged pgtype.Int4
ID int64
UserID int64
Email pgtype.Text
PasswordHash string
TotpEncrypted pgtype.Text
Email2faEnabled pgtype.Bool
PasswordChangeDate pgtype.Timestamp
}
type Profile struct {
ID int64
UserID int64
Name string
Bio pgtype.Text
AvatarUrl pgtype.Text
Birthday pgtype.Timestamp
Color pgtype.Text
ColorGrad pgtype.Text
}
type ProfileSetting struct {
ID int64
ProfileID int64
HideFulfilled pgtype.Bool
HideProfileDetails pgtype.Bool
HideForUnauthenticated pgtype.Bool
HideBirthday pgtype.Bool
HideDates pgtype.Bool
Captcha pgtype.Bool
FollowersOnlyInteraction pgtype.Bool
}
type Session struct {
ID int64
UserID int64
Guid string
Guid pgtype.UUID
Name pgtype.Text
Platform pgtype.Text
LatestIp pgtype.Text
@@ -53,6 +78,6 @@ type User struct {
ID int64
Username string
Verified pgtype.Bool
Banned pgtype.Bool
RegistrationDate pgtype.Timestamp
Deleted pgtype.Bool
}