feat: add app user routes (logout, user-info, avatar, tickets)

- Logout: clear device sessions on logout
- User info: return expiry/balance based on billing type
- Avatar upload: support jpg/png/gif/webp, max 2MB
- App tickets: create, reply, close tickets for app users
- Add ClosedAt field to Ticket model

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 18:09:05 +08:00
parent 5298f8f58e
commit f5343281a3
4 changed files with 504 additions and 0 deletions
+1
View File
@@ -427,6 +427,7 @@ type Ticket struct {
Status string `gorm:"size:20;default:open" json:"status"` // open, processing, resolved, closed
Priority string `gorm:"size:20;default:normal" json:"priority"` // low, normal, high, urgent
AssignedTo *uint `json:"assigned_to"` // 分配给的应用开发者ID或平台管理员ID
ClosedAt *time.Time `json:"closed_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`