mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 22:24:55 +00:00
refactor: rename presence sensor entities and update related references
This commit is contained in:
@ -10,6 +10,7 @@ import { SpaceModelEntity } from '../../space-model';
|
||||
import { InviteUserSpaceEntity } from '../../Invite-user/entities';
|
||||
import { SpaceProductAllocationEntity } from './space-product-allocation.entity';
|
||||
import { SubspaceEntity } from './subspace/subspace.entity';
|
||||
import { PresenceSensorDailySpaceEntity } from '../../presence-sensor/entities';
|
||||
|
||||
@Entity({ name: 'space' })
|
||||
export class SpaceEntity extends AbstractEntity<SpaceDto> {
|
||||
@ -111,6 +112,9 @@ export class SpaceEntity extends AbstractEntity<SpaceDto> {
|
||||
)
|
||||
public productAllocations: SpaceProductAllocationEntity[];
|
||||
|
||||
@OneToMany(() => PresenceSensorDailySpaceEntity, (sensor) => sensor.space)
|
||||
presenceSensorDaily: PresenceSensorDailySpaceEntity[];
|
||||
|
||||
constructor(partial: Partial<SpaceEntity>) {
|
||||
super();
|
||||
Object.assign(this, partial);
|
||||
|
||||
Reference in New Issue
Block a user