package com.erp.report.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.Builder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

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

/**
 * 订单统计实体
 * 对应数据库表：orders
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("orders")
public class OrderEntity {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String shortId;
    
    private String platformOrderSn;
    
    private String platform;
    
    private Long shopId;
    
    private String shopName;
    
    private LocalDateTime orderTime;
    
    private LocalDateTime paymentTime;
    
    private LocalDateTime endTime;
    
    private String buyerNick;
    
    private String receiverName;
    
    private String receiverPhone;
    
    private String receiverAddress;
    
    private BigDecimal goodsAmount;
    
    private BigDecimal discountAmount;
    
    private BigDecimal freight;
    
    private BigDecimal totalAmount;
    
    private String orderStatus;
    
    private String platformStatus;
    
    private String erpStatus;
    
    private String auditStatus;
    
    private String auditComment;
    
    private LocalDateTime auditTime;
    
    private Long auditorId;
    
    private String rejectReason;
    
    private LocalDateTime rejectTime;
    
    private Long rejectorId;
    
    private String cancelReason;
    
    private LocalDateTime cancelTime;
    
    private String deliveryStatus;
    
    private LocalDateTime deliveryTime;
    
    private String expressCompany;
    
    private String expressCode;
    
    private String expressName;
    
    private String expressNo;
    
    private Long warehouseId;
    
    private String warehouseName;
    
    private String remark;
    
    private String matchStatus;
    
    private LocalDateTime matchTime;
    
    private String syncStatus;
    
    private String printStatus;
    
    private LocalDateTime printTime;
    
    private LocalDateTime syncTime;
    
    private LocalDateTime shipTime;
    
    private LocalDateTime remindedAt;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableLogic
    private LocalDateTime deletedAt;
}
