This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
2022-06-22 19:30:30 +00:00
|
|
|
import {faker} from '@faker-js/faker'
|
2020-12-10 13:52:35 +00:00
|
|
|
|
|
|
|
import {Factory} from '../support/factory'
|
|
|
|
|
|
|
|
export class UserFactory extends Factory {
|
|
|
|
static table = 'users'
|
|
|
|
|
|
|
|
static factory() {
|
|
|
|
const now = new Date()
|
|
|
|
|
|
|
|
return {
|
|
|
|
id: '{increment}',
|
2021-10-11 17:18:06 +00:00
|
|
|
username: faker.lorem.word(10) + faker.datatype.uuid(),
|
2020-12-10 13:52:35 +00:00
|
|
|
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.', // 1234
|
2021-07-17 17:02:03 +00:00
|
|
|
status: 0,
|
2022-07-08 15:22:33 +00:00
|
|
|
issuer: 'local',
|
2022-12-15 21:35:17 +00:00
|
|
|
created: now.toISOString(),
|
|
|
|
updated: now.toISOString(),
|
2020-12-10 13:52:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|