2 コミット

作成者 SHA1 メッセージ 日付
  qianyuan 5a777946eb Merge branch 'master' of https://git.x2erp.com/qdy/go-svc-mercury 2ヶ月前
  qdy 0de9889886 支持多微服务和多数据库测试通过 2ヶ月前
1個のファイルの変更3行の追加1行の削除
  1. 3
    1
      tables/dim_store.go

+ 3
- 1
tables/dim_store.go ファイルの表示

@@ -15,7 +15,8 @@ func init() {
15 15
 			String("store_group_id", 32).Comment("所属店铺组ID").End().
16 16
 			String("region_code", 32).Comment("区域编码").End().
17 17
 			String("creator", 32).NotNull().Comment("创建人").End().
18
-			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End()
18
+			DateTime("created_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("创建时间").End().
19
+			DateTime("updated_at").NotNull().Default("CURRENT_TIMESTAMP").Comment("最后修改时间").End()
19 20
 		r.RegisterTable(tb.Build())
20 21
 	})
21 22
 }
@@ -28,6 +29,7 @@ type DimStore struct {
28 29
 	RegionCode   string    `gorm:"column:region_code;type:varchar(32);comment:区域编码"`
29 30
 	Creator      string    `gorm:"column:creator;type:varchar(32);not null;comment:创建人"`
30 31
 	CreatedAt    time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间"`
32
+	UpdatedAt    time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:最后修改时间"`
31 33
 	TenantId     string    `gorm:"column:tenant_id;type:varchar(8);comment:租户ID"`
32 34
 }
33 35
 

読み込み中…
キャンセル
保存