package com.liquidnet.service.kylin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

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

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 订单关系
 * </p>
 *
 * @author liquidnet
 * @since 2021-05-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class KylinOrderTicketRelations implements Serializable, Cloneable {

    private static final long serialVersionUID = 1L;

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

    /**
     * order_ticket_relations_id
     */
    private String orderTicketRelationsId;

    /**
     * 订单id
     */
    private String orderId;

    /**
     * 转增订单id
     */
    private String transferId;

    /**
     * 转增用户id
     */
    private String transferUid;

    /**
     * 关联直播id
     */
    private String liveId;

    /**
     * 分销代理id
     */
    private String agentId;

    /**
     * 代理状态[1-开启|2-关闭]
     */
    private int agentStatus;

    /**
     * 票提
     */
    private BigDecimal agentDistributions;

    /**
     * 总代ID
     */
    private String agentIdMaster;


    /**
     * 抽成票提
     */
    private BigDecimal agentDistributionsMaster;


    /**
     * 购买者是否是会员
     */
    private Integer isMember;

    /**
     * 演出id
     */
    private String performanceId;

    /**
     * 场次id
     */
    private String timeId;

    /**
     * 票id
     */
    private String ticketId;

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

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

    /**
     * 获取 添加 数据库参数
     *
     * @return
     */
    public Object[] getAddObject() {
        return new Object[]{
                orderTicketRelationsId, orderId, transferId, liveId, agentId, isMember, performanceId, timeId, ticketId, createdAt, updatedAt, agentStatus, agentDistributions, agentIdMaster, agentDistributionsMaster
        };
    }

    private static final KylinOrderTicketRelations obj = new KylinOrderTicketRelations();

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