diff --git a/model/park.go b/model/park.go index c020948..b3af1fb 100644 --- a/model/park.go +++ b/model/park.go @@ -11,15 +11,15 @@ type Park struct { UserId string `json:"userId"` Name string `json:"name"` Area decimal.NullDecimal `json:"area"` - TenementQuantity decimal.NullDecimal `json:"tenementQuantity"` + TenementQuantity decimal.NullDecimal `json:"tenement"` Capacity decimal.NullDecimal `json:"capacity"` Category int16 `json:"category"` - MeterType int16 `json:"meter04kvType"` + MeterType int16 `json:"meter04kvType" db:"meter_04kv_type"` PricePolicy int16 `json:"pricePolicy"` - BasicPooled int16 `json:"basicPooled"` - AdjustPooled int16 `json:"adjustPooled"` - LossPooled int16 `json:"lossPooled"` - PublicPooled int16 `json:"publicPooled"` + BasicPooled int16 `json:"basicDiluted"` + AdjustPooled int16 `json:"adjustDiluted"` + LossPooled int16 `json:"lossDiluted"` + PublicPooled int16 `json:"publicDiluted"` TaxRate decimal.NullDecimal `json:"taxRate"` Region *string `json:"region"` Address *string `json:"address"` diff --git a/repository/park.go b/repository/park.go index 516552d..03f7f4a 100644 --- a/repository/park.go +++ b/repository/park.go @@ -141,6 +141,12 @@ func (pr _ParkRepository) RetrieveParkDetail(pid string) (*model.Park, error) { var park model.Park parkSql, parkArgs, _ := pr.ds. From("park"). + Select( + "id", "user_id", "name", "area", "tenement_quantity", "capacity", "category", + "meter_04kv_type", "region", "address", "contact", "phone", "enabled", "price_policy", "tax_rate", + "basic_pooled", "adjust_pooled", "loss_pooled", "public_pooled", "created_at", "last_modified_at", + "deleted_at", + ). Where(goqu.I("id").Eq(pid)). Prepared(true).ToSQL() if err := pgxscan.Get(ctx, global.DB, &park, parkSql, parkArgs...); err != nil {