models

package
v0.0.0-...-d94ec6f Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 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 Event

type Event struct {
	gorm.Model
	UserID uint
	UUID   string    `gorm:"uniqueIndex" json:"uuid"`
	Day    byte      `json:"day"`
	Time   time.Time `json:"time"`
	Name   string    `json:"name"`
}

Event contains event data

type User

type User struct {
	gorm.Model
	Email  string      `gorm:"uniqueIndex" json:"email"`
	UUID   string      `gorm:"uniqueIndex" json:"uuid"`
	Name   string      `json:"name"`
	TZ     string      `json:"tz"`
	Tokens []UserToken `gorm:"constraint:OnDelete:CASCADE"`
	Events []Event     `gorm:"constraint:OnDelete:CASCADE"`
}

User contains the user data

type UserToken

type UserToken struct {
	gorm.Model
	UserID uint
	Token  string `gorm:"uniqueIndex"`
}

UserToken contains tokens usable by an user

Jump to

Keyboard shortcuts

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