mysql

package
v0.0.0-...-049c126 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConnectionDB

func GetConnectionDB() (*sqlx.DB, error)

func NewItemRepository

func NewItemRepository(conn *sqlx.DB) (ports.ItemRepository, error)

Types

type Item

type Item struct {
	ID          uint
	Code        string
	Title       string
	Description string
	Price       int
	Stock       int
	ItemType    string `db:"item_type"`
	Leader      bool
	LeaderLevel string `db:"leader_level"`
	Status      string
	Photos      []Photo
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
}

type Photo

type Photo struct {
	ID        uint
	Path      string
	ItemID    uint      `db:"item_id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

Jump to

Keyboard shortcuts

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