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:
nepiedg
2026-04-04 03:46:57 +08:00
parent 1eab1b99c1
commit b4170b4863
7 changed files with 223 additions and 1 deletions
+16
View File
@@ -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"
}