cargo-platform/internal/domain/city.go
teguh nugroho 8354634117
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ubah struktur
2026-08-25 16:49:27 +07:00

39 lines
2.7 KiB
Go

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package domain
import (
"time"
)
const TableNameCity = "city"
// City mapped from table <city>
type City struct {
ID string `gorm:"column:id;type:character(26);primaryKey;default:generate_ulid()" json:"id"`
Name *string `gorm:"column:name;type:character varying(255);index:city_name_idx,priority:1" json:"name"`
ProvinceID *string `gorm:"column:province_id;type:character(26);index:city_province_id_idx,priority:1" json:"province_id"`
CreatedBy *string `gorm:"column:created_by;type:character(26);index:city_created_by_idx,priority:1" json:"created_by"`
CreatedOn *time.Time `gorm:"column:created_on;type:timestamp without time zone" json:"created_on"`
UpdatedBy *string `gorm:"column:updated_by;type:character(26)" json:"updated_by"`
UpdatedOn *time.Time `gorm:"column:updated_on;type:timestamp without time zone" json:"updated_on"`
MerchantID *string `gorm:"column:merchant_id;type:character(26)" json:"merchant_id"`
Port *string `gorm:"column:port;type:character varying(255)" json:"port"`
BasicPricing_ByCityDestination_Relation []BasicPricing `gorm:"foreignKey:city_destination_id;references:id" json:"basic_pricing_by_city_destination_relation"`
BasicPricing_ByCitySource_Relation []BasicPricing `gorm:"foreignKey:city_source_id;references:id" json:"basic_pricing_by_city_source_relation"`
Merchant_Relation *Merchant `gorm:"foreignKey:merchant_id;references:id" json:"merchant_relation"`
Province_Relation Province `gorm:"foreignKey:province_id;references:id" json:"province_relation"`
Users_Relation User `gorm:"foreignKey:created_by;references:id" json:"users_relation"`
District_ByCity_Relation []District `gorm:"foreignKey:city_id;references:id" json:"district_by_city_relation"`
Merchant_ByCity_Relation []Merchant `gorm:"foreignKey:city_id;references:id" json:"merchant_by_city_relation"`
PostalCode_ByCity_Relation []PostalCode `gorm:"foreignKey:city_id;references:id" json:"postal_code_by_city_relation"`
Subdistrict_ByCity_Relation []Subdistrict `gorm:"foreignKey:city_id;references:id" json:"subdistrict_by_city_relation"`
}
// TableName City's table name
func (*City) TableName() string {
return TableNameCity
}