26 lines
907 B
Go
26 lines
907 B
Go
// Package models 数据模型包,定义反馈相关的数据库模型
|
||
package models
|
||
|
||
import (
|
||
"git.apinb.com/bsm-sdk/core/database"
|
||
"git.apinb.com/bsm-sdk/core/types"
|
||
)
|
||
|
||
// FeedbackImage 反馈图片模型
|
||
// 用于存储反馈记录关联的图片信息
|
||
type FeedbackImage struct {
|
||
types.Std_IICUDS // 标准IICUDS字段(ID、Identity、CreatedAt、UpdatedAt、Status)
|
||
ItemIdentity string `gorm:"column:item_identity;type:varchar(36);default:'';" json:"item_identity"` // 关联的反馈记录ID
|
||
URL string `gorm:"column:url;type:varchar(255);default:'';" json:"url"` // 图片URL地址
|
||
}
|
||
|
||
func init() {
|
||
// 注册模型到数据库迁移表
|
||
database.MigrateTables = append(database.MigrateTables, &FeedbackImage{})
|
||
}
|
||
|
||
// TableName 返回数据库表名
|
||
func (FeedbackImage) TableName() string {
|
||
return "feedback_images" // 对应数据库表名
|
||
}
|