Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { ID types.ID `db:"id"` Title string `db:"title"` Description string `db:"description"` ISBN string `db:"isbn"` AuthorID types.ID `db:"author_id"` Price decimal.Decimal `db:"price"` }
Book model
type Entity ¶
type Entity interface { common | business | Property }
Entity is an interface for entity constraints
type Property ¶
type Property interface { TermOfService }
type TermOfService ¶
type TermOfService struct {
TOS string `json:"tos"`
}
type User ¶
type User struct { ID types.UserID `db:"user_id"` Username types.Username `db:"username"` Password types.Password `db:"password"` Data UserData `jsonb:"user_data"` }
User is a model for user
type UserData ¶
type UserData struct { FirstName string `json:"firstname,omitempty"` LastName string `json:"lastname,omitempty"` Email string `json:"email,omitempty"` Plan string `json:"user_plan,omitempty"` Status UserStatus `json:"status,omitempty"` }
UserData is a model for user info
type UserStatus ¶
type UserStatus string
UserStatus codes
const ( UserStatusActive UserStatus = "" UserStatusNotActivated UserStatus = "user_status_not_activated" )
UserStatus codes
Click to show internal directories.
Click to hide internal directories.