mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
refactor(nestjs): import module
This commit is contained in:
@@ -17,6 +17,7 @@ import { GetItemsService } from './GetItems.service';
|
||||
import { DynamicListModule } from '../DynamicListing/DynamicList.module';
|
||||
import { InventoryAdjustmentsModule } from '../InventoryAdjutments/InventoryAdjustments.module';
|
||||
import { ItemsExportable } from './ItemsExportable.service';
|
||||
import { ItemsImportable } from './ItemsImportable.service';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -40,7 +41,8 @@ import { ItemsExportable } from './ItemsExportable.service';
|
||||
TransformerInjectable,
|
||||
ItemsEntriesService,
|
||||
ItemsExportable,
|
||||
ItemsImportable
|
||||
],
|
||||
exports: [ItemsEntriesService, ItemsExportable],
|
||||
exports: [ItemsEntriesService, ItemsExportable, ItemsImportable],
|
||||
})
|
||||
export class ItemsModule {}
|
||||
|
||||
@@ -4,8 +4,11 @@ import { Importable } from '../Import/Importable';
|
||||
import { CreateItemService } from './CreateItem.service';
|
||||
import { CreateItemDto } from './dtos/Item.dto';
|
||||
import { ItemsSampleData } from './Items.constants';
|
||||
import { ImportableService } from '../Import/decorators/Import.decorator';
|
||||
import { Item } from './models/Item';
|
||||
|
||||
@Injectable()
|
||||
@ImportableService({ name: Item.name })
|
||||
export class ItemsImportable extends Importable {
|
||||
constructor(
|
||||
private readonly createItemService: CreateItemService,
|
||||
|
||||
@@ -4,8 +4,10 @@ import { Model } from 'objection';
|
||||
import { ExportableModel } from '@/modules/Export/decorators/ExportableModel.decorator';
|
||||
import { InjectModelMeta } from '@/modules/Tenancy/TenancyModels/decorators/InjectModelMeta.decorator';
|
||||
import { ItemMeta } from './Item.meta';
|
||||
import { ImportableModel } from '@/modules/Import/decorators/Import.decorator';
|
||||
|
||||
@ExportableModel()
|
||||
@ImportableModel()
|
||||
@InjectModelMeta(ItemMeta)
|
||||
export class Item extends TenantBaseModel {
|
||||
public readonly quantityOnHand: number;
|
||||
|
||||
Reference in New Issue
Block a user