model

package
v1.5.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameTaskInfo = "task_info"
View Source
const TableNameTaskLog = "task_log"

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskInfo

type TaskInfo struct {
	*cool.Model
	JobId       string     `json:"jobId" gorm:"column:jobId;type:varchar(255);comment:任务ID"`
	RepeatConf  string     `json:"repeatConf" gorm:"column:repeatConf;comment:重复配置"`
	Name        string     `json:"name" gorm:"column:name;type:varchar(255);comment:任务名称"`
	Cron        string     `json:"cron" gorm:"column:cron;type:varchar(255);comment:cron表达式"`
	Limit       int        `json:"limit" gorm:"column:limit;comment:限制次数 不传为不限制"`
	Every       int        `json:"every" gorm:"column:every;comment:间隔时间 单位秒"`
	Remark      string     `json:"remark" gorm:"column:remark;type:varchar(255);comment:备注"`
	Status      int        `json:"status" gorm:"column:status;comment:状态 0:关闭 1:开启"`
	StartDate   gtime.Time `json:"startDate" gorm:"column:startDate;comment:开始时间"`
	EndDate     gtime.Time `json:"endDate" gorm:"column:endDate;comment:结束时间"`
	Data        string     `json:"data" gorm:"column:data;type:varchar(255);comment:数据"`
	Service     string     `json:"service" gorm:"column:service;type:varchar(255);comment:执行的服务"`
	Type        int        `json:"type" gorm:"column:type;comment:类型 0:系统 1:用户"`
	NextRunTime gtime.Time `json:"nextRunTime" gorm:"column:nextRunTime;comment:下次执行时间"`
	TaskType    int        `json:"taskType" gorm:"column:taskType;comment:任务类型 0:cron 1:时间间隔"`
}

TaskInfo mapped from table <task_info>

func NewTaskInfo

func NewTaskInfo() *TaskInfo

NewTaskInfo create a new TaskInfo

func (*TaskInfo) GroupName

func (*TaskInfo) GroupName() string

GroupName TaskInfo's table group

func (*TaskInfo) TableName

func (*TaskInfo) TableName() string

TableName TaskInfo's table name

type TaskLog added in v0.2.1

type TaskLog struct {
	*cool.Model
	TaskId uint64 `gorm:"column:taskId;comment:任务ID" json:"taskId"`
	Status uint8  `gorm:"column:status;not null;comment:状态 0:失败 1:成功" json:"status"`
	Detail string `gorm:"column:detail;comment:详情" json:"detail"`
}

TaskLog mapped from table <task_log>

func NewTaskLog added in v0.2.1

func NewTaskLog() *TaskLog

NewTaskLog create a new TaskLog

func (*TaskLog) GroupName added in v0.2.1

func (*TaskLog) GroupName() string

GroupName TaskLog's table group

func (*TaskLog) TableName added in v0.2.1

func (*TaskLog) TableName() string

TableName TaskLog's table name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL