package com.hc.business.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
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 = "订单表")
public class Orders 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;

    /**
     * 支付类型
     */
    @ApiModelProperty(value = "支付类型")
    private Integer type;

    /**
     * 单价
     */
    @ApiModelProperty(value = "单价")
    private Double price;

    public Orders(Integer ordersId, String orderNo,
                  @NotNull Integer userId, @NotNull Integer classId,
                  Integer orderStatus, @NotNull String body, @NotNull String subject,
                  @NotNull Double totalAmount,
                  Long createTime, String tradeNo, Long overTime, Integer isDe,
                  Integer userInvoicesId, String remark,Integer type,Double price
    ) {
        this.ordersId = ordersId;
        this.orderNo = orderNo;
        this.userId = userId;
        this.classId = classId;
        this.orderStatus = orderStatus;
        this.body = body;
        this.subject = subject;
        this.totalAmount = totalAmount;
        this.createTime = createTime;
        this.tradeNo = tradeNo;
        this.overTime = overTime;
        this.isDe = isDe;
        this.userInvoicesId = userInvoicesId;
        this.remark = remark;
        this.price = price;
        this.type = type;


    }

    public Orders() {
    }

    public Integer getOrdersId() {
        return ordersId;
    }

    public void setOrdersId(Integer ordersId) {
        this.ordersId = ordersId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public Double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public Long getOverTime() {
        return overTime;
    }

    public void setOverTime(Long overTime) {
        this.overTime = overTime;
    }

    public Integer getIsDe() {
        return isDe;
    }

    public void setIsDe(Integer isDe) {
        this.isDe = isDe;
    }

    public Integer getUserInvoicesId() {
        return userInvoicesId;
    }

    public void setUserInvoicesId(Integer userInvoicesId) {
        this.userInvoicesId = userInvoicesId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark){
        this.remark = remark;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }
}