model

package
v0.0.0-...-85a2ba7 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 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 Billing

type Billing struct{}

type Customer

type Customer struct{}

type Order

type Order struct {
	Id         int          `json:"id"`
	CustomerId int          `json:"customer_id"`
	OrderItems []*OrderItem `json:"order_items" pg:"rel:has-many"`
	Total      int          `json:"total"`
	Status     string       `json:"status"`
	CreatedAt  time.Time    `json:"created_at" pg:"default:now()"`
	UpdatedAt  time.Time    `json:"updated_at" pg:"default:now()"`
}

type OrderItem

type OrderItem struct {
	ProductId   int    `json:"product_id" pg:",pk"`
	OrderId     int    `json:"order_id,omitempty" pg:",pk"`
	ProductName string `json:"product_name"`
	Quantity    int    `json:"quantity"`
	Price       int    `json:"price"`
}

type Shop

type Shop struct{}

Jump to

Keyboard shortcuts

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