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

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;

/**
 * @Author: 黄子奇
 * @Date: 2019/11/30
 */
@Entity
@Table(name = "OrderProducts")
@ApiModel("商品信息")
public class OrderProducts implements Serializable {
    @ApiModelProperty("商品图片")
    @OneToMany(fetch = FetchType.EAGER)
    @JoinColumn(name = "ProductCode", referencedColumnName = "ProductCode",  //关联信息
            insertable=false, updatable = false,
            foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT)) //不自动建外键
    private Set<ProductImages> productImages;

    @ApiModelProperty("商品简略信息")
    @OneToMany(fetch = FetchType.EAGER)
    @JoinColumn(name = "ProductCode", referencedColumnName = "ProductCode",  //关联信息
            insertable=false, updatable = false,
            foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT)) //不自动建外键
    private Set<ProductSmall> productSmalls;

    @Id
    @ApiModelProperty("Id")
    @Column(name = "Id")
    private String id;

    @ApiModelProperty("创建时间")
    @Column(name = "CreationDate")
    private Date creationDate;

    @ApiModelProperty("修改时间")
    @Column(name = "LastModified")
    private Date lastModified;

    @ApiModelProperty("订单编号")
    @Column(name = "OrdersCode")
    private String ordersCode;

    @ApiModelProperty("商品Id")
    @Column(name = "ProductCode")
    private Integer productCode;

    @ApiModelProperty("商品名称")
    @Column(name = "ProductName")
    private String productName;

    @ApiModelProperty("规格")
    @Column(name = "Packing")
    private String packing;

    @ApiModelProperty("厂家")
    @Column(name = "Manufacturer")
    private String manufacturer;

    @ApiModelProperty("商品数量")
    @Column(name = "Amount")
    private Integer amount;

    @ApiModelProperty("健客商品单价")
    @Column(name = "OurPrice")
    private Integer ourPrice;

    @ApiModelProperty("实际成交单价")
    @Column(name = "ActualPrice")
    private Integer actualPrice;

    @ApiModelProperty("市场商品单价")
    @Column(name = "MarketPrice")
    private Integer marketPrice;

    @ApiModelProperty("采购价")
    @Column(name = "PurchasePrice")
    private Integer purchasePrice;

    @Column(name = "ProductPromotionSet")
    private String productPromotionSet;

    @Column(name = "IntegralAmount")
    private Double integralAmount;

    @Column(name = "AssociateProudctCode")
    private String associateProudctCode;

    @Column(name = "Unit")
    private String unit;

    @Column(name = "Barcode")
    private String barcode;

    @Column(name = "Picture")
    private String picture;

    @Column(name = "DamagedRemark")
    private String damagedRemark;

    @Column(name = "ProductTariff")
    private Integer productTariff;

    @Column(name = "TariffPrice")
    private Integer tariffPrice;

    @Column(name = "ConsumptionTariff")
    private Integer consumptionTariff;

    @Column(name = "IncrementTariff")
    private Integer incrementTariff;

    @Column(name = "Batch")
    private String batch;

    @Column(name = "ProfitLevel")
    private String profitLevel;

    @Column(name = "AvgDiscount")
    private Integer avgDiscount;

    @Column(name = "AvgFreight")
    private Integer avgFreight;

    @Column(name = "Category")
    private String category;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    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 getOrdersCode() {
        return ordersCode;
    }

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

    public Integer getProductCode() {
        return productCode;
    }

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

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getPacking() {
        return packing;
    }

    public void setPacking(String packing) {
        this.packing = packing;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public Integer getAmount() {
        return amount;
    }

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

    public Integer getOurPrice() {
        return ourPrice;
    }

    public void setOurPrice(Integer ourPrice) {
        this.ourPrice = ourPrice;
    }

    public Integer getActualPrice() {
        return actualPrice;
    }

    public void setActualPrice(Integer actualPrice) {
        this.actualPrice = actualPrice;
    }

    public Integer getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(Integer marketPrice) {
        this.marketPrice = marketPrice;
    }

    public Integer getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(Integer purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public String getProductPromotionSet() {
        return productPromotionSet;
    }

    public void setProductPromotionSet(String productPromotionSet) {
        this.productPromotionSet = productPromotionSet;
    }

    public Double getIntegralAmount() {
        return integralAmount;
    }

    public void setIntegralAmount(Double integralAmount) {
        this.integralAmount = integralAmount;
    }

    public String getAssociateProudctCode() {
        return associateProudctCode;
    }

    public void setAssociateProudctCode(String associateProudctCode) {
        this.associateProudctCode = associateProudctCode;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getDamagedRemark() {
        return damagedRemark;
    }

    public void setDamagedRemark(String damagedRemark) {
        this.damagedRemark = damagedRemark;
    }

    public Integer getProductTariff() {
        return productTariff;
    }

    public void setProductTariff(Integer productTariff) {
        this.productTariff = productTariff;
    }

    public Integer getTariffPrice() {
        return tariffPrice;
    }

    public void setTariffPrice(Integer tariffPrice) {
        this.tariffPrice = tariffPrice;
    }

    public Integer getConsumptionTariff() {
        return consumptionTariff;
    }

    public void setConsumptionTariff(Integer consumptionTariff) {
        this.consumptionTariff = consumptionTariff;
    }

    public Integer getIncrementTariff() {
        return incrementTariff;
    }

    public void setIncrementTariff(Integer incrementTariff) {
        this.incrementTariff = incrementTariff;
    }

    public String getBatch() {
        return batch;
    }

    public void setBatch(String batch) {
        this.batch = batch;
    }

    public String getProfitLevel() {
        return profitLevel;
    }

    public void setProfitLevel(String profitLevel) {
        this.profitLevel = profitLevel;
    }

    public Integer getAvgDiscount() {
        return avgDiscount;
    }

    public void setAvgDiscount(Integer avgDiscount) {
        this.avgDiscount = avgDiscount;
    }

    public Integer getAvgFreight() {
        return avgFreight;
    }

    public void setAvgFreight(Integer avgFreight) {
        this.avgFreight = avgFreight;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public Set<ProductImages> getProductImages() {
        return productImages;
    }

    public void setProductImages(Set<ProductImages> productImages) {
        this.productImages = productImages;
    }

    public Set<ProductSmall> getProductSmalls() {
        return productSmalls;
    }

    public void setProductSmalls(Set<ProductSmall> productSmalls) {
        this.productSmalls = productSmalls;
    }
}
