initial commit
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryColumn,
|
||||
Column,
|
||||
ManyToOne,
|
||||
JoinColumn,
|
||||
CreateDateColumn,
|
||||
} from 'typeorm';
|
||||
import { DeviceCategory } from './device-category.entity';
|
||||
|
||||
@Entity('devices')
|
||||
export class Device {
|
||||
@PrimaryColumn()
|
||||
DeviceID: string;
|
||||
|
||||
@Column()
|
||||
Name: string;
|
||||
|
||||
@Column()
|
||||
DeviceType: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
CategoryID: number;
|
||||
|
||||
@Column({ nullable: true })
|
||||
Authorization: string;
|
||||
|
||||
@Column({ default: 0 })
|
||||
Order: number;
|
||||
|
||||
@Column({ default: false })
|
||||
Share: boolean;
|
||||
|
||||
@Column({ nullable: true })
|
||||
FirmwareRevision: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
HardwareRevision: string;
|
||||
|
||||
@Column()
|
||||
userId: number;
|
||||
|
||||
@CreateDateColumn({ type: 'datetime' })
|
||||
Created: string;
|
||||
|
||||
@ManyToOne(() => DeviceCategory)
|
||||
@JoinColumn({ name: 'CategoryID' })
|
||||
Category: DeviceCategory;
|
||||
}
|
||||
Reference in New Issue
Block a user