package com.hys.app.model.erp.dos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hys.app.model.erp.enums.OrderTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 订单明细 DO
 *
 * @author 张崧
 * 2024-01-24 16:39:38
 */
@TableName("erp_order_send_item")
@Data
public class OrderSendItemDO implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(name = "send_order_id", value = "订单id")
    private Long sendOrderId;

    @ApiModelProperty(name = "order_id", value = "订单id")
    private Long orderId;

    @ApiModelProperty(name = "order_item_id", value = "订单明细id")
    private Long orderItemId;


    @ApiModelProperty(name = "goods_id", value = "商品id")
    private Long goodsId;

    @ApiModelProperty(name = "product_id", value = "产品id")
    private Long productId;

    @ApiModelProperty(name = "num", value = "销售数量")
    private Integer num;

    @ApiModelProperty(name = "pay_price", value = "应付金额（总）")
    private Double payPrice;

    @ApiModelProperty(name = "product_stock_id", value = "库存id")
    private Long productStockId;

    @ApiModelProperty(name = "end_time", value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;


    @ApiModelProperty(name = "type", value = "订单类型")
    private OrderTypeEnum orderType;



    @ApiModelProperty(name = "remark", value = "备注")
    private String remark;

    @TableField(exist = false)
    private List<AreaStock> areaStockList;

}
