From b0d79665183df11e0e28040a9d3702033907b7df Mon Sep 17 00:00:00 2001 From: vincent Date: Wed, 9 Jun 2021 11:58:41 +0800 Subject: [PATCH] fix xorm models with wrong name, using mapping name --- internal/models/business_group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/models/business_group.go b/internal/models/business_group.go index e0c30e7..f377661 100644 --- a/internal/models/business_group.go +++ b/internal/models/business_group.go @@ -5,7 +5,7 @@ import ( ) type BusinessGroup struct { - ID int64 `json:"id" xorm:"pk autoincr"` + ID int64 `json:"id" xorm:"'id' pk autoincr"` Name string `json:"name" xorm:"VARCHAR(255) not null comment('商户名称')"` Status string `json:"status" xorm:"VARCHAR(10) not null comment('状态|invalid|valid')"` CreatedAt time.Time `json:"created_at" xorm:"created"`