electricity_bill_calc_service/model/region.go

12 lines
347 B
Go

package model
import "github.com/uptrace/bun"
type Region struct {
bun.BaseModel `bun:"table:region,alias:r"`
Code string `bun:",pk,notnull" json:"code"`
Name string `bun:",notnull" json:"name"`
Level int `bun:",notnull,default:0" json:"level"`
Parent string `bun:",notnull,default:'0'" json:"parent"`
}