mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-14 18:05:48 +00:00
Remove Home Module
This commit is contained in:
@ -5,7 +5,6 @@ import { SnakeNamingStrategy } from './strategies';
|
||||
import { UserEntity } from '../modules/user/entities/user.entity';
|
||||
import { UserSessionEntity } from '../modules/session/entities/session.entity';
|
||||
import { UserOtpEntity } from '../modules/user-otp/entities';
|
||||
import { HomeEntity } from '../modules/home/entities';
|
||||
import { ProductEntity } from '../modules/product/entities';
|
||||
import {
|
||||
DeviceEntity,
|
||||
@ -35,7 +34,6 @@ import { GroupDeviceEntity } from '../modules/group-device/entities';
|
||||
UserEntity,
|
||||
UserSessionEntity,
|
||||
UserOtpEntity,
|
||||
HomeEntity,
|
||||
ProductEntity,
|
||||
DeviceUserPermissionEntity,
|
||||
DeviceEntity,
|
||||
|
@ -1,19 +0,0 @@
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class HomeDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public uuid: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public userUuid: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public homeId: string;
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public homeName: string;
|
||||
}
|
@ -1 +0,0 @@
|
||||
export * from './home.dto';
|
@ -1,34 +0,0 @@
|
||||
import { Column, Entity } from 'typeorm';
|
||||
import { HomeDto } from '../dtos';
|
||||
import { AbstractEntity } from '../../abstract/entities/abstract.entity';
|
||||
|
||||
@Entity({ name: 'home' })
|
||||
export class HomeEntity extends AbstractEntity<HomeDto> {
|
||||
@Column({
|
||||
type: 'uuid',
|
||||
default: () => 'gen_random_uuid()', // Use gen_random_uuid() for default value
|
||||
nullable: false,
|
||||
})
|
||||
public uuid: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
userUuid: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: true,
|
||||
})
|
||||
public homeId: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
public homeName: string;
|
||||
|
||||
constructor(partial: Partial<HomeEntity>) {
|
||||
super();
|
||||
Object.assign(this, partial);
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
export * from './home.entity';
|
@ -1,11 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { HomeEntity } from './entities/home.entity';
|
||||
|
||||
@Module({
|
||||
providers: [],
|
||||
exports: [],
|
||||
controllers: [],
|
||||
imports: [TypeOrmModule.forFeature([HomeEntity])],
|
||||
})
|
||||
export class HomeRepositoryModule {}
|
@ -1,10 +0,0 @@
|
||||
import { DataSource, Repository } from 'typeorm';
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { HomeEntity } from '../entities/home.entity';
|
||||
|
||||
@Injectable()
|
||||
export class HomeRepository extends Repository<HomeEntity> {
|
||||
constructor(private dataSource: DataSource) {
|
||||
super(HomeEntity, dataSource.createEntityManager());
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
export * from './home.repository';
|
Reference in New Issue
Block a user