package com.liangjian.dataplatform.member.entity.po.secondary;

import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "mem_ingOrders")
public class MemIngOrders {
    @Id
    @Column(name = "OrdersCode")
    private String ordersCode;

    @Column(name = "CreationDate")
    private Date creationDate;

    @Column(name = "LastModified")
    private Date lastModified;


    @Column(name="Consignee")
    @ApiModelProperty("收货人")
    private String consignee;

    @Column(name="ADeliveryAddress")
    @ApiModelProperty("收货地区")
    private String aDeliveryAddress;

    @Column(name="OrderState")
    @ApiModelProperty("1待支付2待审核5已完成3待发货6取消订单")
    private int orderState;

    @Column(name="Address")
    @ApiModelProperty("收货地址")
    private String address;

    @Column(name="AConsigneePhone")
    @ApiModelProperty("收货人")
    private String aConsigneePhone;

    @Column(name="AccountId")
    @ApiModelProperty("下单会员手机")
    private String accountId;

    @Column(name="Openid")
    @ApiModelProperty("下单会员")
    private String openid;

    @Column(name="BuyRemark")
    @ApiModelProperty("备注")
    private String buyRemark;

    @Column(name="Amount")
    @ApiModelProperty("下单数量")
    private Integer amount;

    @ManyToOne(optional=true)
    @JoinColumn(name = "ProductCode", referencedColumnName = "ProductCode",  //关联信息
        insertable=false, updatable = false,
        foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT)) //不自动建外键
    public MemIngProduct memIngProduct;

    @Column(name="ProductCode")
    private String productCode;

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public String getBuyRemark() {
        return buyRemark;
    }

    public void setBuyRemark(String buyRemark) {
        this.buyRemark = buyRemark;
    }

    @ManyToOne(optional=true)
    @JoinColumn(name = "ordersCode", referencedColumnName = "ordersCode",  //关联信息
            insertable=false, updatable = false,
            foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT)) //不自动建外键
    public MemIngOrdersPay memIngOrdersPay;

    public MemIngOrdersPay getMemIngOrdersPay() {
        return memIngOrdersPay;
    }

    public void setMemIngOrdersPay(MemIngOrdersPay memIngOrdersPay) {
        this.memIngOrdersPay = memIngOrdersPay;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getOrdersCode() {
        return ordersCode;
    }

    public void setOrdersCode(String ordersCode) {
        this.ordersCode = ordersCode;
    }

    public Date getCreationDate() {
        return creationDate;
    }

    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }

    public Date getLastModified() {
        return lastModified;
    }

    public void setLastModified(Date lastModified) {
        this.lastModified = lastModified;
    }


    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getaDeliveryAddress() {
        return aDeliveryAddress;
    }

    public void setaDeliveryAddress(String aDeliveryAddress) {
        this.aDeliveryAddress = aDeliveryAddress;
    }

    public int getOrderState() {
        return orderState;
    }

    public void setOrderState(int orderState) {
        this.orderState = orderState;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getaConsigneePhone() {
        return aConsigneePhone;
    }

    public void setaConsigneePhone(String aConsigneePhone) {
        this.aConsigneePhone = aConsigneePhone;
    }

    public MemIngProduct getMemIngProduct() {
        return memIngProduct;
    }

    public void setMemIngProduct(MemIngProduct memIngProduct) {
        this.memIngProduct = memIngProduct;
    }
}
