feat(marketing): add user logo management module
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
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user