package customer import ( "github.com/google/uuid" ) type CustomerAggregate struct { ID uuid.UUID `json:"_id"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Mobile string `json:"mobile"` Email string `json:"email"` IsActive bool `json:"is_active"` 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, FirstName: c.FirstName, LastName: c.LastName, Mobile: c.Mobile, Email: c.Email, IsActive: c.IsActive, 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"` }