2024-02-24 01:42:37 +01:00
|
|
|
import { Column, Entity, PrimaryColumn } from 'typeorm';
|
2023-11-25 18:53:30 +00:00
|
|
|
|
|
|
|
|
@Entity('geodata_places', { synchronize: false })
|
|
|
|
|
export class GeodataPlacesEntity {
|
|
|
|
|
@PrimaryColumn({ type: 'integer' })
|
|
|
|
|
id!: number;
|
|
|
|
|
|
|
|
|
|
@Column({ type: 'varchar', length: 200 })
|
|
|
|
|
name!: string;
|
|
|
|
|
|
|
|
|
|
@Column({ type: 'float' })
|
|
|
|
|
longitude!: number;
|
|
|
|
|
|
|
|
|
|
@Column({ type: 'float' })
|
|
|
|
|
latitude!: number;
|
|
|
|
|
|
|
|
|
|
// @Column({
|
|
|
|
|
// generatedType: 'STORED',
|
|
|
|
|
// asExpression: 'll_to_earth((latitude)::double precision, (longitude)::double precision)',
|
|
|
|
|
// type: 'earth',
|
|
|
|
|
// })
|
2024-02-24 01:42:37 +01:00
|
|
|
// earthCoord!: unknown;
|
2023-11-25 18:53:30 +00:00
|
|
|
|
|
|
|
|
@Column({ type: 'char', length: 2 })
|
|
|
|
|
countryCode!: string;
|
|
|
|
|
|
|
|
|
|
@Column({ type: 'varchar', length: 20, nullable: true })
|
|
|
|
|
admin1Code!: string;
|
|
|
|
|
|
|
|
|
|
@Column({ type: 'varchar', length: 80, nullable: true })
|
|
|
|
|
admin2Code!: string;
|
|
|
|
|
|
2024-02-24 01:42:37 +01:00
|
|
|
@Column({ type: 'varchar', nullable: true })
|
|
|
|
|
admin1Name!: string;
|
|
|
|
|
|
|
|
|
|
@Column({ type: 'varchar', nullable: true })
|
|
|
|
|
admin2Name!: string;
|
|
|
|
|
|
|
|
|
|
@Column({ type: 'varchar', nullable: true })
|
|
|
|
|
alternateNames!: string;
|
2023-11-25 18:53:30 +00:00
|
|
|
|
|
|
|
|
@Column({ type: 'date' })
|
|
|
|
|
modificationDate!: Date;
|
|
|
|
|
}
|