models

package
v0.0.0-...-ade451b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DrugModel

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

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

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;"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL