mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-18 06:32:05 +03:00
52 lines
1.1 KiB
JavaScript
52 lines
1.1 KiB
JavaScript
app todoApp {
|
|
title: "ToDo App"
|
|
}
|
|
|
|
entityPSL Project {=psl
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
|
|
// NOTE(matija): not using relations yet.
|
|
//tasks Task[]
|
|
psl=}
|
|
|
|
entityPSL Task {=psl
|
|
id Int @id @default(autoincrement())
|
|
description String
|
|
isDone Boolean @default(false)
|
|
|
|
// NOTE(matija): not using relations yet.
|
|
//project Project @relation(fields: [projectId], references: [id])
|
|
//projectId Int
|
|
psl=}
|
|
|
|
route "/" -> page Main
|
|
page Main {
|
|
component: import Main from "@ext/pages/Main"
|
|
}
|
|
|
|
route "/about" -> page About
|
|
page About {
|
|
component: import About from "@ext/pages/About"
|
|
}
|
|
|
|
route "/profile" -> page Profile
|
|
page Profile {
|
|
component: import { profilePage } from "@ext/pages/ProfilePage"
|
|
}
|
|
|
|
// Page for viewing a specific task
|
|
//
|
|
route "/task/:id" -> page Task
|
|
page Task {
|
|
component: import Task from "@ext/pages/Task"
|
|
}
|
|
|
|
query getTasks {
|
|
fn: import { getTasks } from "@ext/queries.js"
|
|
}
|
|
|
|
action createTask {
|
|
fn: import { createTask } from "@ext/actions.js"
|
|
}
|