drone.log.entity.ts
788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm/index';
@Entity({ name: 'drone_log', schema: 'public' })
export class DroneLogEntity {
@PrimaryGeneratedColumn({ name: 'id' })
id: number;
@Column({ name: 'drone_id' })
droneId: number;
@Column({ name: 'schedule_id' })
scheduleId: number;
@Column()
latitude: number;
@Column()
longitude: number;
@Column({ name: 'vertical_speed' })
verticalSpeed: number;
@Column({ name: 'horizontal_speed' })
horizontalSpeed: number;
@Column({ name: 'above_sea_level' })
aboveSeaLevel: number;
@Column({ name: 'above_ground_level' })
aboveGroundLevel: number;
@Column({ type: 'timestamp', name: 'created_at' })
createdAt: Date;
constructor(props) {
Object.assign(this, props);
}
}