diff --git a/src/seeder/roles.ts b/src/seeder/roles.ts index 003f68c..a7e2bf8 100644 --- a/src/seeder/roles.ts +++ b/src/seeder/roles.ts @@ -1,17 +1,31 @@ -import { Factory, Seeder } from 'typeorm-seeding' -import { Connection } from 'typeorm' -import { Roles } from '../configurable/entities/roles.entity' +import { Factory, Seeder } from 'typeorm-seeding'; +import { Connection } from 'typeorm'; +import { Roles } from '../configurable/entities/roles.entity'; export default class CreateUsers implements Seeder { public async run(factory: Factory, connection: Connection): Promise { await connection .createQueryBuilder() .insert() - .into(Roles) + .into('roles') .values([ - { id: '3196cdf4-ae5f-4677-9bcd-98be35c72321', name: 'Admin' }, - { id: '3196cdf4-ae5f-4677-9bcd-98be35c72322', name: 'Supervisor' }, + { + id: '3196cdf4-ae5f-4677-9bcd-98be35c72329', + created_at: new Date(), + updated_at: new Date(), + deleted_at: null, + version: 1, + name: 'Admin', + }, + { + id: '3196cdf4-ae5f-4677-9bcd-98be35c72328', + created_at: new Date(), + updated_at: new Date(), + deleted_at: null, + version: 1, + name: 'Supervisor', + }, ]) - .execute() + .execute(); } -} \ No newline at end of file +}