This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

crm-resource-tag
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Tag Service

Tag manager for project: NestJs, TypeORM, PostgresQL

Install

npm install crm-tags
# With yarn
yarn add crm-tags

Usage

Register module
@Module({
  imports: [
    ResourceTagModule.register(Mock), // + Add this
    TypeOrmModule.forFeature([Mock]),
  ],
  controllers: [MockController],
})
export class MockModule {}
Update entity
@Entity('mock_tags')
export class Mock {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  description: string;

  // + Add this
  @TagRelation(Mock)
  tags: ResourceTag[];

  // + Add this
  @FilterTag('mock_tags')
  async filterTag() {}
}
Add where in query ( This will be upgrade and make auto )
this.mockRepository.find({
  where: {
    tags: {
      resource: 'mock_tags', // + Add this
    },
  },
});

Readme

Keywords

none

Package Sidebar

Install

npm i crm-resource-tag

Weekly Downloads

1

Version

1.1.0

License

none

Unpacked Size

59.1 kB

Total Files

74

Last publish

Collaborators

  • martintran