-
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.
use buffer type instead of multer, move Country entity
- Loading branch information
Showing
9 changed files
with
52 additions
and
47 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
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,37 @@ | ||
import { Column, Entity, PrimaryColumn } from 'typeorm'; | ||
|
||
export enum CONTINENTS { | ||
AFRICA = 'Africa', | ||
ASIA = 'Asia', | ||
EUROPE = 'Europe', | ||
EUROPE_AND_ASIA = 'Europe/Asia', | ||
NORTH_AMERICA = 'North America', | ||
OCEANIA = 'Oceania', | ||
SOUTH_AMERICA = 'South America', | ||
ANTARCTICA = 'Antarctica', | ||
} | ||
|
||
@Entity('countries') | ||
export class Country { | ||
@PrimaryColumn({ name: 'country_code', length: 3 }) | ||
countryCode: string; | ||
|
||
@Column({ length: 100 }) | ||
country: string; | ||
|
||
// TODO: Right now the dataset contains null values for continents, but not sure if this is correct | ||
@Column({ type: 'enum', enum: CONTINENTS, nullable: true }) | ||
continent: CONTINENTS; | ||
|
||
@Column({ name: 'region_1', length: 50, nullable: true }) | ||
region1?: string; | ||
|
||
@Column({ name: 'region_2', length: 50, nullable: true }) | ||
region2?: string; | ||
|
||
@Column({ name: 'numeric_code', length: 3, nullable: true }) | ||
numericCode?: string; | ||
|
||
@Column({ name: 'hdi', type: 'int', nullable: true }) | ||
hdi?: number; | ||
} |
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import { User } from "@shared/entities/users/user.entity"; | ||
import { Country } from "@shared/entities/countries/country.entity"; | ||
|
||
export const COMMON_DATABASE_ENTITIES = [User, Country]; | ||
export const COMMON_DATABASE_ENTITIES = [User]; |