@startuml US02_CD
skinparam classAttributeIconSize 0

class Appointment {
  - date: Date
  - time: String
  +Appointment(SNSUserNumber, date, time, center, vaccineType)
  +sendSMS()
  +getVaccinationCenter()
}

class AppointmentScheduleList {
  -appointments: List<Appointment[][]>
  +createAppointment(date,user,vaccine)
  +saveAppointment(appointment)

  -getAppointmentDayIndex(date)
  -getAppointmentSlotIndex(hour)
}

class Vaccine   {
  -designation : String
  -brand : String
  -id : String
  -vacType : VaccineType

  +Vaccine(designation, id, brand, vacTypeId)
}

class AppointmentUI {}

class AppointmentController {
  +createAppointment(SNSUserNumber, date, time, center, vaccineType,sms)
  +saveAppointment(appointment)
}

class Company {
  -designation: String
  +getSuggestedVaccineType()
  +getVaccinationCenterStore()
  +getVaccineTypeStore()
  +getAppointmentScheduleList()
}

class SNSUser {
  - citizenCard: String 
  - snsNumber: String 
  - birthDay: Date 
  - gender: Char
  - phoneNumber: String 
  - address: String
  - userHealthData : UserHealthData
  + SNSUser(citizenCard, snsNumber, name, birthDay, gender, phoneNumber, email, address)
  }

class UserHealthData {
 - vaccinesTaken: List<VaccinationData>
 +isEligibleForVaccine(vaccineType)
}

class VaccinationData {
  - batchNumber: int
  - nOfDose: int
  - date: Date
}

class VaccinationCenter{
  - name: String
  - address: String
  - emailAddress: String
  - phoneNumber: String
  - faxNumber: String
  - websiteAddress: String
  - openingHours: String
  - closingHours: String
  - slotDuration: int
  - maximumVaccinesPerSlot: int
  - createdAt: Date
  - administeredVaccines : List<Vaccine>
  +VaccinationCenter(name,address,emailAddres,phoneNumber,faxNumber,websiteAddress,openingHours,closingHours,slotDuration,maximumVaccinesPerSlot,coordinator)
  +getAdministeredVaccines()
  +checkAvailability(date,time,vaccineType)
  +addAppointmentToList(appointment)
}

class VaccinationCenterStore {
-availableVaccinationCentersList: List<VaccinationCenter>
+getVaccinationCenterByVaccineType(vaccineType)
}

class VaccineType {}

class VaccineTypeStore {
  -vaccineTypes : List<VaccineType>
  +getVaccineTypes()
}

class SMSSender {
  +sendSMS(phoneNumber,message)
}

class VaccineTypeMapper {
+toDto(vaccineTypes)
}

class VaccinationCenterMapper {
  +toDto(vaccinationCenters)
}

class AppointmentDto {
  -snsUser : SNSUser
  -vaccineType : VaccineType
  -center : VaccinationCenter
  -date : Calendar
  -time : String
  +getVaccineType()
  +getVaccinationCenter()
  +getDate()
  +getTime()
  +getSNSNumber()
}

class AppointmentMapper {}

AppointmentUI ..> AppointmentController
AppointmentController ..> Company
Company ..> VaccinationCenterStore
Company ..> VaccineTypeStore
Company ..> AppointmentScheduleList
VaccinationCenterStore "1" --> "*" VaccinationCenter : stores
VaccinationCenter "1" --o "*" Appointment
SNSUser "1" --o "*" Appointment
AppointmentScheduleList "1" --> "*" Appointment : stores
VaccinationData o-- Vaccine
VaccinationData o--  VaccinationCenter
UserHealthData  --o SNSUser
UserHealthData "1" -- "*" VaccinationData : stores >
Appointment o-- VaccineType
SMSSender <.. Appointment
VaccineType --o Vaccine 
VaccinationCenterStore ..> Vaccine
AppointmentMapper ..> AppointmentDto
AppointmentController ..> AppointmentMapper
AppointmentController ..> VaccinationCenterMapper
AppointmentController ..> VaccineTypeMapper 
VaccineTypeStore --> VaccineType : stores > 

@enduml