generated from pricelees/issue-pr-template
Compare commits
3 Commits
main
...
refactor/#
| Author | SHA1 | Date | |
|---|---|---|---|
| 6eff50762c | |||
| 3fd9b7c1de | |||
| b1a2a7bff1 |
@ -0,0 +1,18 @@
|
||||
package roomescape.region.infrastructure.persistence
|
||||
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Id
|
||||
import jakarta.persistence.Table
|
||||
|
||||
@Entity
|
||||
@Table(name = "region")
|
||||
class RegionEntity(
|
||||
@Id
|
||||
val code: String,
|
||||
val sidoCode: String,
|
||||
val sigunguCode: String,
|
||||
val dongCode: String,
|
||||
val sidoName: String,
|
||||
val sigunguName: String,
|
||||
val dongName: String,
|
||||
)
|
||||
@ -0,0 +1,5 @@
|
||||
package roomescape.region.infrastructure.persistence
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
|
||||
interface RegionRepository : JpaRepository<RegionEntity, String>
|
||||
@ -4,7 +4,7 @@ server:
|
||||
spring:
|
||||
sql:
|
||||
init:
|
||||
schema-locations: classpath:schema/schema-mysql.sql
|
||||
mode: never
|
||||
jpa:
|
||||
defer-datasource-initialization: false
|
||||
hibernate:
|
||||
|
||||
@ -17,7 +17,9 @@ spring:
|
||||
password:
|
||||
sql:
|
||||
init:
|
||||
mode: always
|
||||
schema-locations: classpath:schema/schema-h2.sql
|
||||
data-locations: classpath:schema/region-data.sql
|
||||
|
||||
security:
|
||||
jwt:
|
||||
|
||||
2988
src/main/resources/schema/region-data.sql
Normal file
2988
src/main/resources/schema/region-data.sql
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,13 @@
|
||||
create table if not exists region (
|
||||
code varchar(10) primary key,
|
||||
sido_code varchar(2) not null,
|
||||
sigungu_code varchar(3) not null,
|
||||
dong_code varchar(5) not null ,
|
||||
sido_name varchar(20) not null,
|
||||
sigungu_name varchar(20) not null,
|
||||
dong_name varchar(20) not null
|
||||
);
|
||||
|
||||
create table if not exists members (
|
||||
member_id bigint primary key,
|
||||
email varchar(255) not null,
|
||||
|
||||
@ -1,3 +1,13 @@
|
||||
create table if not exists region (
|
||||
code varchar(10) primary key,
|
||||
sido_code varchar(2) not null,
|
||||
sigungu_code varchar(3) not null,
|
||||
dong_code varchar(5) not null ,
|
||||
sido_name varchar(20) not null,
|
||||
sigungu_name varchar(20) not null,
|
||||
dong_name varchar(20) not null
|
||||
);
|
||||
|
||||
create table if not exists members
|
||||
(
|
||||
member_id bigint primary key,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user