package com.yonge.cooleshow.biz.dal.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yonge.cooleshow.biz.dal.enums.EVipType;
import com.yonge.cooleshow.biz.dal.enums.PeriodEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.PositiveOrZero;
import java.math.BigDecimal;

@Data
@TableName("member_price_settings")
@ApiModel(value = "MemberPriceSettings对象", description = "")
public class MemberPriceSettings implements Serializable {
	private static final long serialVersionUID = 1L;
	@TableId(value = "id_", type = IdType.AUTO)
	private Long id;

	@ApiModelProperty("周期 ")
	@TableField(value = "period_")
	private PeriodEnum period;

	@PositiveOrZero(message = "销售价必须大于等于0")
	@ApiModelProperty("销售价 ")
	@TableField(value = "sale_price_")
	private BigDecimal salePrice;

	@PositiveOrZero(message = "原价必须大于等于0")
	@ApiModelProperty("原价 ")
	@TableField(value = "original_price_")
	private BigDecimal originalPrice;

	@ApiModelProperty("创建时间 ")
	@TableField(value = "create_time_")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date createTime;

	@ApiModelProperty("更新时间 ")
	@TableField(value = "update_time_")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date updateTime;

	@ApiModelProperty("创建人 ")
	@TableField(value = "create_by_")
	private Long createBy;

	@ApiModelProperty("更新人 ")
	@TableField(value = "update_by_")
	private Long updateBy;

    @ApiModelProperty("状态 1:启用 0:停用 ")
    @TableField(value = "status_")
    private Boolean status;

    @ApiModelProperty("描述文案")
    @TableField(value = "desc_")
    private String desc;

    @ApiModelProperty("会员类型")
    @TableField(value = "vip_type_")
    private EVipType vipType;

	@ApiModelProperty("折扣")
	@TableField(value = "discount_rate_")
	private BigDecimal discountRate;

	@ApiModelProperty("适用范围")
	@TableField(value = "product_type_")
	private String productType;
}