Files
easywish/backend/internal/database/models.go
Nikolai Papin 249bbe4a98 feat: add user role support to database and queries;
fix: add max length validation for refresh token in RefreshRequest;
refactor: use named constants for cache durations in AuthService;
refactor: select all user columns in GetValidUserByLoginCredentials query;
2025-07-17 04:31:25 +03:00

86 lines
1.7 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.29.0
package database
import (
"github.com/jackc/pgx/v5/pgtype"
)
type BannedUser struct {
ID int64
UserID int64
Date pgtype.Timestamp
Reason *string
ExpiresAt pgtype.Timestamp
BannedBy *string
Pardoned *bool
PardonedBy *string
}
type ConfirmationCode struct {
ID int64
UserID int64
CodeType int32
CodeHash string
ExpiresAt pgtype.Timestamp
Used *bool
Deleted *bool
}
type LoginInformation struct {
ID int64
UserID int64
Email *string
PasswordHash string
TotpEncrypted *string
Email2faEnabled *bool
PasswordChangeDate pgtype.Timestamp
}
type Profile struct {
ID int64
UserID int64
Name string
Bio *string
AvatarUrl *string
Birthday pgtype.Timestamp
Color *string
ColorGrad *string
}
type ProfileSetting struct {
ID int64
ProfileID int64
HideFulfilled *bool
HideProfileDetails *bool
HideForUnauthenticated *bool
HideBirthday *bool
HideDates *bool
Captcha *bool
FollowersOnlyInteraction *bool
}
type Session struct {
ID int64
UserID int64
Guid pgtype.UUID
Name *string
Platform *string
LatestIp *string
LoginTime pgtype.Timestamp
LastRefreshExpTime pgtype.Timestamp
LastSeenDate pgtype.Timestamp
Terminated *bool
}
type User struct {
ID int64
Username string
Verified *bool
RegistrationDate pgtype.Timestamp
Role int32
Deleted *bool
}