diff --git a/core/src/main/kotlin/com/core/adapter/out/persistence/entity/MealJpaEntity.kt b/core/src/main/kotlin/com/core/adapter/out/persistence/entity/MealJpaEntity.kt index b128842..6c26bcd 100644 --- a/core/src/main/kotlin/com/core/adapter/out/persistence/entity/MealJpaEntity.kt +++ b/core/src/main/kotlin/com/core/adapter/out/persistence/entity/MealJpaEntity.kt @@ -19,11 +19,11 @@ class MealJpaEntity { @Column(name = "type", length = 20) @Enumerated(EnumType.STRING) - var type: MealType? = null + var type: MealType? = MealType.LUNCH @Column(name = "status", length = 20) @Enumerated(EnumType.STRING) - var status: MealStatus? = null + var status: MealStatus? = MealStatus.OPEN @Comment("식사 가격") @Column(name = "price") @@ -31,7 +31,7 @@ class MealJpaEntity { @ManyToOne @JoinColumn(name = "meal_id") - var restaurant: Restaurant? = null + var restaurantJpaEntity: RestaurantJpaEntity? = null } \ No newline at end of file diff --git a/core/src/main/kotlin/com/core/adapter/out/persistence/entity/Restaurant.kt b/core/src/main/kotlin/com/core/adapter/out/persistence/entity/RestaurantJpaEntity.kt similarity index 67% rename from core/src/main/kotlin/com/core/adapter/out/persistence/entity/Restaurant.kt rename to core/src/main/kotlin/com/core/adapter/out/persistence/entity/RestaurantJpaEntity.kt index 2da6833..ae30b6b 100644 --- a/core/src/main/kotlin/com/core/adapter/out/persistence/entity/Restaurant.kt +++ b/core/src/main/kotlin/com/core/adapter/out/persistence/entity/RestaurantJpaEntity.kt @@ -6,21 +6,21 @@ import jakarta.persistence.* @Table(name = "restaurant", indexes = [ Index(name = "idx_name", columnList = "name"), ]) -class Restaurant { +class RestaurantJpaEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - val idx: Long? = null + val idx: Long = 0 @Column(name = "name") - val name: String? = null + val name: String = "DEFAULT" @Column(name = "address") - val address: String? = null + val address: String = "DEFAULT" @ManyToOne @JoinColumn(name = "category_id") - val university: University? = null + val universityJpaEntity: UniversityJpaEntity? = null } \ No newline at end of file diff --git a/core/src/main/kotlin/com/core/adapter/out/persistence/entity/University.kt b/core/src/main/kotlin/com/core/adapter/out/persistence/entity/UniversityJpaEntity.kt similarity index 68% rename from core/src/main/kotlin/com/core/adapter/out/persistence/entity/University.kt rename to core/src/main/kotlin/com/core/adapter/out/persistence/entity/UniversityJpaEntity.kt index 31ad840..e02d27e 100644 --- a/core/src/main/kotlin/com/core/adapter/out/persistence/entity/University.kt +++ b/core/src/main/kotlin/com/core/adapter/out/persistence/entity/UniversityJpaEntity.kt @@ -1,23 +1,22 @@ package com.core.adapter.out.persistence.entity import jakarta.persistence.* -import jakarta.persistence.criteria.CriteriaBuilder.In @Entity @Table(name = "university", indexes = [ Index(name = "idx_name", columnList = "name"), ]) -class University { +class UniversityJpaEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val idx: Long? = null @Column(name = "name") - val name: String? = null + val name: String = "DEFAULT" @Column(name = "campus_name") - val campusName: String? = null + val campusName: String = "DEFAULT" @Column(name = "is_deleted") - val isDeleted: Boolean? = null + val isDeleted: Boolean = true } \ No newline at end of file