province

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: 5 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 Province

type Province struct {
	ID             uint            `gorm:"primaryKey" json:"id"`
	Name           string          `gorm:"type:varchar(50);not null" json:"name"`
	Foundation     string          `gorm:"type:varchar(50)" json:"foundation"`
	Capital        string          `gorm:"type:varchar(50)" json:"capital"`
	Population     uint            `gorm:"type:int" json:"population"`
	Area           float64         `gorm:"type:float" json:"area"`
	PhonePrefix    string          `gorm:"type:varchar(4)" json:"phone_prefix"`
	GovernmentSite string          `gorm:"type:varchar(100)" json:"government_site"`
	Counties       []county.County `json:"counties"`
	CreatedAt      time.Time       `json:"-"`
	UpdatedAt      time.Time       `json:"-"`
}

func GetAll

func GetAll() (provinces []Province, err error)

func GetByID

func GetByID(id int) (province Province, err error)

Jump to

Keyboard shortcuts

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