blob: f145eb51a0601f8864dec9d43be65b91a390fdf8 (
plain)
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
|
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',
},
]);
}
}
|