Skip to content

Commit

Permalink
feat: ✨ (api/locker) 座標情報をもつプロパティを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
dino3616 committed Jan 18, 2025
1 parent 5ffdb63 commit 9863a38
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
11 changes: 10 additions & 1 deletion apps/api/src/module/locker/domain/locker.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 9863a38

Please sign in to comment.