- Added SendOTP method for simulating OTP sending. - Implemented LoginWithOTP method for user login/registration via OTP, including user creation if not found. - Added Me method to retrieve current user information. - Implemented Update method for updating user profile details. - Added RealName method for real-name verification. - Implemented GetNotifications method to fetch user notifications. - Created user_test.go for comprehensive unit tests covering login, profile retrieval, updates, real-name verification, and notifications. - Updated database models to use appropriate consts for fields like gender, status, and roles.
32 lines
839 B
YAML
32 lines
839 B
YAML
ignores:
|
|
- migrations
|
|
- river_client
|
|
- river_client_queue
|
|
- river_job
|
|
- river_leader
|
|
- river_migration
|
|
- river_queue
|
|
imports:
|
|
- go.ipao.vip/gen
|
|
- quyun/v2/pkg/consts
|
|
- quyun/v2/database/fields
|
|
field_type:
|
|
users:
|
|
gender: consts.Gender
|
|
roles: types.Array[consts.Role]
|
|
contents:
|
|
status: consts.ContentStatus
|
|
visibility: consts.ContentVisibility
|
|
genre: string # genre is varchar(64) but no enum defined yet?
|
|
content_prices:
|
|
currency: consts.Currency
|
|
discount_type: consts.DiscountType
|
|
orders:
|
|
status: consts.OrderStatus
|
|
type: consts.OrderType
|
|
tenants:
|
|
status: consts.TenantStatus
|
|
tenant_users:
|
|
role: types.Array[consts.TenantUserRole]
|
|
# status: consts.UserStatus # Skipping status for now to avoid mismatch 'active' vs 'verified' without enum update
|
|
field_relate: |