From 8e941bd782f574597f19c980982afade4dc11748 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 08 十二月 2023 19:52:20 +0800 Subject: [PATCH] snowflake的id传参换成字符串 --- model/plc_brand.go | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/plc_brand.go b/model/plc_brand.go index 21a8505..85604b2 100644 --- a/model/plc_brand.go +++ b/model/plc_brand.go @@ -12,7 +12,7 @@ type ( // PlcBrand plc鍝佺墝 PlcBrand struct { - gorm.Model + CommonModel Name string `json:"name" gorm:"column:name;type:varchar(255);not null;default:''"` } @@ -54,7 +54,7 @@ func (slf *PlcBrandSearch) CreateBatch(records []*PlcBrand) error { var db = slf.build() - for _, record := range records{ + for _, record := range records { db.Create(record) } return nil -- Gitblit v1.8.0