Documentation
¶
Overview ¶
* @FilePath: /workflow-server/internal/biz/biz.go * @Author: maggot-code * @Date: 2023-08-13 02:15:06 * @LastEditors: maggot-code * @LastEditTime: 2023-08-27 16:36:51 * @Description:
* @FilePath: /workflow-server/internal/biz/oxygen.go * @Author: maggot-code * @Date: 2023-08-27 16:30:42 * @LastEditors: maggot-code * @LastEditTime: 2023-09-05 18:36:26 * @Description:
* @FilePath: /workflow-server/internal/biz/user.go * @Author: maggot-code * @Date: 2023-08-14 14:52:39 * @LastEditors: maggot-code * @LastEditTime: 2023-08-20 20:25:17 * @Description:
* @FilePath: /workflow-server/internal/biz/work.go * @Author: maggot-code * @Date: 2023-08-20 19:14:47 * @LastEditors: maggot-code * @LastEditTime: 2023-08-28 01:18:09 * @Description:
Index ¶
- Variables
- type Oxygen
- type OxygenRecord
- type OxygenRepo
- type OxygenUseCase
- func (oc *OxygenUseCase) CreateOxygen(ctx *gin.Context, u *User, w *Work) error
- func (oc *OxygenUseCase) FindOxygen(ctx *gin.Context, id uint) (*Oxygen, error)
- func (oc *OxygenUseCase) FinishAllRecord(ctx *gin.Context, o *Oxygen) (bool, error)
- func (oc *OxygenUseCase) GetOxygens(ctx *gin.Context, w *Work) ([]*Oxygen, error)
- func (oc *OxygenUseCase) RecordOxygen(ctx *gin.Context, oxygen *Oxygen) error
- type User
- type UserCodeToSession
- type UserRepo
- type UserUseCase
- type WechatError
- type Work
- type WorkRepo
- type WorkUseCase
- func (wc *WorkUseCase) CreateWork(ctx *gin.Context, u *User, w *Work) (*Work, error)
- func (wc *WorkUseCase) GetWork(ctx *gin.Context, id uint) (*Work, error)
- func (wc *WorkUseCase) MarkTime(ctx *gin.Context, u *User, w *Work) (*Work, error)
- func (wc *WorkUseCase) UpdateState(ctx *gin.Context, w *Work) error
Constants ¶
This section is empty.
Variables ¶
var ProviderSet = wire.NewSet(NewUserUseCase, NewOxygenUseCase, NewWorkUseCase)
Functions ¶
This section is empty.
Types ¶
type Oxygen ¶
type Oxygen struct {
orm.Model
UID uint `gorm:"column:uid" json:"uid"`
WID uint `gorm:"column:wid" json:"wid"`
RawData float64 `gorm:"column:raw_data" json:"raw_data"`
IntMap float64 `gorm:"column:int_map" json:"int_map"`
FloatMap float64 `gorm:"column:float_map" json:"float_map"`
CountData float64 `gorm:"column:count_data" json:"count_data"`
FixedData float64 `gorm:"column:fixed_data" json:"fixed_data"`
IsFixed uint8 `gorm:"column:is_fixed" json:"is_fixed"`
IsAutoPush uint8 `gorm:"column:is_auto_push" json:"is_auto_push"`
State uint8 `gorm:"column:state" json:"state"`
EffectTime carbon.DateTime `gorm:"column:effect_time" json:"effect_time"`
}
type OxygenRecord ¶
type OxygenRepo ¶
type OxygenRepo interface {
BatchCreate(ctx *gin.Context, oxygens []*Oxygen) error
QueryOnWork(ctx *gin.Context, w *Work) ([]*Oxygen, error)
QueryVoid(ctx *gin.Context, o *Oxygen) ([]*Oxygen, error)
QueryValid(ctx *gin.Context, o *Oxygen) (*Oxygen, error)
Find(ctx *gin.Context, id uint) (*Oxygen, error)
Save(ctx *gin.Context, o *Oxygen) error
Record(ctx *gin.Context, o *Oxygen) error
Finished(ctx *gin.Context, o *Oxygen) (bool, error)
}
type OxygenUseCase ¶
type OxygenUseCase struct {
// contains filtered or unexported fields
}
func NewOxygenUseCase ¶
func NewOxygenUseCase(or OxygenRepo) *OxygenUseCase
func (*OxygenUseCase) CreateOxygen ¶
func (*OxygenUseCase) FindOxygen ¶
func (*OxygenUseCase) FinishAllRecord ¶
func (*OxygenUseCase) GetOxygens ¶
func (*OxygenUseCase) RecordOxygen ¶
func (oc *OxygenUseCase) RecordOxygen(ctx *gin.Context, oxygen *Oxygen) error
type UserCodeToSession ¶
type UserCodeToSession struct {
User
WechatError
}
type UserUseCase ¶
type UserUseCase struct {
// contains filtered or unexported fields
}
func NewUserUseCase ¶
func NewUserUseCase(c *conf.Bootstrap, ur UserRepo) *UserUseCase
func (*UserUseCase) ExchangeSession ¶
type WechatError ¶
type Work ¶
type Work struct {
orm.Model
UID uint `gorm:"column:uid" json:"uid"`
State uint8 `gorm:"column:state" json:"state"`
StartTime carbon.DateTime `gorm:"column:start_time" json:"start_time"`
EndTime carbon.DateTime `gorm:"column:end_time" json:"end_time"`
MarkTime carbon.DateTime `gorm:"column:mark_time" json:"mark_time" binding:"required" time_format:"2006-01-02 15:04:05"`
}
type WorkUseCase ¶
type WorkUseCase struct {
// contains filtered or unexported fields
}
func NewWorkUseCase ¶
func NewWorkUseCase(wr WorkRepo) *WorkUseCase
func (*WorkUseCase) CreateWork ¶
func (*WorkUseCase) UpdateState ¶
func (wc *WorkUseCase) UpdateState(ctx *gin.Context, w *Work) error