enhance(fee):基本完成物业附加费部分的运算。

This commit is contained in:
徐涛
2022-09-21 22:46:33 +08:00
parent 38ec847f55
commit f8f8a0ced1
4 changed files with 221 additions and 179 deletions

View File

@@ -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"`
}