models

package
v0.0.0-...-6584b5e Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appointment

type Appointment struct {
	Id              int
	ClientName      string    `json:"client_name" db:"client_name"`
	ClientPhone     string    `json:"client_phone" db:"client_phone"`
	ClientEmail     string    `json:"client_email" db:"client_email"`
	AppointmentTime time.Time `json:"appointment_time" db:"appointment_time"`
	ServiceId       int       `json:"service_id" db:"service_id"`
	EmployeeId      int       `json:"employee_id" db:"employee_id"`
	IsOpen          bool      `json:"is_open" db:"is_open"`
}

type Calendar

type Calendar struct {
	Date          pgtype.Date
	EmployeesId   []*int
	EmployeesName []*string
}

type DailySchedule

type DailySchedule struct {
	ID          int
	EmployeeID  int         `json:"employee_id"`
	Date        time.Time   `json:"date"`
	TimeSlots   []time.Time `json:"time_slots"`
	IsAvailable bool        `json:"is_available"`
}

type Employee

type Employee struct {
	Id            int
	Login         string
	Password      []byte
	Name          string
	Phone         string
	Email         string
	About         sql.NullString
	RoleId        int
	CreatedBy     int
	HireDate      time.Time
	DismissalDate *time.Time
	Active        bool
	TotalEarnings float64
	Photo         sql.NullString
}

Employee структура для хранения данных о сотруднике

type Photo

type Photo struct {
	ID         int
	EmployeeID int
	ImageURL   string
}

type WorkSchedule

type WorkSchedule struct {
	ID              int             `json:"id" db:"id"`
	Open            pgtype.Time     `json:"open" db:"opening_time"`
	Close           pgtype.Time     `json:"close" db:"closing_time"`
	HaircutInterval pgtype.Interval `json:"haircut_interval" db:"haircut_interval"`
	WeekendDays     []int           `json:"weekend_days" db:"weekend_days"`
}

Jump to

Keyboard shortcuts

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