package org.dromara.erp.domain.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.erp.domain.ErpOrder;

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

/**
 * 订单显示对象
 * @Author: Antigravity
 */
@Data
@AutoMapper(target = ErpOrder.class)
public class ErpOrderVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 订单主键
     */
    @JsonProperty("rowId")
    private String rowId;

    /**
     * 订单单号
     */
    private String code;

    /**
     * 下单人
     */
    private Long placer;

    /**
     * 下单人名称
     */
    @Translation(type = TransConstant.CUSTOMER_ID_TO_NAME, mapper = "placer")
    @JsonProperty("placerName")
    private String placerName;

    /**
     * 下单时间
     */
    private Date placeTime;

    /**
     * 订单状态
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * ERP单据编号
     */
    private String erpDocCode;

    /**
     * 订单明细列表
     */
    @com.baomidou.mybatisplus.annotation.TableField(exist = false)
    private java.util.List<org.dromara.erp.domain.vo.ErpOrderDetailVo> details;

    /**
     * 订单总支数
     */
    @com.baomidou.mybatisplus.annotation.TableField(exist = false)
    private Integer totalCount;

}
