feat(region):加入服务启动时同步行政区划。

This commit is contained in:
徐涛
2022-08-12 16:39:49 +08:00
parent dd38fd6d6f
commit b213b32325
5 changed files with 3869 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ package model
type Region struct {
Code string `xorm:"varchar(15) pk not null" json:"code"`
Name string `xorm:"varchar(50) not null" json:"name"`
Level int8 `xorm:"smallint not null default 0" json:"level"`
Level int `xorm:"int not null default 0" json:"level"`
Parent string `xorm:"varchar(15) not null default '0'" json:"parent"`
}

View File

@@ -9,7 +9,6 @@ import (
type UserCharge struct {
Created `xorm:"extends"`
Seq int64 `xorm:"bigint pk not null " json:"seq"`
CreatedAt time.Time `xorm:"timestampz not null" json:"createdAt"`
UserId string `xorm:"varchar(120) not null" json:"userId"`
Fee decimal.Decimal `xorm:"numeric(12,2) not null" json:"fee"`
Discount decimal.Decimal `xorm:"numeric(5,4) not null" json:"discount"`