Skip to content

Commit

Permalink
Merge pull request #182 from swm-nodriversomabus/BUS-209-MVP1-bugfix
Browse files Browse the repository at this point in the history
fix(BE): 알림 테이블 충돌 수정 BUS-209-MVP1-bugfix
  • Loading branch information
Lemonade255 authored Nov 8, 2023
2 parents e8fa977 + fc2ba24 commit 7632545
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
import lombok.*;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.time.LocalDateTime;


@Entity
@EntityListeners(AuditingEntityListener.class)
@Getter
Expand Down Expand Up @@ -42,8 +39,4 @@ public class ChatEntity extends BaseEntity {

@Column(nullable = false)
private Integer readCount;




}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.example.api.matching.adapter.out.persistence;

import com.example.api.matching.dto.AccommodationMatchingDto;
import jakarta.persistence.*;
import lombok.*;

Expand All @@ -13,19 +12,11 @@
@Table(name="accommodationMatching")
public class AccommodationMatchingEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long accommodationMatchingId;
private Long matchingId;

@Column
private Integer price;

@Column(length = 3000)
private String room;

public AccommodationMatchingDto toDto() {
return AccommodationMatchingDto.builder()
.price(price)
.room(room)
.build();
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.example.api.matching.adapter.out.persistence;

import com.example.api.common.entity.BaseEntity;
import jakarta.persistence.*;
import lombok.*;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.time.LocalDateTime;
import java.util.UUID;

@Entity
Expand All @@ -16,13 +16,10 @@
@AllArgsConstructor
@IdClass(LikePK.class)
@Table(name="likes")
public class LikeEntity {
public class LikeEntity extends BaseEntity {
@Id
private UUID userId;

@Id
private Long matchingId;

@Temporal(TemporalType.TIMESTAMP)
private LocalDateTime createdAt;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ public interface MatchingMapperInterface {
FindMatchingDto toDto(Matching matching);
FindMatchingApplicationDto toDto(MatchingApplication matchingApplication);
FindMatchingDto toDto(MatchingEntity matchingEntity);
AccommodationMatchingDto toDto(AccommodationMatchingEntity accommodationMatchingEntity);
LikeDto toDto(LikeEntity likeEntity);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@NoArgsConstructor
@AllArgsConstructor
public class AccommodationMatchingDto {
private Long accommodationMatchingId;
private Long matchingId;

@Min(0)
private Integer price;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Table(name="notification")
@Table(name="userNotification")
public class UserNotificationEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package com.example.api.preference.adapter.out.persistence;

import com.example.api.common.entity.BaseEntity;
import jakarta.persistence.*;
import lombok.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.time.LocalDateTime;

@Entity
@EntityListeners(AuditingEntityListener.class)
@Getter
Expand All @@ -16,15 +14,11 @@
@NoArgsConstructor
@AllArgsConstructor
@Table(name="alcohol")
public class AlcoholEntity {
public class AlcoholEntity extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long alcoholId;

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

@CreatedDate
@Temporal(TemporalType.TIMESTAMP)
private LocalDateTime createdAt;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package com.example.api.preference.adapter.out.persistence;

import com.example.api.common.entity.BaseEntity;
import jakarta.persistence.*;
import lombok.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.time.LocalDateTime;

@Entity
@EntityListeners(AuditingEntityListener.class)
@Getter
Expand All @@ -16,15 +14,11 @@
@NoArgsConstructor
@AllArgsConstructor
@Table(name="move")
public class MoveEntity {
public class MoveEntity extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long moveId;

@Column(nullable = false, length = 300)
private String content;

@CreatedDate
@Temporal(TemporalType.TIMESTAMP)
private LocalDateTime createdAt;
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package com.example.api.preference.adapter.out.persistence;

import com.example.api.common.entity.BaseEntity;
import jakarta.persistence.*;
import lombok.*;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.time.LocalDateTime;

@Entity
@EntityListeners(AuditingEntityListener.class)
@Getter
Expand All @@ -16,15 +14,11 @@
@NoArgsConstructor
@AllArgsConstructor
@Table(name="purpose")
public class PurposeEntity {
public class PurposeEntity extends BaseEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long purposeId;

@Column(nullable = false, length = 300)
private String content;

@CreatedDate
@Temporal(TemporalType.TIMESTAMP)
private LocalDateTime createdAt;
}

0 comments on commit 7632545

Please sign in to comment.