package com.liquidnet.service.kylin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
public class KylinGroupBuyOrder implements Serializable, Cloneable {
    private static final long serialVersionUID = 1L;

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

    private String groupOrderId;
    private String activityId;
    private String leaderUserId;
    private String orderTicketsId;
    private Integer targetCount;
    private Integer currentCount;
    private Integer status;
    private Integer isPublic;
    private String shareToken;
    private LocalDateTime expiresAt;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;

    private static final KylinGroupBuyOrder obj = new KylinGroupBuyOrder();

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