2023-02-20 01:50:27 +00:00
|
|
|
import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
|
2022-02-19 22:42:10 -06:00
|
|
|
import { AssetEntity } from './asset.entity';
|
|
|
|
|
|
|
|
|
|
@Entity('smart_info')
|
|
|
|
|
export class SmartInfoEntity {
|
2023-02-20 01:50:27 +00:00
|
|
|
@OneToOne(() => AssetEntity, { onDelete: 'CASCADE', nullable: true })
|
|
|
|
|
@JoinColumn({ name: 'assetId', referencedColumnName: 'id' })
|
|
|
|
|
asset?: AssetEntity;
|
2022-02-19 22:42:10 -06:00
|
|
|
|
2023-02-20 01:50:27 +00:00
|
|
|
@PrimaryColumn()
|
2022-06-25 19:53:06 +02:00
|
|
|
assetId!: string;
|
2022-02-19 22:42:10 -06:00
|
|
|
|
|
|
|
|
@Column({ type: 'text', array: true, nullable: true })
|
2022-06-25 19:53:06 +02:00
|
|
|
tags!: string[] | null;
|
2022-02-19 22:42:10 -06:00
|
|
|
|
2022-03-27 14:58:54 -05:00
|
|
|
@Column({ type: 'text', array: true, nullable: true })
|
2022-06-25 19:53:06 +02:00
|
|
|
objects!: string[] | null;
|
2022-02-19 22:42:10 -06:00
|
|
|
}
|