package org.zheng.demo.entity;

import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.MapsId;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "T_PRODUCT_PROFILE")
@Data
@NoArgsConstructor
public class ProductProfile {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;

	@MapsId("id") // maps to primary "id"
	@OneToOne
	@JoinColumn(name = "id") // foreign key column in T_PRODUCT Table
	private Product product;
	
	private String productDetail;

}
