package com.hzs.common.domain.ground.order;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.hzs.common.core.annotation.Transaction;
import com.hzs.common.core.constant.EnumsPrefixConstants;
import com.hzs.common.core.web.domain.BaseEntity;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * <p>
 * 销售订单-三方结算表
 * </p>
 *
 * @author hzs
 * @since 2024-04-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@KeySequence("SA_ORDER_SETTLE_SEQ")
@TableName("SA_ORDER_SETTLE")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SaOrderSettle extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("PK_ID")
    private Long pkId;

    /**
     * 销售订单主表
     */
    @TableField("PK_ORDER")
    private Long pkOrder;

    /**
     * 销售订单明细表
     */
    @TableField("PK_ORDER_ITEMS")
    private Long pkOrderItems;

    /**
     * 供应商
     */
    @TableField("PK_SUPPLIER")
    private Integer pkSupplier;

    /**
     * 价格
     */
    @TableField("PRICE")
    private BigDecimal price;

    /**
     * 数量
     */
    @TableField("QUANTITY")
    private Integer quantity;

    /**
     * 邮费
     */
    @TableField("POSTAGE")
    private BigDecimal postage;

    /**
     * 总价
     */
    @TableField("TOTAL_PRICE")
    private BigDecimal totalPrice;

    /**
     * 结算状态（0=是 1=否）
     */
    @TableField("SETTLE_STATUS")
    @Transaction(transactionKey= EnumsPrefixConstants.DEALER_YES_NO)
    private Integer settleStatus;

}
