Documentation ¶
Index ¶
- func New(db *gorm.DB) repository_intf.CityRepository
- type CityModel
- func (CityModel) FromCityEntity(in entity.City) *CityModel
- func (CityModel) QueryCreate(db *gorm.DB, in CityModel) (*CityModel, error)
- func (CityModel) QueryDelete(db *gorm.DB, id int) error
- func (CityModel) QueryGet(db *gorm.DB, id int) (*CityModel, error)
- func (CityModel) QueryGetAll(db *gorm.DB) ([]*CityModel, error)
- func (CityModel) QueryUpdate(db *gorm.DB, in CityModel) (*CityModel, error)
- func (model *CityModel) ToCityEntity() *entity.City
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(db *gorm.DB) repository_intf.CityRepository
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) QueryCreate ¶
func (CityModel) QueryUpdate ¶
func (*CityModel) ToCityEntity ¶
Click to show internal directories.
Click to hide internal directories.