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

import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;

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


@Entity
@Table(name = "mem_ingProductLevel")
public class MemIngProductLevel {
    @Id
    @GeneratedValue(generator = "metaRelGenerator")
    @GenericGenerator(name = "metaRelGenerator", strategy = "guid")
    @Column(name = "PlId")
    private String plId;

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

    @Column(name = "LevelId")
    private String levelId;

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

    @Column(name = "MarketIng")
    private Integer marketIng;

    @Column(name = "MarketPrice")
    @ApiModelProperty("等级价格(分)")
    private Integer marketPrice;

    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "LevelId", referencedColumnName = "id",  //关联信息
            insertable=false, updatable = false,
            foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT)) //不自动建外键
    private UserLevelUnit level;

    public String getPlId() {
        return plId;
    }

    public void setPlId(String plId) {
        this.plId = plId;
    }

    public String getProductCode() {
        return productCode;
    }

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

    public String getLevelId() {
        return levelId;
    }

    public void setLevelId(String levelId) {
        this.levelId = levelId;
    }

    public Date getCreationDate() {
        return creationDate;
    }

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

    public Integer getMarketIng() {
        return marketIng;
    }

    public void setMarketIng(Integer marketIng) {
        this.marketIng = marketIng;
    }

    public Integer getMarketPrice() {
        return marketPrice;
    }

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

    public UserLevelUnit getLevel() {
        return level;
    }

    public void setLevel(UserLevelUnit level) {
        this.level = level;
    }
}
