1
0

chore: move frontend files

This commit is contained in:
kolaente
2024-02-07 14:56:56 +01:00
parent 447641c222
commit fc4676315d
606 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import {faker} from '@faker-js/faker'
import {Factory} from '../support/factory'
export class BucketFactory extends Factory {
static table = 'buckets'
static factory() {
const now = new Date()
return {
id: '{increment}',
title: faker.lorem.words(3),
project_id: 1,
created_by_id: 1,
created: now.toISOString(),
updated: now.toISOString(),
}
}
}

View File

@ -0,0 +1,16 @@
import {Factory} from '../support/factory'
export class LabelTaskFactory extends Factory {
static table = 'label_tasks'
static factory() {
const now = new Date()
return {
id: '{increment}',
task_id: 1,
label_id: 1,
created: now.toISOString(),
}
}
}

View File

@ -0,0 +1,21 @@
import {faker} from '@faker-js/faker'
import {Factory} from '../support/factory'
export class LabelFactory extends Factory {
static table = 'labels'
static factory() {
const now = new Date()
return {
id: '{increment}',
title: faker.lorem.words(2),
description: faker.lorem.text(10),
hex_color: (Math.random()*0xFFFFFF<<0).toString(16), // random 6-digit hex number
created_by_id: 1,
created: now.toISOString(),
updated: now.toISOString(),
}
}
}

View File

@ -0,0 +1,21 @@
import {Factory} from '../support/factory'
import {faker} from '@faker-js/faker'
export class LinkShareFactory extends Factory {
static table = 'link_shares'
static factory() {
const now = new Date()
return {
id: '{increment}',
hash: faker.random.word(32),
project_id: 1,
right: 0,
sharing_type: 0,
shared_by_id: 1,
created: now.toISOString(),
updated: now.toISOString(),
}
}
}

View File

@ -0,0 +1,18 @@
import {Factory} from '../support/factory'
import {faker} from '@faker-js/faker'
export class ProjectFactory extends Factory {
static table = 'projects'
static factory() {
const now = new Date()
return {
id: '{increment}',
title: faker.lorem.words(3),
owner_id: 1,
created: now.toISOString(),
updated: now.toISOString(),
}
}
}

View File

@ -0,0 +1,22 @@
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,
project_id: 1,
created_by_id: 1,
index: '{increment}',
position: '{increment}',
created: now.toISOString(),
updated: now.toISOString()
}
}
}

View File

@ -0,0 +1,16 @@
import {Factory} from '../support/factory'
export class TaskAssigneeFactory extends Factory {
static table = 'task_assignees'
static factory() {
const now = new Date()
return {
id: '{increment}',
task_id: 1,
user_id: 1,
created: now.toISOString(),
}
}
}

View File

@ -0,0 +1,16 @@
import {Factory} from '../support/factory'
export class TaskAttachmentFactory extends Factory {
static table = 'task_attachments'
static factory() {
const now = new Date()
return {
id: '{increment}',
task_id: 1,
file_id: 1,
created: now.toISOString(),
}
}
}

View File

@ -0,0 +1,20 @@
import {faker} from '@faker-js/faker'
import {Factory} from '../support/factory'
export class TaskCommentFactory extends Factory {
static table = 'task_comments'
static factory() {
const now = new Date()
return {
id: '{increment}',
comment: faker.lorem.text(3),
author_id: 1,
task_id: 1,
created: now.toISOString(),
updated: now.toISOString()
}
}
}

View File

@ -0,0 +1,18 @@
import {Factory} from '../support/factory'
export class TaskReminderFactory extends Factory {
static table = 'task_reminders'
static factory() {
const now = new Date()
return {
id: '{increment}',
task_id: 1,
reminder: now.toISOString(),
created: now.toISOString(),
relative_to: '',
relative_period: 0,
}
}
}

View File

@ -0,0 +1,17 @@
import {faker} from '@faker-js/faker'
import {Factory} from '../support/factory'
export class TeamFactory extends Factory {
static table = 'teams'
static factory() {
const now = new Date()
return {
name: faker.lorem.words(3),
created_by_id: 1,
created: now.toISOString(),
updated: now.toISOString(),
}
}
}

View File

@ -0,0 +1,14 @@
import {Factory} from '../support/factory'
export class TeamMemberFactory extends Factory {
static table = 'team_members'
static factory() {
return {
team_id: 1,
user_id: 1,
admin: false,
created: new Date().toISOString(),
}
}
}

View File

@ -0,0 +1,21 @@
import {faker} from '@faker-js/faker'
import {Factory} from '../support/factory'
export class UserFactory extends Factory {
static table = 'users'
static factory() {
const now = new Date()
return {
id: '{increment}',
username: faker.lorem.word(10) + faker.datatype.uuid(),
password: '$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.', // 1234
status: 0,
issuer: 'local',
created: now.toISOString(),
updated: now.toISOString(),
}
}
}

View File

@ -0,0 +1,18 @@
import {Factory} from '../support/factory'
export class UserProjectFactory extends Factory {
static table = 'users_projects'
static factory() {
const now = new Date()
return {
id: '{increment}',
project_id: 1,
user_id: 1,
right: 0,
created: now.toISOString(),
updated: now.toISOString(),
}
}
}