package models

import "time"

type User struct {
	UserID   int    `json:"user_id"`
	Username string `json:"username"`
	FullName string `json:"full_name"`
	Email    string `json:"email"`
	Phone    string `json:"phone"`
}

type Hospital struct {
	HospitalID int     `json:"hospital_id"`
	Name       string  `json:"name"`
	Address    string  `json:"address"`
	Phone      string  `json:"phone"`
	Latitude   float64 `json:"latitude"`
	Longitude  float64 `json:"longitude"`
	Is24Hours  bool    `json:"is_24_hours"`
	IsPartner  bool    `json:"is_partner"`
	Rating     float64 `json:"rating"`
}

type EmergencyReport struct {
	ReportID     int       `json:"report_id"`
	CaseCode     string    `json:"case_code"`
	AnimalType   string    `json:"animal_type"`
	InjuryType   string    `json:"injury_type"`
	Severity     string    `json:"severity"`
	LocationLat  float64   `json:"location_lat"`
	LocationLng  float64   `json:"location_lng"`
	LocationAddr string    `json:"location_address"`
	Status       string    `json:"status"`
	CreatedAt    time.Time `json:"created_at"`
}

// ==========================================
// Volunteer
// ==========================================

type Volunteer struct {
	VolunteerID int `json:"volunteer_id"`
	UserID      int `json:"user_id"`

	IDCardImage string `json:"id_card_image"`

	TierLevel string `json:"tier_level"`

	IsApproved bool `json:"is_approved"`

	ApplicationStatus string `json:"application_status"`

	RejectionReason string `json:"rejection_reason"`

	IsOnline bool `json:"is_online"`

	WorkingArea string `json:"working_area"`

	ExperienceYears int `json:"experience_years"`

	ExperienceDetail string `json:"experience_detail"`

	CanEmergency bool `json:"can_emergency"`

	CanBodyRetrieval bool `json:"can_body_retrieval"`

	AvailableDays string `json:"available_days"`

	AvailableTime string `json:"available_time"`

	TotalMissions int `json:"total_missions"`

	AvgRating float64 `json:"avg_rating"`

	CreatedAt time.Time `json:"created_at"`

	ApprovedAt *time.Time `json:"approved_at"`
}

// ==========================================
// Volunteer Readiness
// ==========================================

type VolunteerReadiness struct {
	ID int `json:"id"`

	VolunteerID int `json:"volunteer_id"`

	Experience string `json:"experience"`

	WorkingArea string `json:"working_area"`

	AnimalExperience string `json:"animal_experience"`

	CanEmergency bool `json:"can_emergency"`

	CanBodyRetrieval bool `json:"can_body_retrieval"`

	AvailableDays string `json:"available_days"`

	AvailableTime string `json:"available_time"`

	CreatedAt time.Time `json:"created_at"`
}

// ==========================================
// Volunteer Training
// ==========================================

type VolunteerTraining struct {
	ID int `json:"id"`

	Title string `json:"title"`

	Description string `json:"description"`

	VideoURL string `json:"video_url"`

	IsRequired bool `json:"is_required"`
}

// ==========================================
// Volunteer Quiz Result
// ==========================================

type VolunteerQuizResult struct {
	ID int `json:"id"`

	VolunteerID int `json:"volunteer_id"`

	QuizID int `json:"quiz_id"`

	Score int `json:"score"`

	Passed bool `json:"passed"`

	CreatedAt time.Time `json:"created_at"`
}

// ==========================================
// Volunteer Mission
// ==========================================

type VolunteerMission struct {
	ID int `json:"id"`

	VolunteerID int `json:"volunteer_id"`

	ReportID int `json:"report_id"`

	MissionType string `json:"mission_type"`

	Status string `json:"status"`

	AcceptedAt *time.Time `json:"accepted_at"`

	CompletedAt *time.Time `json:"completed_at"`

	Rating float64 `json:"rating"`

	Review string `json:"review"`
}
