12 lines
347 B
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"`
|
|
}
|