Files
full/module/base/feedback/internal/models/feedback_images.go

26 lines
907 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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" // 对应数据库表名
}