feat(marketing): user profile update, ad placement management, logo limits
- Add PUT /auth/profile endpoint for nickname and avatar updates - Add ad_placements table and CRUD admin API for managing ad units - Add GET /marketing/ad-config public API for mini-program to fetch ad config - Reduce logo limit from 10 to 3 per user, add 2MB file size validation Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type AdPlacement struct {
|
||||
ID uint `json:"id" gorm:"primaryKey;comment:主键ID"`
|
||||
MiniProgramID uint `json:"mini_program_id" gorm:"not null;index;comment:小程序ID"`
|
||||
Name string `json:"name" gorm:"size:100;not null;comment:广告位名称"`
|
||||
AdType string `json:"ad_type" gorm:"size:50;not null;default:rewarded_video;comment:广告类型(rewarded_video/banner/interstitial)"`
|
||||
AdUnitID string `json:"ad_unit_id" gorm:"size:200;comment:微信广告单元ID"`
|
||||
Status int `json:"status" gorm:"default:1;comment:状态(0禁用/1启用)"`
|
||||
Description string `json:"description" gorm:"size:500;comment:备注说明"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"comment:创建时间"`
|
||||
UpdatedAt time.Time `json:"updated_at" gorm:"comment:更新时间"`
|
||||
}
|
||||
|
||||
func (AdPlacement) TableName() string {
|
||||
return "marketing_ad_placements"
|
||||
}
|
||||
Reference in New Issue
Block a user