Documentation ¶
Index ¶
- Variables
- func GetAgentConfigDB(ctx context.Context, defDB *gorm.DB) *gorm.DB
- type AgentConfig
- type AgentConfigRepo
- func (a *AgentConfigRepo) Create(ctx context.Context, item schema.AgentConfig) error
- func (a *AgentConfigRepo) Delete(ctx context.Context, id uint64) error
- func (a *AgentConfigRepo) Get(ctx context.Context, id uint64, opts ...schema.AgentConfigQueryOptions) (*schema.AgentConfig, error)
- func (a *AgentConfigRepo) Query(ctx context.Context, params schema.AgentConfigQueryParam, ...) (*schema.AgentConfigQueryResult, error)
- func (a *AgentConfigRepo) Update(ctx context.Context, id uint64, item schema.AgentConfig) error
- func (a *AgentConfigRepo) UpdateStatus(ctx context.Context, id uint64, status int) error
- type AgentConfigs
- type SchemaAgentConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var AgentConfigSet = wire.NewSet(wire.Struct(new(AgentConfigRepo), "*"))
Functions ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct { util.Model Name string `gorm:"column:name;unique" json:"name,omitempty"` Status *int `gorm:"index;"` // 状态(1:启用 0:禁用) AgentRate *float32 `gorm:"index;default:1;"` // 经销商费率 Memo string `gorm:"size:1024;"` // 备注 }
AgentConfig is config table to config an agent.
func (AgentConfig) ToSchemaAgentConfig ¶
func (a AgentConfig) ToSchemaAgentConfig() *schema.AgentConfig
type AgentConfigRepo ¶
func (*AgentConfigRepo) Create ¶
func (a *AgentConfigRepo) Create(ctx context.Context, item schema.AgentConfig) error
func (*AgentConfigRepo) Delete ¶
func (a *AgentConfigRepo) Delete(ctx context.Context, id uint64) error
func (*AgentConfigRepo) Get ¶
func (a *AgentConfigRepo) Get(ctx context.Context, id uint64, opts ...schema.AgentConfigQueryOptions) (*schema.AgentConfig, error)
func (*AgentConfigRepo) Query ¶
func (a *AgentConfigRepo) Query(ctx context.Context, params schema.AgentConfigQueryParam, opts ...schema.AgentConfigQueryOptions) (*schema.AgentConfigQueryResult, error)
func (*AgentConfigRepo) Update ¶
func (a *AgentConfigRepo) Update(ctx context.Context, id uint64, item schema.AgentConfig) error
func (*AgentConfigRepo) UpdateStatus ¶
type AgentConfigs ¶
type AgentConfigs []*AgentConfig
func (AgentConfigs) ToSchemaAgentConfigs ¶
func (a AgentConfigs) ToSchemaAgentConfigs() []*schema.AgentConfig
type SchemaAgentConfig ¶
type SchemaAgentConfig schema.AgentConfig
func (SchemaAgentConfig) ToAgentConfig ¶
func (a SchemaAgentConfig) ToAgentConfig() *AgentConfig
Click to show internal directories.
Click to hide internal directories.