b4170b4863
Users can now save uploaded logos to the backend (marketing_user_logos table), avoiding repeated uploads. Includes CRUD endpoints: list, save, delete with a per-user limit of 10 logos. Made-with: Cursor
17 lines
577 B
Go
17 lines
577 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type UserLogo struct {
|
|
ID uint `json:"id" gorm:"primaryKey;comment:主键ID"`
|
|
UserID uint `json:"user_id" gorm:"not null;index;comment:用户ID"`
|
|
URL string `json:"url" gorm:"size:500;not null;comment:Logo CDN地址"`
|
|
Filename string `json:"filename" gorm:"size:255;comment:原始文件名"`
|
|
FileSize int64 `json:"file_size" gorm:"comment:文件大小(字节)"`
|
|
CreatedAt time.Time `json:"created_at" gorm:"comment:创建时间"`
|
|
}
|
|
|
|
func (UserLogo) TableName() string {
|
|
return "marketing_user_logos"
|
|
}
|