forked from vikunja/frontend
Dominik Pschenitschni
4908469d49
Also align repo closer to `create-vue` template and improve cypress integration
23 lines
436 B
TypeScript
23 lines
436 B
TypeScript
import {faker} from '@faker-js/faker'
|
|
import {Factory} from '../support/factory'
|
|
|
|
export class TaskFactory extends Factory {
|
|
static table = 'tasks'
|
|
|
|
static factory() {
|
|
const now = new Date()
|
|
|
|
return {
|
|
id: '{increment}',
|
|
title: faker.lorem.words(3),
|
|
done: false,
|
|
list_id: 1,
|
|
created_by_id: 1,
|
|
index: '{increment}',
|
|
position: '{increment}',
|
|
created: now.toISOString(),
|
|
updated: now.toISOString()
|
|
}
|
|
}
|
|
}
|