This repository was archived by the owner on May 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 18 files changed +58
-71
lines changed Expand file tree Collapse file tree 18 files changed +58
-71
lines changed Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/dialect/entsql"
86 "entgo.io/ent/schema/edge"
@@ -26,10 +24,10 @@ func (Approval) Fields() []ent.Field {
2624 ).
2725 Default ("pending" ),
2826 field .Time ("created_at" ).
29- Default (time . Now ),
27+ Default (nowUTC ),
3028 field .Time ("updated_at" ).
31- Default (time . Now ).
32- UpdateDefault (time . Now ),
29+ Default (nowUTC ).
30+ UpdateDefault (nowUTC ),
3331 // Edges
3432 field .Int64 ("user_id" ),
3533 field .Int ("deployment_id" ),
Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/schema/edge"
86 "entgo.io/ent/schema/field"
@@ -29,10 +27,10 @@ func (Callback) Fields() []ent.Field {
2927 "unlock" ,
3028 ),
3129 field .Time ("created_at" ).
32- Default (time . Now ),
30+ Default (nowUTC ),
3331 field .Time ("updated_at" ).
34- Default (time . Now ).
35- UpdateDefault (time . Now ),
32+ Default (nowUTC ).
33+ UpdateDefault (nowUTC ),
3634 field .Int64 ("repo_id" ),
3735 }
3836}
Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/schema/edge"
86 "entgo.io/ent/schema/field"
@@ -25,10 +23,10 @@ func (ChatUser) Fields() []ent.Field {
2523 field .String ("bot_token" ).
2624 Sensitive (),
2725 field .Time ("created_at" ).
28- Default (time . Now ),
26+ Default (nowUTC ),
2927 field .Time ("updated_at" ).
30- Default (time . Now ).
31- UpdateDefault (time . Now ),
28+ Default (nowUTC ).
29+ UpdateDefault (nowUTC ),
3230 field .Int64 ("user_id" ),
3331 }
3432}
Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/dialect/entsql"
86 "entgo.io/ent/schema/edge"
@@ -56,10 +54,10 @@ func (Deployment) Fields() []ent.Field {
5654 field .Int ("required_approval_count" ).
5755 Default (0 ),
5856 field .Time ("created_at" ).
59- Default (time . Now ),
57+ Default (nowUTC ),
6058 field .Time ("updated_at" ).
61- Default (time . Now ).
62- UpdateDefault (time . Now ),
59+ Default (nowUTC ).
60+ UpdateDefault (nowUTC ),
6361 // Edges
6462 field .Int64 ("user_id" ),
6563 field .Int64 ("repo_id" ),
Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/schema/edge"
86 "entgo.io/ent/schema/field"
@@ -31,10 +29,10 @@ func (DeploymentStatistics) Fields() []ent.Field {
3129 field .Int ("lead_time_seconds" ).
3230 Default (0 ),
3331 field .Time ("created_at" ).
34- Default (time . Now ),
32+ Default (nowUTC ),
3533 field .Time ("updated_at" ).
36- Default (time . Now ).
37- UpdateDefault (time . Now ),
34+ Default (nowUTC ).
35+ UpdateDefault (nowUTC ),
3836 field .Int64 ("repo_id" ),
3937 }
4038}
Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/schema/edge"
86 "entgo.io/ent/schema/field"
@@ -22,10 +20,10 @@ func (DeploymentStatus) Fields() []ent.Field {
2220 field .String ("log_url" ).
2321 Optional (),
2422 field .Time ("created_at" ).
25- Default (time . Now ),
23+ Default (nowUTC ),
2624 field .Time ("updated_at" ).
27- Default (time . Now ).
28- UpdateDefault (time . Now ),
25+ Default (nowUTC ).
26+ UpdateDefault (nowUTC ),
2927
3028 // edges
3129 field .Int ("deployment_id" ),
Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/schema/edge"
86 "entgo.io/ent/schema/field"
@@ -29,7 +27,7 @@ func (Event) Fields() []ent.Field {
2927 "deleted" ,
3028 ),
3129 field .Time ("created_at" ).
32- Default (time . Now ),
30+ Default (nowUTC ),
3331 field .Int ("deployment_id" ).
3432 Optional (),
3533 field .Int ("approval_id" ).
Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/schema/edge"
86 "entgo.io/ent/schema/field"
@@ -22,7 +20,7 @@ func (Lock) Fields() []ent.Field {
2220 Optional ().
2321 Nillable (),
2422 field .Time ("created_at" ).
25- Default (time . Now ),
23+ Default (nowUTC ),
2624 // Edges
2725 field .Int64 ("user_id" ),
2826 field .Int64 ("repo_id" ),
Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/dialect"
86 "entgo.io/ent/schema/edge"
@@ -31,10 +29,10 @@ func (Perm) Fields() []ent.Field {
3129 dialect .MySQL : "timestamp(6)" ,
3230 }),
3331 field .Time ("created_at" ).
34- Default (time . Now ),
32+ Default (nowUTC ),
3533 field .Time ("updated_at" ).
36- Default (time . Now ).
37- UpdateDefault (time . Now ),
34+ Default (nowUTC ).
35+ UpdateDefault (nowUTC ),
3836 // Edges
3937 field .Int64 ("user_id" ),
4038 field .Int64 ("repo_id" ),
Original file line number Diff line number Diff line change 11package schema
22
33import (
4- "time"
5-
64 "entgo.io/ent"
75 "entgo.io/ent/dialect/entsql"
86 "entgo.io/ent/schema/edge"
@@ -30,10 +28,10 @@ func (Repo) Fields() []ent.Field {
3028 field .Int64 ("webhook_id" ).
3129 Optional (),
3230 field .Time ("created_at" ).
33- Default (time . Now ),
31+ Default (nowUTC ),
3432 field .Time ("updated_at" ).
35- Default (time . Now ).
36- UpdateDefault (time . Now ),
33+ Default (nowUTC ).
34+ UpdateDefault (nowUTC ),
3735 // Denormalization to sort with deployment.
3836 field .Time ("latest_deployed_at" ).
3937 Optional (),
You can’t perform that action at this time.
0 commit comments