models

package
v0.0.0-...-2fb0bd6 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hours

type Hours int

type Schedule

type Schedule struct {
	gorm.Model
	SlotID uint
	Slot   Slot
	Date   time.Time `json:"date" valid:"rfc3339,required~Shift Date is required,trim~Shift Date is required"`
	Status string    `json:"status"`
}

type Slot

type Slot struct {
	gorm.Model
	StartHours   Hours `json:"start_hours" valid:"numeric~Hours must be number,length(0|23)~Hours must be 0-23,required~Hours are required"`
	StartMinutes Hours `json:"start_minutes" valid:"numeric~Minutes must be number,length(0|59)~Hours must be 0-59,required~Minutes are required"`
	EndHours     Hours `json:"end_hours" valid:"numeric~Hours must be number,length(0|23)~Hours must be 0-23,required~Hours are required"`
	EndMinutes   Hours `json:"end_minutes" valid:"numeric~Minutes must be number,length(0|59)~Hours must be 0-59,required~Minutes are required"`
}

Jump to

Keyboard shortcuts

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