fee_config.go 1.1 KB

123456789101112131415161718192021
  1. package dao
  2. import "server/global"
  3. type FeeConfig struct {
  4. global.GVA_MODEL
  5. VehicleTypeID uint `gorm:"not null;uniqueIndex" json:"vehicle_type_id"` // 车辆类型ID
  6. VehicleType *VehicleType `gorm:"foreignKey:VehicleTypeID" json:"vehicle_type"` // 车辆类型关联
  7. StartTime int `json:"start_time"` // 起始时间(分钟)
  8. StartFee float64 `json:"start_fee"` // 起始费用
  9. UnitTime int `json:"unit_time"` // 单位时间(分钟)
  10. UnitFee float64 `json:"unit_fee"` // 单位费用
  11. DailyMaxFee float64 `json:"daily_max_fee"` // 每日最高费用
  12. IsVIPFree bool `gorm:"default:false" json:"is_vip_free"` // VIP是否免费
  13. VIPDiscount float64 `gorm:"default:1.0" json:"vip_discount"` // VIP折扣
  14. Description string `gorm:"size:200" json:"description"` // 描述
  15. }
  16. func (FeeConfig) TableName() string {
  17. return "fee_config"
  18. }