package dto

import "time"

type LoginRequest struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

type AuthResponse struct {
	Token              string       `json:"token"`
	User               UserResponse `json:"user"`
	MustChangePassword bool         `json:"mustChangePassword"`
}

type CreateUserRequest struct {
	Name     string   `json:"name"`
	Email    string   `json:"email"`
	Password string   `json:"password"`
	Roles    []string `json:"roles"`
	Status   *string  `json:"status,omitempty"`
	TenantID *string  `json:"companyId,omitempty"` // Optional, mainly for superads to assign user to company
}

type UpdateUserRequest struct {
	Name      *string   `json:"name,omitempty"`
	Email     *string   `json:"email,omitempty"`
	Phone     *string   `json:"phone,omitempty"`
	Bio       *string   `json:"bio,omitempty"`
	Active    *bool     `json:"active,omitempty"`
	Status    *string   `json:"status,omitempty"`
	Roles     *[]string `json:"roles,omitempty"`
	AvatarUrl *string   `json:"avatarUrl,omitempty"`
}

type UserResponse struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Email     string    `json:"email"`
	Roles     []string  `json:"roles"`
	Status    string    `json:"status"`
	AvatarUrl string    `json:"avatar_url"`
	Phone     *string   `json:"phone,omitempty"`
	Bio       *string   `json:"bio,omitempty"`
	CreatedAt time.Time `json:"created_at"`
}

type UpdatePasswordRequest struct {
	CurrentPassword string `json:"currentPassword"`
	NewPassword     string `json:"newPassword"`
}

type RegisterCandidateRequest struct {
	Name       string `json:"name"`
	Email      string `json:"email"`
	Password   string `json:"password"`
	Username   string `json:"username"`
	Phone      string `json:"phone"`
	Address    string `json:"address,omitempty"`
	City       string `json:"city,omitempty"`
	State      string `json:"state,omitempty"`
	ZipCode    string `json:"zipCode,omitempty"`
	BirthDate  string `json:"birthDate,omitempty"`
	Education  string `json:"education,omitempty"`
	Experience string `json:"experience,omitempty"`
	Skills     string `json:"skills,omitempty"`
	Objective  string `json:"objective,omitempty"`
}

type SaveFCMTokenRequest struct {
	Token    string `json:"token"`
	Platform string `json:"platform"`
}
