first commit
This commit is contained in:
7
model/card.go
Normal file
7
model/card.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type Card struct {
|
||||
gorm.Model
|
||||
}
|
||||
32
model/event.go
Normal file
32
model/event.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Event struct {
|
||||
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 []uint `json:"services" gorm:"-"`
|
||||
}
|
||||
|
||||
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 []uint `json:"services"`
|
||||
}
|
||||
9
model/events_services.go
Normal file
9
model/events_services.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type EventsServices struct {
|
||||
gorm.Model
|
||||
EventId uint
|
||||
ServiceId uint
|
||||
}
|
||||
7
model/pd.go
Normal file
7
model/pd.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type PD struct {
|
||||
gorm.Model
|
||||
}
|
||||
7
model/service.go
Normal file
7
model/service.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type Service struct {
|
||||
gorm.Model
|
||||
}
|
||||
20
model/user.go
Normal file
20
model/user.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type (
|
||||
User struct {
|
||||
gorm.Model
|
||||
UserName string `json:"userName" gorm:"unique"`
|
||||
Password string `json:"password,omitempty"`
|
||||
FirstName string `json:"firstName"`
|
||||
LastName string `json:"lastName"`
|
||||
}
|
||||
)
|
||||
|
||||
type APIUser struct {
|
||||
UserName string `json:"userName" gorm:"unique"`
|
||||
Password string `json:"password,omitempty"`
|
||||
FirstName string `json:"firstName"`
|
||||
LastName string `json:"lastName"`
|
||||
}
|
||||
Reference in New Issue
Block a user