open-index/open-npm huggingface dataset:
npm package: @relationc/tags
Description: Manage tag in system
Author: Tran Hoai An
Latest version: 1.1.4

### Tag Service

#### Tag manager for project: NestJs, TypeORM, PostgresQL

#### Install

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

#### Usage

##### Register module

```typescript
@Module({
  imports: [
    ResourceTagModule.register(Mock), // + Add this
    TypeOrmModule.forFeature([Mock]),
  ],
  controllers: [MockController],
})
export class MockModule {}
```

##### Update entity

```typescript
@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 )

```typescript
this.mockRepository.find({
  where: {
    tags: {
      resource: 'mock_tags', // + Add this
    },
  },
});
```