package com.xkrs.model.entity;

import javax.persistence.*;

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

    /**
     * 商品内容图片
     */
    private String productContentPhoto;

    /**
     * 商品id
     */
    private Integer productId;

    public ProductContentPhotoEntity() {
    }

    public ProductContentPhotoEntity(Integer id, String productContentPhoto, Integer productId) {
        this.id = id;
        this.productContentPhoto = productContentPhoto;
        this.productId = productId;
    }

    public Integer getId() {
        return id;
    }

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

    public String getProductContentPhoto() {
        return productContentPhoto;
    }

    public void setProductContentPhoto(String productContentPhoto) {
        this.productContentPhoto = productContentPhoto;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    @Override
    public String toString() {
        return "ProductContentPhotoEntity{" +
                "id=" + id +
                ", productContentPhoto='" + productContentPhoto + '\'' +
                ", productId=" + productId +
                '}';
    }
}
