Documentation ¶
Index ¶
Constants ¶
View Source
const ( CREATED = "CREATED" CANCELLED = "CANCELLED" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Caregiver ¶
type Caregiver struct { ID uint64 `gorm:"primaryKey"` Name string `gorm:"not null"` BirthDate *time.Time Avatar string Sex *domain.Sex Email string `gorm:"unique"` PatientID *uint64 Patient *patient.Patient `gorm:"foreignKey:PatientID"` Status string `gorm:"default:CREATED"` Uid string `gorm:"unique"` SocketID string CreatedAt *time.Time UpdatedAt *time.Time }
type Repository ¶
type Repository interface { CreateCaregiver(ctx context.Context, caregiver *Caregiver) (*Caregiver, error) FindCaregiverByID(ctx context.Context, ID *uint64) (*Caregiver, error) FindCaregiverByEmail(ctx context.Context, email string) (*Caregiver, error) FindCaregiverByUid(ctx context.Context, uid string) (*Caregiver, error) UpdateCaregiver(ctx context.Context, caregiver *Caregiver) (*Caregiver, error) DeleteCaregiver(ctx context.Context, ID *uint64) error FindCaregiverByPatientID(ctx context.Context, patientID *uint64) (*Caregiver, error) }
Click to show internal directories.
Click to hide internal directories.