package com.gnx.telemedicine.model;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.UUID;

@Getter
@Setter
@Entity
@Table(name = "doctors")
public class Doctor {
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.UUID)
    private UUID id;

    @OneToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "user_id")
    private UserModel user;

    @Column(name = "medical_license_number")
    private String medicalLicenseNumber;

    @Column(name = "specialization")
    private String specialization;

    @Column(name = "years_of_experience")
    private Integer yearsOfExperience;

    @Column(name = "biography")
    private String biography;

    @Column(name = "consultation_fee")
    private BigDecimal consultationFee;

    @Column(name = "default_duration_minutes", columnDefinition = "INTEGER DEFAULT 30")
    private Integer defaultDurationMinutes;

    @Column(name = "is_verified")
    private Boolean isVerified;

    @Column(name = "street_address")
    private String streetAddress;

    @Column(name = "city")
    private String city;

    @Column(name = "state")
    private String state;

    @Column(name = "zip_code")
    private String zipCode;

    @Column(name = "country")
    private String country;

    @Column(name = "education_degree")
    private String educationDegree;

    @Column(name = "education_university")
    private String educationUniversity;

    @Column(name = "education_graduation_year")
    private Integer educationGraduationYear;

    @Column(name = "certifications")
    private java.util.List<String> certifications;

    @Column(name = "languages_spoken")
    private java.util.List<String> languagesSpoken;

    @Column(name = "hospital_affiliations")
    private java.util.List<String> hospitalAffiliations;

    @Column(name = "insurance_accepted")
    private java.util.List<String> insuranceAccepted;

    @Column(name = "professional_memberships")
    private java.util.List<String> professionalMemberships;

    @CreationTimestamp
    @Column(name = "created_at")
    private LocalDate createdAt;

}