package models

import (
	"go-admin/common/models"

	"github.com/shopspring/decimal"
)

type MemberRenwalConfig struct {
	models.Model

	PackageName   string          `json:"packageName" gorm:"type:varchar(255);comment:套餐名称"`
	PackageNameEn string          `json:"packageNameEn" gorm:"type:varchar(255);comment:套餐英文名称"`
	DurationDay   int             `json:"durationDay" gorm:"type:int;comment:续期时间(天)"`
	OriginalPrice decimal.Decimal `json:"originalPrice" gorm:"type:decimal(18,6);comment:原始单价"`
	DiscountPrice decimal.Decimal `json:"discountPrice" gorm:"type:decimal(18,6);comment:折扣价格 -1为未设置"`
	IsDefault     int             `json:"isDefault" gorm:"type:int;comment:是否默认套餐 0-无 1-是 2-否"`
	Remark        string          `json:"remark" gorm:"type:varchar(255);comment:备注"`
	Status        string          `json:"status" gorm:"type:varchar(255);comment:套餐状态（字典 rewal_status）"`
	IsVisible     int             `json:"isVisible" gorm:"type:int;comment:是否显示 2-否 1-是"`
	Sort          int             `json:"sort" gorm:"type:int;comment:排序 顺序"`
	models.ModelTime
	models.ControlBy
}

func (MemberRenwalConfig) TableName() string {
	return "member_renwal_config"
}

func (e *MemberRenwalConfig) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *MemberRenwalConfig) GetId() interface{} {
	return e.Id
}
