Documentation ¶
Index ¶
- func Migrate(c conf.Database) error
- type ExampleFilter
- type ExampleRepo
- func (p ExampleRepo) CountByFilter(ctx context.Context, f ExampleFilter) (size int64, err error)
- func (p ExampleRepo) Delete(ctx context.Context, id int64) error
- func (p ExampleRepo) DeleteByFilter(ctx context.Context, f ExampleFilter) error
- func (p ExampleRepo) FindByFilter(ctx context.Context, f ExampleFilter, page *stores.PageInfo) ([]*ViewExample, error)
- func (p ExampleRepo) FindOne(ctx context.Context, id int64) (*ViewExample, error)
- func (p ExampleRepo) FindOneByFilter(ctx context.Context, f ExampleFilter) (*ViewExample, error)
- func (p ExampleRepo) Insert(ctx context.Context, data *ViewExample) error
- func (p ExampleRepo) MultiInsert(ctx context.Context, data []*ViewExample) error
- func (p ExampleRepo) Update(ctx context.Context, data *ViewExample) error
- type ProjectDetailFilter
- type ProjectDetailRepo
- func (p ProjectDetailRepo) CountByFilter(ctx context.Context, f ProjectDetailFilter) (size int64, err error)
- func (p ProjectDetailRepo) Delete(ctx context.Context, id int64) error
- func (p ProjectDetailRepo) DeleteByFilter(ctx context.Context, f ProjectDetailFilter) error
- func (p ProjectDetailRepo) FindByFilter(ctx context.Context, f ProjectDetailFilter, page *stores.PageInfo) ([]*ViewProjectDetail, error)
- func (p ProjectDetailRepo) FindOne(ctx context.Context, id int64) (*ViewProjectDetail, error)
- func (p ProjectDetailRepo) FindOneByFilter(ctx context.Context, f ProjectDetailFilter) (*ViewProjectDetail, error)
- func (p ProjectDetailRepo) Insert(ctx context.Context, data *ViewProjectDetail) error
- func (p ProjectDetailRepo) MultiInsert(ctx context.Context, data []*ViewProjectDetail) error
- func (p ProjectDetailRepo) Update(ctx context.Context, data *ViewProjectDetail) error
- type ProjectInfoFilter
- type ProjectInfoRepo
- func (p ProjectInfoRepo) CountByFilter(ctx context.Context, f ProjectInfoFilter) (size int64, err error)
- func (p ProjectInfoRepo) Delete(ctx context.Context, id int64) error
- func (p ProjectInfoRepo) DeleteByFilter(ctx context.Context, f ProjectInfoFilter) error
- func (p ProjectInfoRepo) FindByFilter(ctx context.Context, f ProjectInfoFilter, page *stores.PageInfo) ([]*ViewProjectInfo, error)
- func (p ProjectInfoRepo) FindOne(ctx context.Context, id int64) (*ViewProjectInfo, error)
- func (p ProjectInfoRepo) FindOneByFilter(ctx context.Context, f ProjectInfoFilter) (*ViewProjectInfo, error)
- func (p ProjectInfoRepo) Insert(ctx context.Context, data *ViewProjectInfo) error
- func (p ProjectInfoRepo) MultiInsert(ctx context.Context, data []*ViewProjectInfo) error
- func (p ProjectInfoRepo) Update(ctx context.Context, data *ViewProjectInfo) error
- type ViewExample
- type ViewProjectDetail
- type ViewProjectInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExampleFilter ¶
type ExampleFilter struct { }
type ExampleRepo ¶
type ExampleRepo struct {
// contains filtered or unexported fields
}
func NewExampleRepo ¶
func NewExampleRepo(in any) *ExampleRepo
func (ExampleRepo) CountByFilter ¶
func (p ExampleRepo) CountByFilter(ctx context.Context, f ExampleFilter) (size int64, err error)
func (ExampleRepo) DeleteByFilter ¶
func (p ExampleRepo) DeleteByFilter(ctx context.Context, f ExampleFilter) error
func (ExampleRepo) FindByFilter ¶
func (p ExampleRepo) FindByFilter(ctx context.Context, f ExampleFilter, page *stores.PageInfo) ([]*ViewExample, error)
func (ExampleRepo) FindOne ¶
func (p ExampleRepo) FindOne(ctx context.Context, id int64) (*ViewExample, error)
func (ExampleRepo) FindOneByFilter ¶
func (p ExampleRepo) FindOneByFilter(ctx context.Context, f ExampleFilter) (*ViewExample, error)
func (ExampleRepo) Insert ¶
func (p ExampleRepo) Insert(ctx context.Context, data *ViewExample) error
func (ExampleRepo) MultiInsert ¶
func (p ExampleRepo) MultiInsert(ctx context.Context, data []*ViewExample) error
批量插入 LightStrategyDevice 记录
func (ExampleRepo) Update ¶
func (p ExampleRepo) Update(ctx context.Context, data *ViewExample) error
type ProjectDetailFilter ¶
type ProjectDetailFilter struct { }
type ProjectDetailRepo ¶
type ProjectDetailRepo struct {
// contains filtered or unexported fields
}
func NewProjectDetailRepo ¶
func NewProjectDetailRepo(in any) *ProjectDetailRepo
func (ProjectDetailRepo) CountByFilter ¶
func (p ProjectDetailRepo) CountByFilter(ctx context.Context, f ProjectDetailFilter) (size int64, err error)
func (ProjectDetailRepo) Delete ¶
func (p ProjectDetailRepo) Delete(ctx context.Context, id int64) error
func (ProjectDetailRepo) DeleteByFilter ¶
func (p ProjectDetailRepo) DeleteByFilter(ctx context.Context, f ProjectDetailFilter) error
func (ProjectDetailRepo) FindByFilter ¶
func (p ProjectDetailRepo) FindByFilter(ctx context.Context, f ProjectDetailFilter, page *stores.PageInfo) ([]*ViewProjectDetail, error)
func (ProjectDetailRepo) FindOne ¶
func (p ProjectDetailRepo) FindOne(ctx context.Context, id int64) (*ViewProjectDetail, error)
func (ProjectDetailRepo) FindOneByFilter ¶
func (p ProjectDetailRepo) FindOneByFilter(ctx context.Context, f ProjectDetailFilter) (*ViewProjectDetail, error)
func (ProjectDetailRepo) Insert ¶
func (p ProjectDetailRepo) Insert(ctx context.Context, data *ViewProjectDetail) error
func (ProjectDetailRepo) MultiInsert ¶
func (p ProjectDetailRepo) MultiInsert(ctx context.Context, data []*ViewProjectDetail) error
批量插入 LightStrategyDevice 记录
func (ProjectDetailRepo) Update ¶
func (p ProjectDetailRepo) Update(ctx context.Context, data *ViewProjectDetail) error
type ProjectInfoFilter ¶
type ProjectInfoFilter struct { }
type ProjectInfoRepo ¶
type ProjectInfoRepo struct {
// contains filtered or unexported fields
}
func NewProjectInfoRepo ¶
func NewProjectInfoRepo(in any) *ProjectInfoRepo
func (ProjectInfoRepo) CountByFilter ¶
func (p ProjectInfoRepo) CountByFilter(ctx context.Context, f ProjectInfoFilter) (size int64, err error)
func (ProjectInfoRepo) Delete ¶
func (p ProjectInfoRepo) Delete(ctx context.Context, id int64) error
func (ProjectInfoRepo) DeleteByFilter ¶
func (p ProjectInfoRepo) DeleteByFilter(ctx context.Context, f ProjectInfoFilter) error
func (ProjectInfoRepo) FindByFilter ¶
func (p ProjectInfoRepo) FindByFilter(ctx context.Context, f ProjectInfoFilter, page *stores.PageInfo) ([]*ViewProjectInfo, error)
func (ProjectInfoRepo) FindOne ¶
func (p ProjectInfoRepo) FindOne(ctx context.Context, id int64) (*ViewProjectInfo, error)
func (ProjectInfoRepo) FindOneByFilter ¶
func (p ProjectInfoRepo) FindOneByFilter(ctx context.Context, f ProjectInfoFilter) (*ViewProjectInfo, error)
func (ProjectInfoRepo) Insert ¶
func (p ProjectInfoRepo) Insert(ctx context.Context, data *ViewProjectInfo) error
func (ProjectInfoRepo) MultiInsert ¶
func (p ProjectInfoRepo) MultiInsert(ctx context.Context, data []*ViewProjectInfo) error
批量插入 LightStrategyDevice 记录
func (ProjectInfoRepo) Update ¶
func (p ProjectInfoRepo) Update(ctx context.Context, data *ViewProjectInfo) error
type ViewExample ¶
type ViewExample struct {
ID int64 `gorm:"column:id;type:bigint;primary_key;AUTO_INCREMENT"` // id编号
}
示例
type ViewProjectDetail ¶
type ViewProjectDetail struct { ID int64 `gorm:"column:id;type:bigint;primary_key;AUTO_INCREMENT"` // id编号 Content string `gorm:"column:content;type:text"` //项目参数 ProjectID int64 `gorm:"column:project_id;type:bigint;NOT NULL"` //所属项目ID(雪花ID) stores.NoDelTime DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;index"` }
type ViewProjectInfo ¶
type ViewProjectInfo struct { ID int64 `gorm:"column:id;type:bigint;primary_key;AUTO_INCREMENT"` // id编号 //TenantCode stores.TenantCode `gorm:"column:tenant_code;uniqueIndex:ri_mi;type:VARCHAR(50);NOT NULL"` // 租户编码 //ProjectID stores.ProjectID `gorm:"column:projectID;type:bigint;NOT NULL"` // 所属项目ID(雪花ID) IndexImage string `gorm:"column:index_image;type:varchar(200)"` //图片地址 Name string `gorm:"column:name;type:varchar(50)"` //项目名称 Desc string `gorm:"column:desc;type:varchar(200)"` //项目描述 CreatedUserID int64 `gorm:"column:created_user_id;type:bigint;NOT NULL"` //创建者id Status int64 `gorm:"column:status;type:SMALLINT;default:1"` //项目状态 1: 已发布 2: 未发布 stores.NoDelTime DeletedTime stores.DeletedTime `gorm:"column:deleted_time;default:0;index"` Detail *ViewProjectDetail `gorm:"foreignKey:ProjectID;references:ID"` }
Click to show internal directories.
Click to hide internal directories.