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-01-20 07:54:39 +00:00
|
|
|
import faker from '@faker-js/faker'
|
2020-12-10 13:52:35 +00:00
|
|
|
import {Factory} from '../support/factory'
|
|
|
|
import {formatISO} from 'date-fns'
|
|
|
|
|
|
|
|
export class NamespaceFactory extends Factory {
|
|
|
|
static table = 'namespaces'
|
|
|
|
|
|
|
|
static factory() {
|
|
|
|
const now = new Date()
|
|
|
|
|
|
|
|
return {
|
|
|
|
id: '{increment}',
|
|
|
|
title: faker.lorem.words(3),
|
|
|
|
owner_id: 1,
|
|
|
|
created: formatISO(now),
|
|
|
|
updated: formatISO(now)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|