package contract import ( "time" "github.com/google/uuid" ) type CreateUserRequest struct { Name string `json:"name" validate:"required,min=1,max=255"` Email string `json:"email" validate:"required,email"` Password string `json:"password" validate:"required,min=6"` } type UpdateUserRequest struct { Name *string `json:"name,omitempty" validate:"omitempty,min=1,max=255"` Email *string `json:"email,omitempty" validate:"omitempty,email"` IsActive *bool `json:"is_active,omitempty"` } type ChangePasswordRequest struct { CurrentPassword string `json:"current_password" validate:"required"` NewPassword string `json:"new_password" validate:"required,min=6"` } type LoginRequest struct { Email string `json:"email" validate:"required,email"` Password string `json:"password" validate:"required"` } type LoginResponse struct { Token string `json:"token"` ExpiresAt time.Time `json:"expires_at"` User *UserResponse `json:"user"` } type RefreshTokenRequest struct { RefreshToken string `json:"refresh_token" validate:"required"` } type UserResponse struct { ID uuid.UUID `json:"id"` Name string `json:"name"` Email string `json:"email"` IsActive bool `json:"is_active"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } type ListUsersRequest struct { Page int `json:"page" validate:"min=1"` Limit int `json:"limit" validate:"min=1,max=100"` IsActive *bool `json:"is_active,omitempty"` Search *string `json:"search,omitempty"` } type PaginatedUserResponse struct { Users []UserResponse `json:"users"` Pagination PaginationResponse `json:"pagination"` }