import { Injectable } from '@nestjs/common' ; import { getConnection } from 'typeorm' ; @ Injectable ( ) export class SeedService { async deleteAll ( model ) { await getConnection ( ) . createQueryBuilder ( ) . delete ( ) . from ( model ) . execute ( ) ; } }