Skip to content

Commit

Permalink
Merge pull request #57 from suyuan32/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
suyuan32 committed Jul 1, 2024
2 parents 77b643b + 71bd4bf commit 7e94884
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
10 changes: 5 additions & 5 deletions ent/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ent/schema/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func (Task) Indexes() []ent.Index {

func (Task) Annotations() []schema.Annotation {
return []schema.Annotation{
entsql.WithComments(true),
entsql.Annotation{Table: "sys_tasks"},
}
}
10 changes: 4 additions & 6 deletions ent/schema/task_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ func (TaskLog) Fields() []ent.Field {
field.Uint64("id"),
field.Time("started_at").Immutable().
Default(time.Now).
Comment("Task Started Time | 任务启动时间").
Annotations(entsql.WithComments(true)),
field.Time("finished_at").Comment("Task Finished Time | 任务完成时间").
Annotations(entsql.WithComments(true)),
field.Uint8("result").Comment("The Task Process Result | 任务执行结果").
Annotations(entsql.WithComments(true)),
Comment("Task Started Time | 任务启动时间"),
field.Time("finished_at").Comment("Task Finished Time | 任务完成时间"),
field.Uint8("result").Comment("The Task Process Result | 任务执行结果"),
}
}

Expand All @@ -38,6 +35,7 @@ func (TaskLog) Edges() []ent.Edge {

func (TaskLog) Annotations() []schema.Annotation {
return []schema.Annotation{
entsql.WithComments(true),
entsql.Annotation{Table: "sys_task_logs"},
}
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
entgo.io/ent v0.13.1
github.com/hibiken/asynq v0.24.1
github.com/redis/go-redis/v9 v9.5.3
github.com/suyuan32/simple-admin-common v1.4.8
github.com/suyuan32/simple-admin-common v1.4.9
github.com/zeromicro/go-zero v1.6.6
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.2
Expand Down Expand Up @@ -65,7 +65,7 @@ require (
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.54.0 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQ
github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho=
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8=
github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ=
github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc=
github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8=
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
github.com/redis/go-redis/v9 v9.0.3/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDOjzMvcuQHk=
Expand Down Expand Up @@ -181,8 +181,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/suyuan32/simple-admin-common v1.4.8 h1:Z3vTr6fPtxNdYAIAi4dTpeX35GDRHOGAr34TJonfCho=
github.com/suyuan32/simple-admin-common v1.4.8/go.mod h1:Q79p6QVBTklYBf5XiX88TfPFB5mVifxdpGkyf6LMfX0=
github.com/suyuan32/simple-admin-common v1.4.9 h1:zgz0Vs3I6KDnk6XPheDbWz77nz/S+gb7IfRxhs/KQU4=
github.com/suyuan32/simple-admin-common v1.4.9/go.mod h1:Edy3OfvqGvJsZLp/+CFN7Z/SGYpYBGlQAKpVIW48gKM=
github.com/suyuan32/simple-admin-tools v1.6.14 h1:BseLVlaDsXr/9JAPqJ33Nn07R1Dql5Hlm4pC7KgKV9E=
github.com/suyuan32/simple-admin-tools v1.6.14/go.mod h1:d5iXPYpTLZP+shYTEMDrgxvHK0ydstZBcUSKJHrV0/4=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down

0 comments on commit 7e94884

Please sign in to comment.