package com.liquidnet.service.goblin.dto.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.liquidnet.service.goblin.entity.GoblinNftExSku;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @Author: wll
 * @Description:
 * @Date:Create：in 2022/4/19 2:23 下午
 */

@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinNftExSkuVo {


    private static final long serialVersionUID = 1L;

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


    /**
     * 活动id
     */
    private String activityId;

    /**
     * 商品id
     */
    private String spuId;


    /**
     * 款式id
     */
    private String skuId;


    /**
     * 兑换库存
     */
    private Integer exStock;

    /**
     * 兑换限购
     */
    private Integer exLimit;


    /**
     * 兑换生效开始时间
     */
    private LocalDateTime exStartTime;


    /**
     * 兑换生效结束时间
     */
    private LocalDateTime exStopTime;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 修改时间
     */
    private LocalDateTime updatedAt;

    private  static  final GoblinNftExSkuVo obj = new GoblinNftExSkuVo();

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



    public GoblinNftExSkuVo copy(GoblinNftExSku goblinNftExSku){
        if (null == goblinNftExSku) return this;
        this.setActivityId(goblinNftExSku.getActivityId());
        this.setSpuId(goblinNftExSku.getSpuId());
        this.setSkuId(goblinNftExSku.getSkuId());
        this.setExStock(goblinNftExSku.getExStock());
        this.setExLimit(goblinNftExSku.getExLimit());
        this.setExStartTime(goblinNftExSku.getExStartTime());
        this.setExStopTime(goblinNftExSku.getExStopTime());
        this.setCreatedAt(goblinNftExSku.getCreatedAt());
        this.setUpdatedAt(goblinNftExSku.getUpdatedAt());
        return this;
    }














}
