From 9863a38751bd496e0e1f78a2c72af4214ea18224 Mon Sep 17 00:00:00 2001 From: shio <85730998+dino3616@users.noreply.github.com> Date: Sun, 19 Jan 2025 05:16:13 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20(api/locker)=20=E5=BA=A7?= =?UTF-8?q?=E6=A8=99=E6=83=85=E5=A0=B1=E3=82=92=E3=82=82=E3=81=A4=E3=83=97?= =?UTF-8?q?=E3=83=AD=E3=83=91=E3=83=86=E3=82=A3=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../locker/controller/dto/object/locker.object.ts | 9 +++++++++ apps/api/src/module/locker/domain/locker.model.ts | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/apps/api/src/module/locker/controller/dto/object/locker.object.ts b/apps/api/src/module/locker/controller/dto/object/locker.object.ts index d879b8c..2b6d7d8 100644 --- a/apps/api/src/module/locker/controller/dto/object/locker.object.ts +++ b/apps/api/src/module/locker/controller/dto/object/locker.object.ts @@ -12,6 +12,15 @@ export class LockerObject implements Locker { @MaxLength(32) name!: string; + @Field(() => Number, { nullable: false }) + lat!: number; + + @Field(() => Number, { nullable: false }) + lng!: number; + + @Field(() => String, { nullable: false }) + location!: string; + @Field(() => Date, { nullable: false }) createdAt!: Date; } diff --git a/apps/api/src/module/locker/domain/locker.model.ts b/apps/api/src/module/locker/domain/locker.model.ts index 43aabf2..9447392 100644 --- a/apps/api/src/module/locker/domain/locker.model.ts +++ b/apps/api/src/module/locker/domain/locker.model.ts @@ -3,11 +3,20 @@ export class Locker { readonly name: string; + readonly lat: number; + + readonly lng: number; + + readonly location: string; + readonly createdAt: Date; - constructor({ id, name, createdAt }: Locker) { + constructor({ id, name, lat, lng, location, createdAt }: Locker) { this.id = id; this.name = name; + this.lat = lat; + this.lng = lng; + this.location = location; this.createdAt = createdAt; } }