package dto

// LoginRequest represents the login request payload
type LoginRequest struct {
	Identifier string `json:"identifier" validate:"required,min=3"`
	Password   string `json:"password" validate:"required,min=8"`
}

// LoginResponse represents the login response
type LoginResponse struct {
	Token           string        `json:"token"`
	User            UserInfo      `json:"user"`
	Companies       []CompanyInfo `json:"companies,omitempty"`
	ActiveCompanyID *int          `json:"activeCompanyId,omitempty"`
}

// UserInfo represents basic user information in responses
type UserInfo struct {
	ID         int    `json:"id"`
	Identifier string `json:"identifier"`
	Role       string `json:"role"`
	FullName   string `json:"fullName"`
	Language   string `json:"language"`
}

// CompanyInfo represents basic company information
type CompanyInfo struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	Role string `json:"role"` // Role in this company (companyAdmin or recruiter)
}

// RegisterRequest represents user registration
type RegisterRequest struct {
	Identifier string  `json:"identifier" validate:"required,min=3,max=50"`
	Password   string  `json:"password" validate:"required,min=8"`
	FullName   string  `json:"fullName" validate:"required"`
	Phone      *string `json:"phone,omitempty"`
	WhatsApp   *string `json:"whatsapp,omitempty"`
	LineID     *string `json:"lineId,omitempty"`
	Instagram  *string `json:"instagram,omitempty"`
	Language   string  `json:"language" validate:"required,oneof=pt en es ja"`
	Role       string  `json:"role" validate:"required,oneof=jobSeeker recruiter companyAdmin"`
}
