Skip to content

Commit

Permalink
Merge pull request #15 from Korea-Certified-Store/feature/create-tag-…
Browse files Browse the repository at this point in the history
…entity(#10)

Tag Entity 생성 (#10)
  • Loading branch information
sungjindev authored Jan 4, 2024
2 parents a2db3b2 + 78ed223 commit 23e1500
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
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 src/main/java/com/nainga/nainga/domain/tag/domain/Tag.java
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;
}

0 comments on commit 23e1500

Please sign in to comment.