mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
22 lines
502 B
Go
22 lines
502 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
const (
|
|
BILLING_TYPE_POSTPAID = "postpaid"
|
|
BILLING_TYPE_PREPAID = "prepaid"
|
|
)
|
|
|
|
type SBillingResourceBase struct {
|
|
BillingType string `width:"36" charset:"ascii" nullable:"true" default:"postpaid" list:"user" create:"optional"`
|
|
ExpiredAt time.Time `nullable:"true" list:"user" create:"optional"`
|
|
}
|
|
|
|
func (self *SBillingResourceBase) GetChargeType() string {
|
|
if len(self.BillingType) > 0 {
|
|
return self.BillingType
|
|
} else {
|
|
return BILLING_TYPE_POSTPAID
|
|
}
|
|
}
|