model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderM

type OrderM struct {
	ID        int64     `gorm:"column:id;primary_key"` //
	OrderID   string    `gorm:"column:order_id"`       //
	Customer  string    `gorm:"column:customer"`       //
	Product   string    `gorm:"column:product"`        //
	Quantity  int64     `gorm:"column:quantity"`       //
	CreatedAt time.Time `gorm:"column:created_at"`     //
	UpdatedAt time.Time `gorm:"column:updated_at"`     //
}

func (*OrderM) AfterCreate

func (o *OrderM) AfterCreate(tx *gorm.DB) (err error)

AfterCreate runs after creating a OrderM database record and updates the OrderID field.

func (*OrderM) TableName

func (o *OrderM) TableName() string

TableName sets the insert table name for this struct type.

Jump to

Keyboard shortcuts

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