/*
 * 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

import (
	"mstore/pkg/uuid"
)

type Account struct {
	ID        uuid.UUID `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"  db:"updated_at"`
	CreatedBy uuid.UUID `json:"createdBy"  db:"created_by"`
	UpdatedBy uuid.UUID `json:"updatedBy"  db:"updated_by"`
}

type AccountShort struct {
	ID        uuid.UUID `json:"id"`
	Username  string    `json:"username"`
	Disabled  bool      `json:"disabled"`
	CreatedAt string    `json:"createdAt"`
	UpdatedAt string    `json:"updatedAt"`
	CreatedBy uuid.UUID `json:"createdBy"`
	UpdatedBy uuid.UUID `json:"updatedBy"`
	Grants    []Grant   `json:"grants"`
}
