package com.ghy.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ghy.common.annotation.Excel;
import com.ghy.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Date;

/**
 * @author clunt
 * 订单关联商品，即所有商品清单
 */
@Data
public class OrderGoods extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Excel(name = "订单商品id")
    private Long orderGoodsId;

    @Excel(name = "订单id, 可以为主单或者细单", cellType = Excel.ColumnType.NUMERIC)
    private Long orderId;

    @Excel(name = "商品id", cellType = Excel.ColumnType.NUMERIC)
    private Long goodsId;

    @Excel(name = "商品名称", cellType = Excel.ColumnType.STRING)
    private String goodsName;

    @Excel(name = "商品数量", cellType = Excel.ColumnType.NUMERIC)
    private Integer goodsNum;

    @Excel(name = "已服务数量", cellType = Excel.ColumnType.NUMERIC)
    private Integer serverGoodsNum;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date finishTime;

}
