You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gojobs/model.go

23 lines
533 B

package gojobs
import (
"context"
"go.dtapp.net/gojobs/jobs_gorm_model"
)
// 创建模型
func (c *Client) autoMigrateTask(ctx context.Context) {
err := c.gormClient.Db.AutoMigrate(&jobs_gorm_model.Task{})
if err != nil {
c.zapLog.WithTraceId(ctx).Sugar().Errorf("创建模型:%s", err)
}
}
// 创建模型
func (c *Client) autoMigrateTaskLog(ctx context.Context) {
err := c.gormClient.Db.AutoMigrate(&jobs_gorm_model.TaskLog{})
if err != nil {
c.zapLog.WithTraceId(ctx).Sugar().Errorf("创建模型:%s", err)
}
}