forked from free-lancers/electricity_bill_calc_service
enhance(fee):基本完成物业附加费部分的运算。
This commit is contained in:
@@ -19,6 +19,7 @@ type MaintenanceFee struct {
|
||||
Fee decimal.Decimal `bun:"type:numeric,notnull" json:"fee"`
|
||||
Memo *string `bun:"type:text" json:"memo"`
|
||||
Enabled bool `bun:",notnull" json:"enabled"`
|
||||
Park Park `bun:"rel:belongs-to,join:park_id=id"`
|
||||
}
|
||||
|
||||
var _ bun.BeforeAppendModelHook = (*MaintenanceFee)(nil)
|
||||
@@ -34,3 +35,14 @@ func (f *MaintenanceFee) BeforeAppendModel(ctx context.Context, query bun.Query)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AdditionalCharge struct {
|
||||
ParkId string `json:"parkId"`
|
||||
Period string `json:"period"`
|
||||
Fee decimal.Decimal `json:"fee"`
|
||||
Price decimal.Decimal `json:"price"`
|
||||
QuarterPrice decimal.Decimal `json:"quarterPrice"`
|
||||
SemiAnnualPrice decimal.Decimal `json:"semiAnnualPrice"`
|
||||
Enterprise UserDetailSimplified `json:"user"`
|
||||
Park Park `json:"park"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user