21 lines
818 B
Go
21 lines
818 B
Go
|
|
package entity
|
||
|
|
|
||
|
|
import "go.mongodb.org/mongo-driver/bson/primitive"
|
||
|
|
|
||
|
|
const ScheduleCollectionName = "job_schedules"
|
||
|
|
|
||
|
|
type Schedule struct {
|
||
|
|
ID primitive.ObjectID `bson:"_id,omitempty"`
|
||
|
|
TemplateType string `bson:"template_type"`
|
||
|
|
Scope string `bson:"scope"`
|
||
|
|
ScopeID string `bson:"scope_id"`
|
||
|
|
Enabled bool `bson:"enabled"`
|
||
|
|
Cron string `bson:"cron"`
|
||
|
|
Timezone string `bson:"timezone"`
|
||
|
|
PayloadTemplate map[string]any `bson:"payload_template"`
|
||
|
|
LastRunAt *int64 `bson:"last_run_at,omitempty"`
|
||
|
|
NextRunAt int64 `bson:"next_run_at"`
|
||
|
|
CreateAt int64 `bson:"create_at"`
|
||
|
|
UpdateAt int64 `bson:"update_at"`
|
||
|
|
}
|