city_mysql

package
v0.0.0-...-01f7578 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type CityModel

type CityModel struct {
	// table_name = "tbl_city"
	Id         int    `gorm:"primary_key;column:id"`
	ProvinceId int    `gorm:"column:province_id"`
	Name       string `gorm:"column:name"`

	CreatedAt *time.Time `gorm:"column:created_at"`
	UpdatedAt *time.Time `gorm:"column:updated_at"`
}

func (CityModel) FromCityEntity

func (CityModel) FromCityEntity(in entity.City) *CityModel

func (CityModel) QueryCreate

func (CityModel) QueryCreate(db *gorm.DB, in CityModel) (*CityModel, error)

func (CityModel) QueryDelete

func (CityModel) QueryDelete(db *gorm.DB, id int) error

func (CityModel) QueryGet

func (CityModel) QueryGet(db *gorm.DB, id int) (*CityModel, error)

func (CityModel) QueryGetAll

func (CityModel) QueryGetAll(db *gorm.DB) ([]*CityModel, error)

func (CityModel) QueryUpdate

func (CityModel) QueryUpdate(db *gorm.DB, in CityModel) (*CityModel, error)

func (*CityModel) ToCityEntity

func (model *CityModel) ToCityEntity() *entity.City

Jump to

Keyboard shortcuts

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