package com.cpop.jambox.business.entity;

import com.cpop.core.base.entity.BaseEntity;
import com.cpop.core.base.entity.BaseInsertListener;
import com.cpop.core.base.entity.BaseUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.*;
import lombok.experimental.Accessors;

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

/**
 * 果酱-放心学订单表 实体类。
 *
 * @author DB
 * @since 2023-12-14
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_j_easy_learn_order", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class EasyLearnOrder extends BaseEntity implements Serializable {

    /**
     * 主键
     */
    @Id
    private String id;

    /**
     * 购买的商品信息
     */
    private String orderContent;

    /**
     * 支付状态(0：未支付；1已支付)
     */
    private Integer orderStatus;

    /**
     * 联合支付外部订单id
     */
    private String unionPayOutOrderId;

    /**
     * 云id
     */
    private String orderCloudId;

    /**
     * 外部订单号
     */
    private String outOrderNo;

    /**
     * 品牌id
     */
    private String brandId;

    /**
     * 校区id
     */
    private String storeId;

    /**
     * 客户名
     */
    private String customerName;

    /**
     * 客户电话
     */
    private String customerPhone;

    /**
     * 产品/课卡id
     */
    private String productId;

    /**
     * 总金额
     */
    private BigDecimal totalAmount;

    /**
     * 总支付金额
     */
    private BigDecimal totalPayAmount;

    /**
     * 订单类型(0：先学后付;1：月付;2：微信支付;3：数币支付;4：机构会员)
     */
    private Integer orderType;

    /**
     * 分账比例
     */
    private Double rate;

    /**
     * 模板id
     */
    private String templateId;

    /**
     * 顾问
     */
    private String counselor;

    /**
     * 逻辑删除（0否1是）
     */
    @Column(isLogicDelete = true)
    private Boolean isDelete;

}
