-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Korea-Certified-Store/feature/create-tag-…
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/main/java/com/nainga/nainga/domain/storetag/domain/StoreTag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.nainga.nainga.domain.storetag.domain; | ||
|
||
import com.nainga.nainga.domain.store.domain.Store; | ||
import com.nainga.nainga.domain.tag.domain.Tag; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class StoreTag { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "store_tag_id") | ||
private Long id; | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "store_id") | ||
private Store store; | ||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "tag_id") | ||
private Tag tag; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/nainga/nainga/domain/tag/domain/Tag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.nainga.nainga.domain.tag.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@AllArgsConstructor | ||
public class Tag { | ||
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "tag_id") | ||
private Long id; | ||
private String name; | ||
} |