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 com.ghy.payment.domain.FinancialMaster;
import com.ghy.worker.domain.Worker;
import lombok.Data;

import java.util.Date;

/**
 * @author clunt
 * 主单表(对应付款订单)
 */
@Data
public class OrderMaster extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC)
    private Long id;

    @Excel(name = "商户ID", cellType = Excel.ColumnType.NUMERIC)
    private Long deptId;

    @Excel(name = "订单编码", cellType = Excel.ColumnType.STRING)
    private String code;

    @Excel(name = "消费者用户id", cellType = Excel.ColumnType.NUMERIC)
    private Long customerId;

    @Excel(name = "地址id", cellType = Excel.ColumnType.NUMERIC)
    private Long addressId;

    @Excel(name = "订单类型", cellType = Excel.ColumnType.NUMERIC)
    private Integer orderType;

    @Excel(name = "订单状态", cellType = Excel.ColumnType.NUMERIC)
    private Integer orderStatus;

    @Excel(name = "付款类型", cellType = Excel.ColumnType.NUMERIC)
    private Integer payType;

    @Excel(name = "付款状态", cellType = Excel.ColumnType.NUMERIC)
    private Integer payStatus;

    @Excel(name = "接单师傅id", cellType = Excel.ColumnType.NUMERIC)
    private Long workerId;

    @Excel(name = "付款时间", cellType = Excel.ColumnType.STRING)
    private Date payTime;

    @Excel(name = "接单时间", cellType = Excel.ColumnType.STRING)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date revTime;

    private Worker worker;

    private FinancialMaster financialMaster;

    private OrderGoods orderGoods;

}
