2823fb45f5
Phone+OTP auth, staged onboarding, admin approval workflow, and a full discovery/swipe/match/chat system with photo upload and approximate distance (haversine) based on user location. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
57 lines
2.5 KiB
Go
57 lines
2.5 KiB
Go
package dto
|
|
|
|
// BasicInfoRequest مرحله ۱: جنسیت، اسم کوچک، تاریخ تولد
|
|
type BasicInfoRequest struct {
|
|
Gender string `json:"gender" binding:"required,oneof=male female"`
|
|
FirstName string `json:"first_name" binding:"required,min=2,max=50"`
|
|
// فرمت: YYYY-MM-DD
|
|
BirthDate string `json:"birth_date" binding:"required"`
|
|
}
|
|
|
|
// BodyInfoRequest مرحله ۲: قد و وزن
|
|
type BodyInfoRequest struct {
|
|
HeightCM int `json:"height_cm" binding:"required,min=100,max=250"`
|
|
WeightKG int `json:"weight_kg" binding:"required,min=30,max=250"`
|
|
}
|
|
|
|
// ProfileQuestionAnswerInput یک جفت (سوال انتخابشده، پاسخ) از سوالات پروفایل
|
|
type ProfileQuestionAnswerInput struct {
|
|
QuestionID uint `json:"question_id" binding:"required"`
|
|
Answer string `json:"answer" binding:"required,min=1,max=1000"`
|
|
}
|
|
|
|
// ProfileQuestionsRequest مرحله ۳: دقیقاً ۳ سوال انتخابی همراه با پاسخ
|
|
type ProfileQuestionsRequest struct {
|
|
Answers []ProfileQuestionAnswerInput `json:"answers" binding:"required,len=3,dive"`
|
|
}
|
|
|
|
// EducationRequest مرحله ۴: سطح تحصیلات + رشته تحصیلی (هر دو از لیستهای ادمین)
|
|
type EducationRequest struct {
|
|
EducationLevelOptionID uint `json:"education_level_option_id" binding:"required"`
|
|
FieldOfStudyOptionID uint `json:"field_of_study_option_id" binding:"required"`
|
|
}
|
|
|
|
// OptionSelectionRequest برای مراحلی که فقط یک لیست از option_id ارسال میشود
|
|
// (کارها، اهمیتهای رابطه، علاقهمندیها، دنبال چی میگردی)
|
|
type OptionSelectionRequest struct {
|
|
OptionIDs []uint `json:"option_ids" binding:"required,min=1,dive"`
|
|
}
|
|
|
|
// OnboardingStatusResponse وضعیت فعلی آنبوردینگ کاربر
|
|
type OnboardingStatusResponse struct {
|
|
CurrentStep int `json:"current_step"`
|
|
CurrentStepKey string `json:"current_step_key"`
|
|
IsOnboarded bool `json:"is_onboarded"`
|
|
// ApprovalStatus بعد از تکمیل آنبوردینگ معنا پیدا میکنه: pending/approved/rejected.
|
|
// وقتی pending هست، اپ باید صفحهی «در انتظار تایید ادمین» رو نشون بده.
|
|
ApprovalStatus string `json:"approval_status"`
|
|
RejectionReason *string `json:"rejection_reason,omitempty"`
|
|
Steps []StepView `json:"steps"`
|
|
}
|
|
|
|
type StepView struct {
|
|
Step int `json:"step"`
|
|
Key string `json:"key"`
|
|
Done bool `json:"done"`
|
|
}
|