package shop.alien.entity.store.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 用户订单
 */
@Data
@JsonInclude
@ApiModel(description = "订单接收参数用")
public class LifeUserOrderDto {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "订单id")
    private Integer id;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "商户id")
    private String storeId;

    @ApiModelProperty(value = "订单编号")
    private String orderNo;

    @ApiModelProperty(value = "订单字符串")
    private String orderStr;

    @ApiModelProperty(value = "优惠券券id(life_discount_coupon_user)")
    private String yhquanId;

    @ApiModelProperty(value = "优惠券码(没用)")
    private String couponCode;

    @ApiModelProperty(value = "订单状态")
    private Integer status;

    @ApiModelProperty(value = "团购/代金券id")
    private Integer couponId;

    @ApiModelProperty(value = "购买类型(订单类型，1，代金券；2，团购订单)")
    private Integer couponType;

    @ApiModelProperty(value = "原价")
    private String price;

    @ApiModelProperty(value = "付款金额")
    private String finalPrice;

    @ApiModelProperty(value = "购买数量")
    private Integer count;

    @ApiModelProperty(value = "付款方式")
    private String payMethod;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;
}
