Merge pull request #7 from Development-team-1/notification-service-jpa-design
Notification service jpa design
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.justpickup.notificationservice.domain.notification.entity;
|
||||
|
||||
import com.justpickup.notificationservice.global.entity.BaseEntity;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name = "notification")
|
||||
@Getter
|
||||
@NoArgsConstructor(access = AccessLevel.PROTECTED)
|
||||
public class Notification extends BaseEntity {
|
||||
|
||||
@Id @GeneratedValue
|
||||
@Column(name = "notification_id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* userdb.users.user_id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.justpickup.notificationservice.global.entity;
|
||||
|
||||
|
||||
import javax.persistence.MappedSuperclass;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@MappedSuperclass
|
||||
public abstract class BaseEntity {
|
||||
|
||||
private LocalDateTime createdAt;
|
||||
private Long createdBy;
|
||||
private LocalDateTime lastModifiedAt;
|
||||
private Long lastModifiedBy;
|
||||
|
||||
}
|
||||
@@ -10,15 +10,15 @@ spring:
|
||||
username: postgres
|
||||
password: admin
|
||||
|
||||
jpa:
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: create-drop
|
||||
properties:
|
||||
hibernate:
|
||||
ddl-auto: create-drop
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: true
|
||||
show_sql: true
|
||||
open-in-view: false
|
||||
default_batch_fetch_size: 1000
|
||||
format_sql: true
|
||||
show_sql: true
|
||||
open-in-view: false
|
||||
default_batch_fetch_size: 1000
|
||||
|
||||
eureka:
|
||||
client:
|
||||
|
||||
Reference in New Issue
Block a user