Discover Packages
github.com/sixfwa/fiber-gorm
models
package
Version:
v0.0.0-...-1f193f5
Opens a new window with list of versions in this module.
Published: Oct 12, 2021
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 3
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Order struct {
ID uint `json:"id" gorm:"primaryKey"`
CreatedAt time .Time
ProductRefer int `json:"product_id"`
Product Product `gorm:"foreignKey:ProductRefer"`
UserRefer int `json:"user_id"`
User User `gorm:"foreignKey:UserRefer"`
}
type Product struct {
ID uint `json:"id" gorm:"primaryKey"`
CreatedAt time .Time
Name string `json:"name"`
SerialNumber string `json:"serial_number"`
}
type User struct {
ID uint `json:"id" gorm:"primaryKey"`
CreatedAt time .Time
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.