package customer import ( "github.com/google/uuid" ) type CustomerAggregate struct { ID uuid.UUID `json:"_id"` FullName string `json:"full_name"` Username string `json:"username"` Mobile string `json:"mobile"` Email string `json:"email"` Status string `json:"status"` IsVerified bool `json:"is_verified"` LastLoginAt *int64 `json:"last_login_at,omitempty"` // Unix timestamp CreatedAt int64 `json:"created_at"` // Unix timestamp UpdatedAt int64 `json:"updated_at"` // Unix timestamp } func NewCustomerAggregate(c Customer) CustomerAggregate { customer := CustomerAggregate{ ID: c.ID, FullName: c.FullName, Username: c.Username, Email: c.Email, Mobile: c.Mobile, Status: string(c.Status), IsVerified: c.IsVerified, CreatedAt: c.CreatedAt, UpdatedAt: c.UpdatedAt, } if c.LastLoginAt != nil { customer.LastLoginAt = c.LastLoginAt } return customer } // AuthResponse defines authentication response (kept for backward compatibility) type AuthorizationResponse struct { Customer CustomerAggregate `json:"customer"` AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` ExpiresIn int64 `json:"expires_in"` }