mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 02:15:21 +00:00
feat: add DEVICE_ADD permission and update device handling logic
This commit is contained in:
@ -33,9 +33,6 @@ export class DeviceEntity extends AbstractEntity<DeviceDto> {
|
||||
})
|
||||
isActive: boolean;
|
||||
|
||||
@ManyToOne(() => UserEntity, (user) => user.userSpaces, { nullable: false })
|
||||
user: UserEntity;
|
||||
|
||||
@OneToMany(
|
||||
() => DeviceUserPermissionEntity,
|
||||
(permission) => permission.device,
|
||||
|
@ -16,7 +16,6 @@ import {
|
||||
} from '../dtos';
|
||||
import { AbstractEntity } from '../../abstract/entities/abstract.entity';
|
||||
import {
|
||||
DeviceEntity,
|
||||
DeviceNotificationEntity,
|
||||
DeviceUserPermissionEntity,
|
||||
} from '../../device/entities';
|
||||
@ -98,9 +97,6 @@ export class UserEntity extends AbstractEntity<UserDto> {
|
||||
@OneToMany(() => UserSpaceEntity, (userSpace) => userSpace.user)
|
||||
userSpaces: UserSpaceEntity[];
|
||||
|
||||
@OneToMany(() => DeviceEntity, (userDevice) => userDevice.user)
|
||||
userDevice: DeviceEntity[];
|
||||
|
||||
@OneToMany(
|
||||
() => UserNotificationEntity,
|
||||
(userNotification) => userNotification.user,
|
||||
|
Reference in New Issue
Block a user