From 59126de88dcc1ff4f024758f79f19684ec55821a Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期四, 14 十二月 2023 11:49:36 +0800 Subject: [PATCH] string转int的问题 --- model/purchase/purchase_type.go | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/model/purchase/purchase_type.go b/model/purchase/purchase_type.go index 8fc0535..3e81ba2 100644 --- a/model/purchase/purchase_type.go +++ b/model/purchase/purchase_type.go @@ -6,9 +6,9 @@ type PurchaseType struct { global.GVA_MODEL - ID uint `gorm:"primarykey"` // 涓婚敭ID + ID uint `json:"id,string" gorm:"primarykey"` // 涓婚敭ID Name string `json:"name" form:"name" gorm:"type:varchar(255);not null;default '';comment:閲囪喘绫诲瀷"` // 閲囪喘绫诲瀷 - Sort int `json:"sort" form:"sort" gorm:"type:int(11);not null;default 0;comment:鎺掑簭"` // 鎺掑簭 + Sort int `json:"sort" form:"sort" gorm:"type:int(11);not null;default 0;comment:鎺掑簭"` // 鎺掑簭 Pin bool `json:"pin" form:"pin" gorm:"type:tinyint(1);not null;default 0;comment:閲囪喘鍚嶇О"` // 鏄惁缃《 } -- Gitblit v1.8.0