-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'stage' into feat/sentry
- Loading branch information
Showing
19 changed files
with
422 additions
and
122 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
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,58 @@ | ||
import { | ||
Entity, | ||
EntityRepositoryType, | ||
PrimaryKey, | ||
Property, | ||
} from '@mikro-orm/core'; | ||
|
||
import { KakaoPlaceRepository } from './kakao-place.repository'; | ||
|
||
@Entity({ | ||
comment: '카카오맵에서 제공하는 장소', | ||
repository: () => KakaoPlaceRepository, | ||
}) | ||
export class KakaoPlace { | ||
@PrimaryKey({ | ||
type: 'integer', | ||
comment: '카카오맵에서 제공하는 장소의 ID (basicInfo.cid)', | ||
}) | ||
id: number; | ||
|
||
@Property({ | ||
type: 'string', | ||
comment: '카카오맵 basicInfo.placenamefull', | ||
}) | ||
name: string; | ||
|
||
@Property({ | ||
type: 'string', | ||
comment: '카카오맵 basicInfo.category.cate1name', | ||
}) | ||
category: string; | ||
|
||
@Property({ | ||
type: 'string', | ||
comment: '카카오맵 basicInfo.address.newaddr.newaddrfull', | ||
}) | ||
address: string; | ||
|
||
@Property({ | ||
type: 'json', | ||
comment: '카카오맵 menuInfo.menuList', | ||
}) | ||
menuList: { menu: string; price: string }[]; | ||
|
||
@Property({ | ||
type: 'json', | ||
comment: '카카오맵 basicInfo.photo.photoList', | ||
}) | ||
photoList: string[]; | ||
|
||
@Property() | ||
createdAt: Date = new Date(); | ||
|
||
@Property({ onUpdate: () => new Date() }) | ||
updatedAt: Date = new Date(); | ||
|
||
[EntityRepositoryType]: KakaoPlaceRepository; | ||
} |
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,5 @@ | ||
import { ExtendedEntityRepository } from 'src/common/helper/extended-repository.helper'; | ||
|
||
import { KakaoPlace } from './kakao-place.entity'; | ||
|
||
export class KakaoPlaceRepository extends ExtendedEntityRepository<KakaoPlace> {} |
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
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
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,31 @@ | ||
import { Migration } from '@mikro-orm/migrations'; | ||
|
||
export class Migration20240629180004 extends Migration { | ||
async up(): Promise<void> { | ||
this.addSql( | ||
'create table "kakao_place" ("id" serial primary key, "name" varchar(255) not null, "category" varchar(255) not null, "address" varchar(255) not null, "menu_list" jsonb not null, "photo_list" jsonb not null, "created_at" timestamptz not null, "updated_at" timestamptz not null);', | ||
); | ||
this.addSql( | ||
'comment on column "kakao_place"."id" is \'카카오맵에서 제공하는 장소의 ID (basicInfo.cid)\';', | ||
); | ||
this.addSql( | ||
'comment on column "kakao_place"."name" is \'카카오맵 basicInfo.placenamefull\';', | ||
); | ||
this.addSql( | ||
'comment on column "kakao_place"."category" is \'카카오맵 basicInfo.category.cate1name\';', | ||
); | ||
this.addSql( | ||
'comment on column "kakao_place"."address" is \'카카오맵 basicInfo.address.newaddr.newaddrfull\';', | ||
); | ||
this.addSql( | ||
'comment on column "kakao_place"."menu_list" is \'카카오맵 menuInfo.menuList\';', | ||
); | ||
this.addSql( | ||
'comment on column "kakao_place"."photo_list" is \'카카오맵 basicInfo.photo.photoList\';', | ||
); | ||
} | ||
|
||
async down(): Promise<void> { | ||
this.addSql('drop table if exists "kakao_place" cascade;'); | ||
} | ||
} |
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
Oops, something went wrong.