/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.finance.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 订单表实体类
 *
 * @author BladeX
 * @since 2022-02-13
 */
@Data
@TableName("t_order")
@ApiModel(value = "Order对象", description = "订单表")
public class Order implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键ID
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键ID")
	private Long id;

	/**
	 * 租户号
	 */
	@ApiModelProperty(value = "租户号")
	private String tenantId;

	/**
	 * 用户ID
	 */
	@ApiModelProperty(value = "用户ID")
	private Long userId;
	/**
	 * 订货人
	 */
	@ApiModelProperty(value = "订货人")
	private String userName;
	/**
	 * 订单号
	 */
	@ApiModelProperty(value = "订单号")
	private String outTradeNo;

	/**
	 * 预授权订单号
	 */
	@ApiModelProperty(value = "授权号")
	private String grantNo;

	/**
	 * 联系电话
	 */
	@ApiModelProperty(value = "联系电话")
	private String telPhone;
	/**
	 * 订单标识
	 */
	@ApiModelProperty(value = "订单标识")
	private Integer payFlag;
	/**
	 * 支付价
	 */
	@ApiModelProperty(value = "支付价")
	private Double payFee;
	/**
	 * 总价
	 */
	@ApiModelProperty(value = "总价")
	private Double totalFee;

	@ApiModelProperty(value = "总票数")
	private Double totalTicket;
	/**
	 * 支付时间
	 */
	@ApiModelProperty(value = "支付时间")
	private Date payTime;
	/**
	 * 发货时间
	 */
	@ApiModelProperty(value = "发货时间")
	private Date sendTime;
	/**
	 * 收货时间
	 */
	@ApiModelProperty(value = "收货时间")
	private Date recordTime;
	/**
	 * 备注
	 */
	@ApiModelProperty(value = "备注")
	private String remark;
	/**
	 * 物流公司名称
	 */
	@ApiModelProperty(value = "物流公司名称")
	private String wlName;
	/**
	 * 物流单号
	 */
	@ApiModelProperty(value = "物流单号")
	private String wlNum;
	/**
	 * 物流公司代码
	 */
	@ApiModelProperty(value = "物流公司代码")
	private String wlCode;
	/**
	 * 收货地址
	 */
	@ApiModelProperty(value = "收货地址")
	private String userAddress;
	/**
	 * 邮费
	 */
	@ApiModelProperty(value = "邮费")
	private Double wlPrice;
	/**
	 * 订单类型：1酒票订单，2寄售订单
	 */
	@ApiModelProperty(value = "订单类型：1普通订单 2酒票订单，3寄售订单,")
	private Integer orderType;

	/**
	 * 配送方式
	 */
	@ApiModelProperty(value = "配送方式")
	private Integer distributeMode;
	/**
	 * 配送信息
	 */
	@ApiModelProperty(value = "配送信息")
	private String deliveryStaff;
	/**
	 * 支付方式
	 */
	@ApiModelProperty(value = "支付方式，数据来源支付方式配置表")
	private String payCode;

	/**
	 * 收货人
	 */
	@ApiModelProperty(value = "收货人")
	private String receivingName;
	/**
	 * 是否退款
	 */
	@ApiModelProperty(value = "是否退款")
	private Integer isRefund;
	/**
	 * 订单状态 用于
	 */
	@ApiModelProperty(value = "状态")
	private Integer orderState;

	/**
	 * 删除标识
	 */
	@JsonIgnore
	@TableLogic
	@ApiModelProperty(value = "删除标识")
	private Integer isDeleted;

	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间")
	private Date updateTime;
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private Date createTime;

}
