package cn.com.ctop.performanceappraisal.entity;

import cn.com.ctop.performanceappraisal.vo.OptimizerCostDetailVO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.util.Date;

/**
 * 优化师绩效信息
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2019-12-13
 */
@Data
@TableName("ctop_performance_optimizer")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ctop_performance_optimizer对象", description = "优化师绩效信息")
public class PerformanceOptimizer {

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 总消耗
     */
    @Excel(name = "总消耗", width = 15)
    @ApiModelProperty(value = "总消耗")
    private java.math.BigDecimal totalCost;
    /**
     * 总提成
     */
    @Excel(name = "总提成", width = 15)
    @ApiModelProperty(value = "总提成")
    private java.math.BigDecimal totalRoyalty;
    /**
     * 年
     */
    @Excel(name = "年", width = 15)
    @ApiModelProperty(value = "年")
    private String year;
    /**
     * 季度
     */
    @Excel(name = "季度", width = 15)
    @ApiModelProperty(value = "季度")
    private String quarter;
    /**
     * 用户id
     */
    @Excel(name = "用户id", width = 15)
    @ApiModelProperty(value = "用户id")
    private String userId;
    /**
     * 用户名称
     */
    @Excel(name = "用户名称", width = 15)
    @ApiModelProperty(value = "用户名称")
    private String realname;
    /**
     * 媒体类型
     */
    @Excel(name = "媒体类型", width = 15)
    @ApiModelProperty(value = "媒体类型")
    private Integer appType;
    /**
     * createTime
     */
    @ApiModelProperty(value = "createTime")
    private Date createTime;
    /**
     * updateTime
     */
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;

    public PerformanceOptimizer() {
    }

    public PerformanceOptimizer(OptimizerCostDetailVO vo) {
        this.appType = vo.getAppType();
        this.totalCost = vo.getTotalCost();
        this.totalRoyalty = vo.getTotalRoyalty();
        this.year = vo.getYear();
        this.quarter = vo.getQuarter();
        this.userId = vo.getUserId();
        this.realname = vo.getRealName();
        this.appType = vo.getAppType();
    }
}
