71 lines
2.3 KiB
Go
71 lines
2.3 KiB
Go
package entity
|
|
|
|
import (
|
|
"enaklo-pos-be/internal/constants"
|
|
"time"
|
|
)
|
|
|
|
type MemberRegistrationRequest struct {
|
|
Name string `json:"name" validate:"required"`
|
|
Email string `json:"email" validate:"required,email"`
|
|
Phone string `json:"phone" validate:"required"`
|
|
BirthDate time.Time `json:"birth_date"`
|
|
BranchID int64 `json:"branch_id" validate:"required"`
|
|
CashierID int64 `json:"cashier_id" validate:"required"`
|
|
}
|
|
|
|
type MemberRegistrationResponse struct {
|
|
Token string `json:"token"`
|
|
Status string `json:"status"`
|
|
ExpiresAt time.Time `json:"expires_at"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
type MemberRegistration struct {
|
|
ID string `json:"id"`
|
|
Token string `json:"token"`
|
|
Name string `json:"name"`
|
|
Email string `json:"email"`
|
|
Phone string `json:"phone"`
|
|
BirthDate time.Time `json:"birth_date"`
|
|
OTP string `json:"-"` // Not exposed in JSON responses
|
|
Status constants.RegistrationStatus `json:"status"`
|
|
ExpiresAt time.Time `json:"expires_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
|
BranchID int64 `json:"branch_id"`
|
|
CashierID int64 `json:"cashier_id"`
|
|
}
|
|
|
|
type MemberVerificationRequest struct {
|
|
Token string `json:"token" validate:"required"`
|
|
OTP string `json:"otp" validate:"required"`
|
|
}
|
|
|
|
type MemberVerificationResponse struct {
|
|
CustomerID int64 `json:"customer_id"`
|
|
Name string `json:"name"`
|
|
Email string `json:"email"`
|
|
Phone string `json:"phone"`
|
|
Points int `json:"points"`
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type MemberRegistrationStatus struct {
|
|
Token string `json:"token"`
|
|
Status string `json:"status"`
|
|
ExpiresAt time.Time `json:"expires_at"`
|
|
IsExpired bool `json:"is_expired"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type ResendOTPRequest struct {
|
|
Token string `json:"token" validate:"required"`
|
|
}
|
|
|
|
type ResendOTPResponse struct {
|
|
Token string `json:"token"`
|
|
ExpiresAt time.Time `json:"expires_at"`
|
|
Message string `json:"message"`
|
|
}
|