refactor: reorganize modules and add Linux build tooling
This commit is contained in:
26
module/base/feedback/internal/models/feedback_accessory.go
Normal file
26
module/base/feedback/internal/models/feedback_accessory.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Package models 数据模型包,定义反馈相关的数据库模型
|
||||
package models
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/database"
|
||||
"git.apinb.com/bsm-sdk/core/types"
|
||||
)
|
||||
|
||||
// FeedbackAccessory 反馈附件模型
|
||||
// 用于存储反馈记录关联的附件信息
|
||||
type FeedbackAccessory struct {
|
||||
types.Std_IICUDS // 标准IICUDS字段(ID、Identity、CreatedAt、UpdatedAt、Status)
|
||||
ItemIdentity string `gorm:"column:item_identity;type:varchar(36);default:'';" json:"item_identity"` // 关联的反馈记录ID
|
||||
Title string `gorm:"column:title;type:varchar(255);default:''" json:"title"` // 附件标题
|
||||
FilePath string `gorm:"column:file_path;type:varchar(500);not null" json:"file_path"` // 附件文件地址
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 注册模型到数据库迁移表
|
||||
database.MigrateTables = append(database.MigrateTables, &FeedbackAccessory{})
|
||||
}
|
||||
|
||||
// TableName 返回数据库表名
|
||||
func (c *FeedbackAccessory) TableName() string {
|
||||
return "feedback_accessory" // 对应数据库表名
|
||||
}
|
||||
Reference in New Issue
Block a user