models

package
v0.0.0-...-78a518a Latest Latest
Warning

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

Go to latest
Published: Dec 24, 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 Drink

type Drink struct {
	gorm.Model
	Name  string
	Price int
}

Drink stores information about one type of drink

type Payment

type Payment struct {
	gorm.Model
	User        User
	UserID      uint
	PaymentTime time.Time
	Amount      int
}

Payment stores information about one payment

type Purchase

type Purchase struct {
	gorm.Model
	Customer     User
	CustomerID   uint
	Product      Drink
	ProductID    uint
	PurchaseTime time.Time
	Price        int
}

Purchase stores information about one purchase

type User

type User struct {
	gorm.Model
	Name string
}

User stores information about one user

Jump to

Keyboard shortcuts

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