type DrugModel struct {
gorm.Model ID int `gorm:"primaryKey;autoIncrement"`
Name string `gorm:"type:varchar(255);"`
Approved bool `gorm:"type:boolean;"`
MinDose int `gorm:"type:integer;"`
MaxDose int `gorm:"type:integer;"`
AvailableAt time.Time `gorm:"type:timestamp;"`
}
type UserModel struct {
gorm.Model ID int `gorm:"primaryKey;autoIncrement"`
Name *string `gorm:"type:varchar(255);"`
Email string `gorm:"type:varchar(255);unique"`
Password string `gorm:"type:varchar(255);"`
}
type VaccinationModel struct {
gorm.Model ID int `gorm:"primaryKey;autoIncrement"`
Name string `gorm:"type:varchar(255);"`
DrugID int `gorm:"type:integer;not null"`
Drug DrugModel `gorm:"foreignKey:DrugID"`
Dose int `gorm:"type:integer;"`
Date time.Time `gorm:"type:timestamp;"`
}