mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-14 09:57:28 +00:00
added timeseries
This commit is contained in:
@ -0,0 +1,26 @@
|
||||
import { Entity, Column, PrimaryColumn, Index } from 'typeorm';
|
||||
|
||||
@Entity('device-status-log')
|
||||
@Index('logTime_idx', ['logTime'])
|
||||
export class DeviceStatusLogEntity {
|
||||
@PrimaryColumn()
|
||||
id: number;
|
||||
|
||||
@PrimaryColumn({ type: 'timestamptz' })
|
||||
logTime: Date;
|
||||
|
||||
@Column({ type: 'text' })
|
||||
deviceUuid: string;
|
||||
|
||||
@Column({ type: 'text' })
|
||||
deviceTuyaUuid: string;
|
||||
|
||||
@Column({ type: 'text' })
|
||||
productUuid: string;
|
||||
|
||||
@Column({ type: 'text' })
|
||||
productType: string;
|
||||
|
||||
@Column({ type: 'jsonb' })
|
||||
status: any; // JSON array of status codes and values
|
||||
}
|
Reference in New Issue
Block a user