diff options
Diffstat (limited to 'internal/models/admin.go')
| -rw-r--r-- | internal/models/admin.go | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/internal/models/admin.go b/internal/models/admin.go new file mode 100644 index 0000000..5cf0f37 --- /dev/null +++ b/internal/models/admin.go @@ -0,0 +1,43 @@ +package models + +type Account struct { + APIKey string `json:"api_key"` + Name string `json:"name"` + Credits int `json:"credits"` + Unlimited bool `json:"unlimited"` + Disabled bool `json:"disabled"` + IsPremium bool `json:"is_premium"` + CreatedAt interface{} `json:"created_at,omitempty"` +} + +type AccountCreateRequest struct { + Name string `json:"name"` + Credits int `json:"credits,omitempty"` + Unlimited bool `json:"unlimited,omitempty"` + IsPremium bool `json:"is_premium,omitempty"` +} + +type AccountUpdateRequest struct { + Credits int `json:"credits,omitempty"` + Disabled bool `json:"disabled"` +} + +type AddCreditsRequest struct { + Credits int `json:"credits"` +} + +type SetCreditsRequest struct { + Credits int `json:"credits"` +} + +type DisableAccountRequest struct { + Disabled bool `json:"disabled"` +} + +type AdminResponse struct { + Success bool `json:"success,omitempty"` + Message string `json:"message,omitempty"` + Error string `json:"error,omitempty"` + Account *Account `json:"account,omitempty"` + Accounts []Account `json:"accounts,omitempty"` +} |
