37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package model
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
"github.com/lib/pq"
|
|
"gorm.io/gorm"
|
|
"time"
|
|
)
|
|
|
|
type Event struct {
|
|
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primarykey"`
|
|
gorm.Model
|
|
Start time.Time `json:"start"`
|
|
End time.Time `json:"end"`
|
|
Author User `json:"author" gorm:"-"`
|
|
AuthorId uint `json:"-"`
|
|
Employee User `json:"employee" gorm:"-"`
|
|
EmployeeId uint `json:"-"`
|
|
Member PD `json:"member" gorm:"-"`
|
|
MemberId uint `json:"-"`
|
|
Status string `json:"status"`
|
|
MedicalCard Card `json:"medicalCard" gorm:"-"`
|
|
MedicalCardId uint `json:"-"`
|
|
Services pq.Int32Array `json:"services" gorm:"type:integer[]"`
|
|
OrgId uint `json:"-"`
|
|
}
|
|
|
|
type CreateEvent struct {
|
|
Start time.Time `json:"start"`
|
|
End time.Time `json:"end"`
|
|
EmployeeId uint `json:"employee_id"`
|
|
MemberId uint `json:"member_id"`
|
|
Status string `json:"status"`
|
|
MedicalCardId uint `json:"medical_card_id"`
|
|
Services []int32 `json:"services"`
|
|
}
|