county

package
v0.0.0-...-00b94a8 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(database *gorm.DB) (err error)

Types

type County

type County struct {
	ID         uint      `gorm:"primaryKey" json:"id"`
	Name       string    `gorm:"type:varchar(50);not null" json:"name"`
	ProvinceID uint      `gorm:"not null" json:"province_id"`
	CreatedAt  time.Time `json:"-"`
	UpdatedAt  time.Time `json:"-"`
}

func GetAll

func GetAll() (counties []County, err error)

func GetByID

func GetByID(id int) (county County, err error)

func (County) TableName

func (County) TableName() string

type Tabler

type Tabler interface {
	TableName() string
}

Jump to

Keyboard shortcuts

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