working commit
This commit is contained in:
+33
-10
@@ -1,3 +1,13 @@
|
||||
/*
|
||||
* Copyright 2026 Oleg Borodin <onborodin@gmail.com>
|
||||
*
|
||||
* This work is published and licensed under a Creative Commons
|
||||
* Attribution-NonCommercial-NoDerivatives 4.0 International License.
|
||||
*
|
||||
* Distribution of this work is permitted, but commercial use and
|
||||
* modifications are strictly prohibited.
|
||||
*/
|
||||
|
||||
package descr
|
||||
|
||||
const (
|
||||
@@ -8,17 +18,30 @@ const (
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
ID int64 `json:"id" yaml:"id" db:"id"`
|
||||
Username string `json:"username" yaml:"username" db:"username"`
|
||||
Passhash string `json:"passhash" yaml:"passhash" db:"passhash"`
|
||||
Disabled bool `json:"disabled" yaml:"disabled" db:"disabled"`
|
||||
CreatedAt string `json:"createdAt" yaml:"createdAt" db:"created_at"`
|
||||
UpdatedAt string `json:"updatedAt,omitempty" yaml:"updatedAt,omitempty" db:"updated_at"`
|
||||
ID string `json:"id" db:"id"`
|
||||
Username string `json:"username" db:"username"`
|
||||
Passhash string `json:"passhash" db:"passhash"`
|
||||
Disabled bool `json:"disabled" db:"disabled"`
|
||||
CreatedAt string `json:"createdAt" db:"created_at"`
|
||||
UpdatedAt string `json:"updatedAt,omitempty" db:"updated_at"`
|
||||
}
|
||||
|
||||
type Grant struct {
|
||||
ID int64 `json:"id" yaml:"id" db:"id"`
|
||||
AccountID int64 `json:"accountID" yaml:"accountID" db:"account_id"`
|
||||
Operation string `json:"operation" yaml:"operation" db:"operation"`
|
||||
CreatedAt string `json:"createdAt" yaml:"createdAt" db:"created_at"`
|
||||
ID string `json:"id" db:"id"`
|
||||
AccountID string `json:"accountID" db:"account_id"`
|
||||
Operation string `json:"operation" db:"operation"`
|
||||
CreatedAt string `json:"createdAt" db:"created_at"`
|
||||
}
|
||||
|
||||
type GrantShortDescr struct {
|
||||
Operation string `json:"operation"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
}
|
||||
|
||||
type AccountShortDescr struct {
|
||||
Username string `json:"username"`
|
||||
Disabled bool `json:"disabled"`
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt,omitempty"`
|
||||
Grants []GrantShortDescr `json:"grants"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user