models

package
v0.0.0-...-d24a92c Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 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 Payment

type Payment struct {
	ID        uint      `json:"id" gorm:"primarykey"`
	ProductID uint      `json:"product_id" gorm:"foreignkey:ProductID"`
	Price     uint      `json:"price"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Product

type Product struct {
	ID        uint   `json:"id" gorm:"primarykey"`
	Name      string `json:"name" gorm:"unique;not null"`
	Price     uint   `json:"price"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

type User

type User struct {
	ID        uint      `json:"id" gorm:"primarykey"`
	FirstName string    `json:"first_name"`
	LastName  string    `json:"last_name"`
	Email     string    `json:"email"`
	Password  string    `json:"password"`
	CreatedAt time.Time `json:"created_at"`
	LastLogin time.Time `json:"last_login"`
}

Jump to

Keyboard shortcuts

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