Documentation
¶
Index ¶
- Variables
- func GetDemoDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- type Demo
- type DemoRepo
- func (a *DemoRepo) Create(ctx context.Context, item schema.Demo) error
- func (a *DemoRepo) Delete(ctx context.Context, id uint64) error
- func (a *DemoRepo) Get(ctx context.Context, id uint64, opts ...schema.DemoQueryOptions) (*schema.Demo, error)
- func (a *DemoRepo) Query(ctx context.Context, params schema.DemoQueryParam, ...) (*schema.DemoQueryResult, error)
- func (a *DemoRepo) Update(ctx context.Context, id uint64, item schema.Demo) error
- func (a *DemoRepo) UpdateStatus(ctx context.Context, id uint64, status int) error
- type Demos
- type SchemaDemo
Constants ¶
This section is empty.
Variables ¶
DemoSet Injection wire
Functions ¶
Types ¶
type Demo ¶
type Demo struct { util.Model Code string `gorm:"size:50;index;"` // 编号 Name string `gorm:"size:50;index;"` // 名称 Memo string `gorm:"size:1024;"` // 备注 Status int `gorm:"type:tinyint;index;default:0;"` // 状态(1:启用 2:停用) Creator uint64 `gorm:""` // 创建者 }
Demo Demo entity
func (Demo) ToSchemaDemo ¶
ToSchemaDemo Convert to Demo schema
type DemoRepo ¶
func (*DemoRepo) Query ¶
func (a *DemoRepo) Query(ctx context.Context, params schema.DemoQueryParam, opts ...schema.DemoQueryOptions) (*schema.DemoQueryResult, error)
type Demos ¶
type Demos []*Demo
Demos Demo entity list
func (Demos) ToSchemaDemos ¶
ToSchemaDemos Convert to Demo schema list
type SchemaDemo ¶
SchemaDemo Demo schema
Click to show internal directories.
Click to hide internal directories.