models

package
v0.0.0-...-88196c3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	ID        string    `sql:"type:uuid;primary_key" json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

func (*Base) BeforeCreate

func (base *Base) BeforeCreate(scope *gorm.Scope) error

type Item

type Item struct {
	Base
	Name     string `json:"name"`
	Category string `json:"category"`
	Count    uint   `json:"count"`
	Done     bool   `json:"done"`
	Removed  bool   `json:"removed"`
	ListID   string `json:"list_id"`
}

type List

type List struct {
	Base
	Name        string `json:"name"`
	Description string `json:"description"`
	Color       uint32 `json:"color"`
	UserID      string `json:"user_id"`
	Removed     bool   `json:"removed"`
	Done        bool   `json:"done"`
	Items       []Item `json:"items"`
}

type User

type User struct {
	Base
	Email string `json:"email"`
	Lists []List `json:"lists"`
}

Jump to

Keyboard shortcuts

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