1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import { Injectable } from '@nestjs/common';
import { FilePurpose } from 'src/file/entity/purpose.entity';
import { EntityManager } from 'typeorm';
@Injectable()
export class SeedingService {
constructor(private readonly entityManager: EntityManager) {}
async seed(): Promise<void> {
await this.entityManager.save(FilePurpose, [
{
id: 1,
name: 'QUESTS_FILE',
},
{
id: 2,
name: 'CATEGORIES_FILE',
},
{
id: 3,
name: 'ITEMS_FILE',
},
{
id: 4,
name: 'MAIN_CONFIGURATION_FILE',
},
{
id: 5,
name: 'METADATA',
},
]);
}
}
|