-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/chat
- Loading branch information
Showing
9 changed files
with
219 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -38,3 +38,4 @@ out/ | |
|
||
### JREBEL ### | ||
rebel.xml | ||
|
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,33 @@ | ||
package com.kusitms.jipbap.food; | ||
|
||
import com.kusitms.jipbap.common.entity.DateEntity; | ||
import com.kusitms.jipbap.store.Store; | ||
import com.kusitms.jipbap.user.User; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "tb_cart") | ||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Cart extends DateEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name ="cart_id") | ||
private Long id; //고유 pk | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn | ||
private User user; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn | ||
private Food food; | ||
|
||
} |
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,26 @@ | ||
package com.kusitms.jipbap.food; | ||
|
||
import com.kusitms.jipbap.common.entity.DateEntity; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Entity | ||
@Table(name = "tb_category") | ||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Category extends DateEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name ="category_id") | ||
private Long id; //고유 pk | ||
|
||
private String name; | ||
private String image; | ||
|
||
} |
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,38 @@ | ||
package com.kusitms.jipbap.food; | ||
|
||
import com.kusitms.jipbap.common.entity.DateEntity; | ||
import com.kusitms.jipbap.store.Store; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.ColumnDefault; | ||
|
||
@Entity | ||
@Table(name = "tb_food") | ||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Food extends DateEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name ="food_id") | ||
private Long id; //고유 pk | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn | ||
private Store store; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn | ||
private Category category; | ||
|
||
private String name; | ||
private Long price; | ||
private String description; | ||
private Long recommendCount; | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
src/main/java/com/kusitms/jipbap/notifiication/Notification.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,41 @@ | ||
package com.kusitms.jipbap.notifiication; | ||
|
||
import com.kusitms.jipbap.common.entity.DateEntity; | ||
import com.kusitms.jipbap.user.User; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.ColumnDefault; | ||
|
||
@Entity | ||
@Table(name = "tb_notification") | ||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Notification extends DateEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name ="notification_id") | ||
private Long id; //고유 pk | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "user_id") | ||
private User user; | ||
|
||
@Enumerated(EnumType.STRING) | ||
private NotificationType notificationType; | ||
|
||
private String message; | ||
|
||
@ColumnDefault("false") | ||
@Column(columnDefinition = "TINYINT(1)") | ||
private Boolean readYn; | ||
|
||
public enum NotificationType { | ||
OFFER, CHAT, REVIEW, WISHLIST | ||
} | ||
} |
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,41 @@ | ||
package com.kusitms.jipbap.post; | ||
|
||
import com.kusitms.jipbap.common.entity.DateEntity; | ||
import com.kusitms.jipbap.user.Role; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotBlank; | ||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "tb_post") | ||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Post extends DateEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name ="post_id") | ||
private Long id; //고유 pk | ||
|
||
@Enumerated(EnumType.STRING) | ||
private PostType postType; | ||
|
||
private String title; | ||
private String content; | ||
private Long hit; | ||
|
||
private LocalDateTime createdBy; | ||
private LocalDateTime updatedBy; | ||
|
||
|
||
public enum PostType { | ||
STANDBY, APPROVE, SUSPEND | ||
} | ||
} |
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
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,35 @@ | ||
package com.kusitms.jipbap.store; | ||
|
||
import com.kusitms.jipbap.common.entity.DateEntity; | ||
import com.kusitms.jipbap.user.User; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.hibernate.annotations.ColumnDefault; | ||
|
||
@Entity | ||
@Table(name = "tb_store_bookmark") | ||
@Data | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class StoreBookmark extends DateEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name ="store_bookmark_id") | ||
private Long id; //고유 pk | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn | ||
private User owner; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn | ||
private Store store; | ||
|
||
|
||
|
||
} |
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