models

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	ID         string    `json:"id"`
	Reference  string    `json:"reference"`
	Customer   string    `json:"customer"`
	TotalPrice uint      `json:"-"`
	Date       time.Time `json:"time"`
	Lines      []string  `json:"-"`
}

Order is the basic model for order ( which are sent in commands )

type OrderLine

type OrderLine struct {
	ID       string `json:"id"`
	Meal     string `json:"meal"`
	Quantity uint   `json:"quantity"`
	Price    uint   `json:"price"`
	OrderID  string `json:"order_id"`
}

OrderLine is the basic model for order lines ( which are sent in commands )

type User

type User struct {
	ID       int64  `json:"id"`
	Username string `json:"username"`
	Email    string `json:"email"`
	Password string `json:"password,omitempty"`
	Role     string `json:"role"`
}

User is a user model

Jump to

Keyboard shortcuts

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