CSS
This commit is contained in:
@@ -2,10 +2,32 @@ package db
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
)
|
||||
|
||||
// User is a user in the system
|
||||
type User struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
Username string `json:"username"`
|
||||
// Account is an account in the system
|
||||
type Account struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
AccountName string `json:"accountName"`
|
||||
APIKey string `json:"apiKey"`
|
||||
}
|
||||
|
||||
// AccountCreateInputFields yes
|
||||
type AccountCreateInputFields struct {
|
||||
Name string
|
||||
Values []string
|
||||
}
|
||||
|
||||
// AccountCreateInput is used as input struct for database creation of account
|
||||
type AccountCreateInput struct {
|
||||
ID uuid.UUID
|
||||
AccountName string
|
||||
APIKey string
|
||||
Fields []AccountCreateInputFields
|
||||
Password string
|
||||
}
|
||||
|
||||
// Db struct
|
||||
type Db struct {
|
||||
DbPool *pgxpool.Pool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user