package com.cpop.mall.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;

/**
 * 商城订单详情表 实体类。
 *
 * @author DB
 * @since 2023-10-24
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Table(value = "cp_mall_order_detail", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
public class OrderDetail extends BaseEntity implements Serializable {

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

    /**
     * 商品记录id
     */
    @Id
    private String productRecordId;

    /**
     * 金额
     */
    private BigDecimal amount;

    /**
     * 积分
     */
    private Integer point;

    /**
     * 下单数量
     */
    private Integer number;

    /**
     * 店铺(校区)id
     */
    private String storeId;

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

}
