- Deleted old super.go file and moved all related HTTP handlers to new package structure under backend/app/http/super/v1. - Updated service imports in super.go and super_test.go to reflect new DTO paths. - Created new auth, contents, orders, tenants, and users handlers with corresponding routes and methods. - Added new DTO definitions for authentication and content management in the super/v1/dto directory. - Implemented new migration for content_access table and created model for it.
33 lines
905 B
Go
33 lines
905 B
Go
package dto
|
|
|
|
import "quyun/v2/pkg/consts"
|
|
|
|
type LoginForm struct {
|
|
Phone string `json:"phone"`
|
|
OTP string `json:"otp"`
|
|
}
|
|
|
|
type LoginResponse struct {
|
|
Token string `json:"token"`
|
|
User *User `json:"user"`
|
|
}
|
|
|
|
type User struct {
|
|
ID string `json:"id"`
|
|
Phone string `json:"phone"`
|
|
Nickname string `json:"nickname"`
|
|
Avatar string `json:"avatar"`
|
|
Gender consts.Gender `json:"gender"`
|
|
Bio string `json:"bio"`
|
|
Birthday string `json:"birthday"` // YYYY-MM-DD
|
|
Location *Location `json:"location"`
|
|
Balance float64 `json:"balance"`
|
|
Points int64 `json:"points"`
|
|
IsRealNameVerified bool `json:"is_real_name_verified"`
|
|
}
|
|
|
|
type Location struct {
|
|
Province string `json:"province"`
|
|
City string `json:"city"`
|
|
}
|