Files
cloudpods/pkg/compute/models/billingresource.go
T
2018-10-12 12:13:35 +08:00

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
}
}