package com.izouma.dingdong.domain.backstage;


import com.izouma.dingdong.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;

@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel(value = "优先级的配置")
public class Priority extends BaseEntity {

    //0-商户 1-商品
    @ApiModelProperty(value = "类型", name = "type")
    private Integer type;

    @ApiModelProperty(value = "级别", name = "level")
    private Integer level;

    //升级条件
    @ApiModelProperty(value = "所需点赞", name = "likes")
    private Integer likes;

    //升级条件
    @ApiModelProperty(value = "所需月销", name = "monthSales")
    private Integer monthSales;

    //降级条件
    @ApiModelProperty(value = "一个月销量可为0的天数", name = "zeroSalesDay")
    private Integer zeroSalesDay;

    //降级条件
    @ApiModelProperty(value = "月最低销量", name = "lessMonthSales")
    private Integer lessMonthSales;

    @Builder.Default
    @Column(nullable = false)
    private Boolean enabled = true;
}
