package com.liquidnet.service.goblin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.liquidnet.service.goblin.dto.GoblinNftExCodeNumDto;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author jiangxiulong
 * @since 2022-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinNftExCodeTask implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "mid", type = IdType.AUTO)
    private Long mid;

    private String taskId;

    private String activityId;

    private String storeId;

    private String spuId;

    private String skuId;

    private String unbox;

    private Integer exStock;

    private Integer exLimit;

    private Integer typ;

    private LocalDateTime exStartTime;

    private LocalDateTime exStopTime;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;

    private  final  static GoblinNftExCodeTask obj = new GoblinNftExCodeTask();

    public static GoblinNftExCodeTask getNew(){
        try {
            return  (GoblinNftExCodeTask) obj.clone();
        }catch (CloneNotSupportedException e){
            return new GoblinNftExCodeTask();
        }
    }

    public GoblinNftExCodeTask copy(GoblinNftExCodeNumDto vo) {
        if (null == vo) return this;

        this.setActivityId(vo.getActivityId());
        this.setStoreId(vo.getStoreId());
        this.setSpuId(vo.getSpuId());
        this.setSkuId(vo.getSkuId());
        this.setUnbox(vo.getUnbox());
        this.setExStock(vo.getNum());
        this.setExLimit(0);
        this.setExStartTime(vo.getExStartTime());
        this.setExStopTime(vo.getExStopTime());
        this.setTyp(1);

        return this;
    }



}
