Initial commit

This commit is contained in:
2026-06-03 01:52:56 +02:00
commit 190134af7b
17 changed files with 772 additions and 0 deletions

14
models/constants.go Normal file
View File

@@ -0,0 +1,14 @@
package models
// Roles
const (
RoleUser = "user"
RoleAdmin = "admin"
)
// ID-Types
const (
IDTypeSHARE = "share"
IDTypeEXPENSE = "expense"
IDTypeUSER = "user"
)

8
models/dbmodels.go Normal file
View File

@@ -0,0 +1,8 @@
package models
type User struct {
ID string `json:"id"`
Username string `json:"username"`
Password string `json:"password"`
Role string `json:"role"`
}

11
models/loginmodels.go Normal file
View File

@@ -0,0 +1,11 @@
package models
type RefreshToken struct {
ID string `json:"id"`
UserID string `json:"user_id"`
Token string `json:"token"`
ExpiresAt int64 `json:"expires_at"`
CreatedAt int64 `json:"created_at"`
Revoked bool `json:"revoked"`
DeviceInfo string `json:"device_info"`
}