mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
26 lines
457 B
Go
26 lines
457 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/uptrace/bun"
|
|
)
|
|
|
|
type PoolAccounts struct {
|
|
bun.BaseModel `bun:"accounts.pool_accounts"`
|
|
|
|
PoolID uuid.UUID `bun:",pk,notnull"`
|
|
AccountID AccountID `bun:",pk,notnull"`
|
|
}
|
|
|
|
type Pool struct {
|
|
bun.BaseModel `bun:"accounts.pools"`
|
|
|
|
ID uuid.UUID `bun:",pk,nullzero"`
|
|
Name string
|
|
CreatedAt time.Time
|
|
|
|
PoolAccounts []*PoolAccounts `bun:"rel:has-many,join:id=pool_id"`
|
|
}
|