package com.hc.business.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import tk.mybatis.mapper.annotation.Order;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 订单表(Orders)实体类
 *
 * @author java
 * @since 2020-11-26 16:46:40
 */

@ApiModel(value = "订单表")
@Data
public class ZccmOrders implements Serializable {

    private static final long serialVersionUID = 204802189701833123L;


    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "主键id")
    @Order("DESC")
    private Integer ordersId;

    /**
     * 订单号
     */
    @ApiModelProperty(value = "订单号")
    @NotBlank
    private String orderNo;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id", required = true)
    @NotNull
    private Integer userId;

    /**
     * 班级id
     */
    @ApiModelProperty(value = "班级id", required = true)
    @NotNull
    private Integer classId;

    /**
     * 订单状态
     */
    @ApiModelProperty(value = "订单状态 0 未支付 1 已支付 2 已退款")
    private Integer orderStatus;

    /**
     * 商品介绍
     */
    @ApiModelProperty(value = "商品介绍", required = true)
    @NotNull
    private String body;

    /**
     * 订单名称
     */
    @ApiModelProperty(value = "订单名称", required = true)
    @NotNull
    private String subject;

    /**
     * 订单总金额
     */
    @ApiModelProperty(value = "订单总金额", required = true)
    @NotNull
    private Double totalAmount;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Long createTime;

    /**
     * 支付宝交易号
     */
    @ApiModelProperty(value = "支付宝交易号")
    private String tradeNo;

    /**
     * 失效时间
     */
    @ApiModelProperty(value = "失效时间")
    private Long overTime;

    /**
     * 订单备注
     */
    @ApiModelProperty(value = "订单备注")
    private String remark;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除 1 未删除 0 已删除")
    private Integer isDe;

    /**
     * 发票id
     */
    @ApiModelProperty(value = "发票id")
    private Integer userInvoicesId;


}