Skip to content

Commit

Permalink
#1 fix: Produce Entity에 User와의 연관관계 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
JoongHyun-Kim committed Jan 17, 2024
1 parent 04d060d commit 00b4c18
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.kkobugi.puremarket.produce.entity;

import com.kkobugi.puremarket.common.BaseEntity;
import com.kkobugi.puremarket.user.entity.User;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -15,6 +16,10 @@ public class Produce extends BaseEntity {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long produceIdx;

@ManyToOne
@JoinColumn(nullable = false, name = "userIdx")
private User user;

@Column(nullable = false, length = 100)
private String title;

Expand Down

0 comments on commit 00b4c18

Please sign in to comment.