From 6dec2342316aecf4084c8f4efb43f33fbb72892f Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期二, 09 四月 2024 14:07:43 +0800
Subject: [PATCH] 更新计量单位字典
---
models/file_template_attachment.go | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/models/file_template_attachment.go b/models/file_template_attachment.go
index 59f6853..a55c0db 100644
--- a/models/file_template_attachment.go
+++ b/models/file_template_attachment.go
@@ -10,11 +10,13 @@
type (
FileTemplateAttachment struct {
WmsModel
- Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
- Category constvar.FileTemplateCategory `json:"category" gorm:"type:int(11);comment:妯$増绉嶇被"`
- Name string `json:"name" gorm:"type:varchar(63);comment:妯$増鍚嶇О"`
- AttachmentId uint `json:"attachmentId" gorm:"comment:闄勪欢琛ㄥ閿�"`
- Attachment Attachment `json:"attachment" gorm:"foreignKey:AttachmentId;references:Id"`
+ Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
+ Category constvar.FileTemplateCategory `json:"category" gorm:"type:int(11);comment:妯$増绉嶇被"`
+ Name string `json:"name" gorm:"type:varchar(63);comment:妯$増鍚嶇О"`
+ //AttachmentId uint `json:"attachmentId" gorm:"comment:闄勪欢琛ㄥ閿�"`
+ //Attachment Attachment `json:"attachment" gorm:"foreignKey:AttachmentId;references:Id"`
+ TableInfo string `json:"tableInfo" gorm:"type:varchar(31);comment:琛ㄥ悕"`
+ FileUrl string `json:"fileUrl" gorm:"type:varchar(255);comment:鏂囦欢鍦板潃"`
}
FileTemplateAttachmentSearch struct {
FileTemplateAttachment
@@ -60,10 +62,10 @@
return slf
}
-func (slf *FileTemplateAttachmentSearch) SetPreload(preload bool) *FileTemplateAttachmentSearch {
- slf.Preload = preload
- return slf
-}
+//func (slf *FileTemplateAttachmentSearch) SetPreload(preload bool) *FileTemplateAttachmentSearch {
+// slf.Preload = preload
+// return slf
+//}
func (slf *FileTemplateAttachmentSearch) SetCategory(category constvar.FileTemplateCategory) *FileTemplateAttachmentSearch {
slf.Category = category
@@ -80,9 +82,9 @@
db = db.Order(slf.Order)
}
- if slf.Preload {
- db = db.Model(&FileTemplateAttachment{}).Preload("Attachment")
- }
+ //if slf.Preload {
+ // db = db.Model(&FileTemplateAttachment{}).Preload("Attachment")
+ //}
if int(slf.Category) != 0 {
db = db.Where("category=?", slf.Category)
--
Gitblit v1.8.0