mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-24 11:07:55 +00:00
clean model entities
This commit is contained in:
@@ -3,8 +3,7 @@ import { ProductDto } from '../dtos';
|
||||
import { AbstractEntity } from '../../abstract/entities/abstract.entity';
|
||||
import { DeviceEntity } from '../../device/entities';
|
||||
import { SpaceProductEntity } from '../../space/entities/space-product.entity';
|
||||
import { SpaceProductModelEntity } from '../../space-model/entities';
|
||||
import { SubspaceProductModelEntity } from '../../space-model/entities/subspace-model/subspace-product-model.entity';
|
||||
import { TagModel } from '../../space-model';
|
||||
|
||||
@Entity({ name: 'product' })
|
||||
export class ProductEntity extends AbstractEntity<ProductDto> {
|
||||
@@ -32,17 +31,8 @@ export class ProductEntity extends AbstractEntity<ProductDto> {
|
||||
@OneToMany(() => SpaceProductEntity, (spaceProduct) => spaceProduct.product)
|
||||
spaceProducts: SpaceProductEntity[];
|
||||
|
||||
@OneToMany(
|
||||
() => SpaceProductModelEntity,
|
||||
(spaceProductModel) => spaceProductModel.product,
|
||||
)
|
||||
spaceProductModels: SpaceProductModelEntity[];
|
||||
|
||||
@OneToMany(
|
||||
() => SubspaceProductModelEntity,
|
||||
(subspaceProductModel) => subspaceProductModel.product,
|
||||
)
|
||||
subpaceProductModels: SubspaceProductModelEntity[];
|
||||
@OneToMany(() => TagModel, (tag) => tag.product)
|
||||
tagModels: TagModel[];
|
||||
|
||||
@OneToMany(
|
||||
() => DeviceEntity,
|
||||
|
||||
Reference in New Issue
Block a user