add backend auth

This commit is contained in:
m
2026-07-14 09:47:55 +02:00
parent 6761141fed
commit 76ceafa56c
28 changed files with 1345 additions and 64 deletions
+17
View File
@@ -29,6 +29,15 @@ type FileTag struct {
FileID sql.NullString `json:"file_id"`
}
type RefreshToken struct {
ID string `json:"id"`
UserID string `json:"user_id"`
TokenHash string `json:"token_hash"`
ExpiresAt time.Time `json:"expires_at"`
Revoked bool `json:"revoked"`
CreatedAt time.Time `json:"created_at"`
}
type Tag struct {
ID string `json:"id"`
ParentTagID sql.NullString `json:"parent_tag_id"`
@@ -37,3 +46,11 @@ type Tag struct {
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type User struct {
ID string `json:"id"`
Username string `json:"username"`
PasswordHash string `json:"password_hash"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}