This repository has been archived by the owner on Apr 23, 2024. It is now read-only.
-
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.
- Loading branch information
André Scheibel de Almada
committed
Jul 12, 2023
1 parent
a0455c4
commit d97b83a
Showing
13 changed files
with
275 additions
and
157 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,97 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IFishLocation } from '../interfaces/fish.interface'; | ||
|
||
const monthProperty = { | ||
oneOf: [ | ||
{ | ||
type: 'array', | ||
items: { | ||
type: 'string', | ||
enum: [ | ||
'All day', | ||
'9 AM - 4 PM', | ||
'4 PM - 9 AM', | ||
'9 PM - 4 AM', | ||
'4 AM - 9 PM', | ||
], | ||
}, | ||
}, | ||
{ type: 'undefined' }, | ||
], | ||
}; | ||
const availabilityProperties = { | ||
january: monthProperty, | ||
february: monthProperty, | ||
march: monthProperty, | ||
april: monthProperty, | ||
may: monthProperty, | ||
june: monthProperty, | ||
july: monthProperty, | ||
august: monthProperty, | ||
september: monthProperty, | ||
october: monthProperty, | ||
november: monthProperty, | ||
december: monthProperty, | ||
}; | ||
|
||
class Availability { | ||
@ApiProperty({ | ||
type: 'object', | ||
properties: availabilityProperties, | ||
}) | ||
northern_hemisphere: Object; | ||
|
||
@ApiProperty({ | ||
type: 'object', | ||
properties: availabilityProperties, | ||
}) | ||
southern_hemisphere: Object; | ||
} | ||
|
||
export class FishDto { | ||
@ApiProperty() | ||
name: string; | ||
|
||
@ApiProperty() | ||
icon_image: string; | ||
|
||
@ApiProperty() | ||
critterpedia_image: string; | ||
|
||
@ApiProperty() | ||
furniture_image: string; | ||
|
||
@ApiProperty() | ||
minimum_catches_to_spawn: number; | ||
|
||
@ApiProperty() | ||
sale_price: number; | ||
|
||
@ApiProperty() | ||
spawn_frequency: string; | ||
|
||
@ApiProperty({ | ||
enum: [ | ||
'River', | ||
'Pond', | ||
'River (clifftop)', | ||
'River (mouth)', | ||
'Sea', | ||
'Pier', | ||
'Sea (rainy days)', | ||
], | ||
}) | ||
location: IFishLocation; | ||
|
||
@ApiProperty() | ||
shadow_size: string; | ||
|
||
@ApiProperty() | ||
blathers_description: string; | ||
|
||
@ApiProperty() | ||
catch_phrase: string; | ||
|
||
@ApiProperty() | ||
availability: Availability; | ||
} |
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
Oops, something went wrong.