Documentation ¶
Index ¶
Constants ¶
View Source
const ( TableNameTenant = "public.tenants" // TableNameTenant is the table name for the tenant model. TableNameBook = "books" // TableNameBook is the table name for the book model. )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { gorm.Model Name string `gorm:"column:name;size:255;not null;"` TenantSchema string `gorm:"column:tenant_schema"` Tenant Tenant `gorm:"foreignKey:TenantSchema;references:SchemaName"` }
Book is the book model.
func (Book) IsSharedModel ¶
type BookResponse ¶
BookResponse is the response body for a book.
type CreateTenantBody ¶
type CreateTenantBody struct {
DomainURL string `json:"domainUrl"`
}
CreateTenantBody is the request body for creating a tenant.
type Tenant ¶
type Tenant struct { gorm.Model multitenancy.TenantModel }
Tenant is the tenant model.
func (Tenant) IsSharedModel ¶
type TenantResponse ¶
TenantResponse is the response body for a tenant.
type UpdateBookBody ¶
type UpdateBookBody struct {
Name string `json:"name"`
}
UpdateBookBody is the request body for updating a book.
Click to show internal directories.
Click to hide internal directories.