caregiver

package
v0.0.0-...-2741532 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

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)
}

Jump to

Keyboard shortcuts

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