Total Complexity | 1 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import { Factory } from '@concepta/typeorm-seeding'; |
||
18 | |||
19 | export class JohnFactory extends Factory<User> { |
||
20 | // required |
||
21 | protected async entity(): Promise<User> { |
||
22 | //create John Doe |
||
23 | const user = new User( |
||
24 | 'john', |
||
25 | 'doe', |
||
26 | '[email protected]', |
||
27 | '$argon2i$v=19$m=4096,t=3,p=1$slHh/xhoh8SvIjApBHSZnA$hqsry11DeWbNYsFnzADPkYOP2WQrf0yqDXGC3xjSX9A', |
||
28 | '$argon2i$v=19$m=4096,t=3,p=1$slHh/xhoh8SvIjApBHSZnA$hqsry11DeWbNYsFnzADPkYOP2WQrf0yqDXGC3xjSX9A', |
||
29 | UserRole.COOPERATOR |
||
30 | ); |
||
31 | return user; |
||
32 | } |
||
34 |