package com.izouma.dingdong.dto;

import com.izouma.dingdong.domain.OrderGoodsSpec;
import com.izouma.dingdong.domain.User;
import com.izouma.dingdong.enums.MerchantStatus;
import com.izouma.dingdong.enums.OrderStatus;
import com.izouma.dingdong.enums.PayMethod;
import com.izouma.dingdong.enums.RiderStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel(value = "")
public class OrderDTO {

    private String avatar;

    private String nickname;

    @ApiModelProperty(value = "用户地址", name = "address")
    private String address;

    private String merchantName;

    private String logo;

    private MerchantStatus merchantStatus;

    private String riderName;

    private RiderStatus riderStatus;

    @ApiModelProperty(value = "配送费", name = "deliveryAmount")
    private BigDecimal deliveryAmount;

    @ApiModelProperty(value = "实付金额", name = "realAmount")
    private BigDecimal realAmount;

    @ApiModelProperty(value = "支付方式", name = "payMethod")
    private PayMethod payMethod;

    @Column(nullable = false)
    @ApiModelProperty(value = "取消订单", name = "cancel")
    private Boolean cancel = false;

    @ApiModelProperty(value = "下单时间", name = "orderTime")
    private LocalDateTime orderTime;

    @Column(nullable = false)
    @ApiModelProperty(value = "已评价", name = "rated")
    private Boolean rated = false;

    @ApiModelProperty(value = "订单状态", name = "orderStatus")
    private OrderStatus status;

    @ApiModelProperty(value = "满减", name = "fullReduction")
    private BigDecimal fullReduction;

    @ApiModelProperty(value = "首单", name = "firstBuy")
    private BigDecimal firstBuy;

    @ApiModelProperty(value = "红包", name = "redBag")
    private BigDecimal redBag;

    @ApiModelProperty(value = "新用户", name = "newUser")
    private BigDecimal newUser;

    @ApiModelProperty(value = "商品及规格")
    private List<OrderGoodsSpec> orderGoodsSpecs;


    private User user;


}
