package com.xkrs.model.entity;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * @Author: XinYi Song
 * @Date: 2021/12/15 13:41
 */
@Entity
@Table(name="product")
public class ProductEntity {
    /**
     * 指定主键，建立自增序列，主键值取自序列
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    //@SequenceGenerator(name = "product_seq_gen", sequenceName = "product_id_seq",allocationSize = 1)
    private Integer id;

    /**
     * 商品名称
     */
    private String productName;

    /**
     * 省
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String productPro;

    /**
     * 市
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String productCity;

    /**
     * 区
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String productCounty;

    /**
     * 商品描述
     */
    private String productDescription;

    /**
     * 商品分类
     */
    private Integer productCategories;

    /**
     * 商品价格
     */
    private BigDecimal productPrice;

    /**
     * 商品上架状态（默认0，1上架，2下架）
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String shelfType;

    /**
     * 审核状态（默认（待审核）0 ，1区县审核，2市级审核，3总部审核，4不通过）
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String reviewType;

    /**
     * 商家id
     */
    private Integer businessId;

    /**
     * 用户身份
     */
    @Column(length = 32, columnDefinition = "varchar(32)")
    private String userIdentity;

    /**
     * 商品封面
     */
    @Column(length = 5000, columnDefinition = "varchar(5000)")
    private String productCover;

    /**
     * 商品内容图片
     */
    @Column(length = 5000, columnDefinition = "varchar(5000)")
    private String productContent;

    /**
     * 商品上架的时间
     */
    @Column(length = 65, columnDefinition = "varchar(65)")
    private String productTime;

    /**
     * 电子协议路径
     */
    private String productContractPath;

    /**
     * 提交时间
     */
    @Column(length = 65, columnDefinition = "varchar(65)")
    private String submitTime;

    public ProductEntity() {
    }

    public ProductEntity(Integer id, String productName, String productPro, String productCity, String productCounty, String productDescription, Integer productCategories, BigDecimal productPrice, String shelfType, String reviewType, Integer businessId, String userIdentity, String productCover, String productContent, String productTime, String productContractPath, String submitTime) {
        this.id = id;
        this.productName = productName;
        this.productPro = productPro;
        this.productCity = productCity;
        this.productCounty = productCounty;
        this.productDescription = productDescription;
        this.productCategories = productCategories;
        this.productPrice = productPrice;
        this.shelfType = shelfType;
        this.reviewType = reviewType;
        this.businessId = businessId;
        this.userIdentity = userIdentity;
        this.productCover = productCover;
        this.productContent = productContent;
        this.productTime = productTime;
        this.productContractPath = productContractPath;
        this.submitTime = submitTime;
    }

    public Integer getId() {
        return id;
    }

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

    public String getProductName() {
        return productName;
    }

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

    public String getProductPro() {
        return productPro;
    }

    public void setProductPro(String productPro) {
        this.productPro = productPro;
    }

    public String getProductCity() {
        return productCity;
    }

    public void setProductCity(String productCity) {
        this.productCity = productCity;
    }

    public String getProductCounty() {
        return productCounty;
    }

    public void setProductCounty(String productCounty) {
        this.productCounty = productCounty;
    }

    public String getProductDescription() {
        return productDescription;
    }

    public void setProductDescription(String productDescription) {
        this.productDescription = productDescription;
    }

    public Integer getProductCategories() {
        return productCategories;
    }

    public void setProductCategories(Integer productCategories) {
        this.productCategories = productCategories;
    }

    public BigDecimal getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(BigDecimal productPrice) {
        this.productPrice = productPrice;
    }

    public String getShelfType() {
        return shelfType;
    }

    public void setShelfType(String shelfType) {
        this.shelfType = shelfType;
    }

    public String getReviewType() {
        return reviewType;
    }

    public void setReviewType(String reviewType) {
        this.reviewType = reviewType;
    }

    public Integer getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Integer businessId) {
        this.businessId = businessId;
    }

    public String getUserIdentity() {
        return userIdentity;
    }

    public void setUserIdentity(String userIdentity) {
        this.userIdentity = userIdentity;
    }

    public String getProductCover() {
        return productCover;
    }

    public void setProductCover(String productCover) {
        this.productCover = productCover;
    }

    public String getProductContent() {
        return productContent;
    }

    public void setProductContent(String productContent) {
        this.productContent = productContent;
    }

    public String getProductTime() {
        return productTime;
    }

    public void setProductTime(String productTime) {
        this.productTime = productTime;
    }

    public String getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(String submitTime) {
        this.submitTime = submitTime;
    }

    @Override
    public String toString() {
        return "ProductEntity{" +
                "id=" + id +
                ", productName='" + productName + '\'' +
                ", productPro='" + productPro + '\'' +
                ", productCity='" + productCity + '\'' +
                ", productCounty='" + productCounty + '\'' +
                ", productDescription='" + productDescription + '\'' +
                ", productCategories=" + productCategories +
                ", productPrice=" + productPrice +
                ", shelfType='" + shelfType + '\'' +
                ", reviewType='" + reviewType + '\'' +
                ", businessId=" + businessId +
                ", userIdentity='" + userIdentity + '\'' +
                ", productCover='" + productCover + '\'' +
                ", productContent='" + productContent + '\'' +
                ", productTime='" + productTime + '\'' +
                ", productContractPath='" + productContractPath + '\'' +
                ", submitTime='" + submitTime + '\'' +
                '}';
    }
}
