65 lines
1.3 KiB
TypeScript
65 lines
1.3 KiB
TypeScript
import { Column, PrimaryGeneratedColumn, CreateDateColumn, Index } from 'typeorm';
|
|
|
|
export abstract class BasePlace {
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@Column({ type: 'decimal', precision: 10, scale: 8, nullable: true })
|
|
latitude: number;
|
|
|
|
@Column({ type: 'decimal', precision: 11, scale: 8, nullable: true })
|
|
longitude: number;
|
|
|
|
@Column({ nullable: true })
|
|
@Index()
|
|
name: string;
|
|
|
|
@Column({ nullable: true })
|
|
@Index()
|
|
name_ar: string;
|
|
|
|
@Column({ nullable: true })
|
|
name_en: string;
|
|
|
|
@Column({ nullable: true })
|
|
address: string;
|
|
|
|
@Column({ nullable: true })
|
|
category: string;
|
|
|
|
@Column({ nullable: true })
|
|
neighbourhood: string;
|
|
|
|
@Column({ nullable: true })
|
|
city: string;
|
|
|
|
@Column({ type: 'text', nullable: true })
|
|
description: string;
|
|
|
|
@CreateDateColumn()
|
|
created_at: Date;
|
|
|
|
@Column({ nullable: true })
|
|
source: string;
|
|
|
|
@Column({ type: 'geometry', spatialFeatureType: 'Point', srid: 4326, nullable: true })
|
|
@Index({ spatial: true })
|
|
location: any;
|
|
|
|
@Column({ type: 'int', nullable: true })
|
|
@Index()
|
|
governorate_id: number;
|
|
|
|
@Column({ type: 'int', nullable: true })
|
|
@Index()
|
|
district_id: number;
|
|
|
|
@Column({ type: 'int', nullable: true })
|
|
@Index()
|
|
sub_district_id: number;
|
|
|
|
@Column({ type: 'int', nullable: true })
|
|
@Index()
|
|
neighborhood_id: number;
|
|
}
|