package shop.alien.entity.second.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import shop.alien.entity.second.SecondGoods;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;

@Data
@JsonInclude
@ApiModel(value = "二手商品发布", description = "发布")
public class SellGoodsVo extends SecondGoods {

    @ApiModelProperty(value = "保存方式 0:草稿 1:发布")
    private Integer saveType;

    @ApiModelProperty(value = "商品距离")
    private String distance;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户名称")
    private String userName;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户真名")
    private String realName;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户电话")
    private String userPhone;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户头像")
    private String userImage;

    @TableField(exist = false)
    @ApiModelProperty(value = "收藏状态 默认为 0")
    private Integer collectStatus = 0;

    @TableField(exist = false)
    @ApiModelProperty(value = "点赞状态 默认为 0")
    private Integer likeStatus = 0;

    @ApiModelProperty("一级分类名称")
    @TableField(exist = false)
    private String categoryOneName;

    @ApiModelProperty("二级分类名称")
    @TableField(exist = false)
    private String categoryTwoName;

    /** -------------------- 搜索入参 -------------------- */

    @TableField(exist = false)
    @ApiModelProperty(value = "当前页码")
    private Integer pageNum = 1;

    @ApiModelProperty(value = "每页数量")
    private Integer pageSize = 10;

    @ApiModelProperty(value = "当前经度")
    private Double currentLatitude;

    @ApiModelProperty(value = "当前纬度")
    private Double currentLongitude;



    @ApiModelProperty(value = "买家id")
    private Integer buyerId;

    @ApiModelProperty(value = "卖家id")
    private Integer sellerId;

    @ApiModelProperty(value = "交易时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date transactionTime;

    @ApiModelProperty(value = "交易地点(经纬度)")
    private String transactionLatitudeLongitude;

    @ApiModelProperty(value = "交易地点(详细地址)")
    private String transactionLocation;

    @ApiModelProperty(value = "交易金额")
    private BigDecimal transactionAmount;

    @ApiModelProperty(value = "买家交易状态  1-交易成功  2-交易失败")
    private Integer buyerTransactionStatus;

    @ApiModelProperty(value = "卖家交易状态  1-交易成功  2-交易失败")
    private Integer sellerTransactionStatus;

    @ApiModelProperty(value = "交易状态  1-待确认  2-已拒绝  3-待交易  4-交易成功  5-交易失败  6-交易取消")
    private Integer tradeStatus;

    @ApiModelProperty(value = "买家评价")
    private String buyerEvaluate;

    @ApiModelProperty(value = "卖家评价")
    private String sellerEvaluate;

    @ApiModelProperty(value = "交易对方的用户ID")
    private Integer otherPartyId;

    @ApiModelProperty(value = "商品id")
    @TableField("goods_id")
    private Integer goodsId;

    @ApiModelProperty(value = "交易地点(经纬度地址)")
    @TableField("transaction_latitude_longitude_address")
    private String transactionLatitudeLongitudeAddress;


    @ApiModelProperty(value = "买家是否签到  0-未签到  1-已签到")
    @TableField("buyer_sign_in")
    private Integer buyerSignIn;

    @ApiModelProperty(value = "买家签到时间")
    @TableField("buyer_sign_in_time")
    private Date buyerSignInTime;

    @ApiModelProperty(value = "买家签到地点(经纬度)")
    @TableField("buyer_sign_in_latitude_longitude")
    private String buyerSignInLatitudeLongitude;

    @ApiModelProperty(value = "买家签到地点(经纬度)")
    @TableField("buyer_sign_in_latitude_longitude_address")
    private String buyerSignInLatitudeLongitudeAddress;

    @ApiModelProperty(value = "卖家是否签到  0-未签到  1-已签到")
    @TableField("seller_sign_in")
    private Integer sellerSignIn;

    @ApiModelProperty(value = "卖家签到时间")
    @TableField("seller_sign_in_time")
    private Date sellerSignInTime;

    @ApiModelProperty(value = "卖家签到地点(经纬度)")
    @TableField("seller_sign_in_latitude_longitude")
    private String sellerSignInLatitudeLongitude;

    @ApiModelProperty(value = "卖家签到地点(经纬度地址)")
    @TableField("seller_sign_in_latitude_longitude_address")
    private String sellerSignInLatitudeLongitudeAddress;

    @ApiModelProperty(value = "取消交易的用户id")
    @TableField("cancel_user_id")
    private Integer cancelUserId;

    @ApiModelProperty(value = "取消交易原因(字典表_cancelTradeReason)")
    @TableField("cancel_reason")
    private String cancelReason;

    @ApiModelProperty(value = "取消交易原因补充")
    @TableField("cancel_reason_supplement")
    private String cancelReasonSupplement;

    @ApiModelProperty(value = "当前时间是否超过交易时间  0-否  1-是")
    private String timeOutFlag;

}
