wasp/waspc/examples/todoApp/todoApp.wasp

47 lines
958 B
JavaScript
Raw Normal View History

app todoApp {
title: "ToDo App"
2019-07-04 22:51:05 +03:00
}
entityPSL Project {=psl
id Int @id @default(autoincrement())
tasks Task[]
psl=}
entityPSL Task {=psl
id Int @id @default(autoincrement())
description String
isDone Boolean @default(false)
project Project @relation(fields: [projectId], references: [id])
projectId Int
psl=}
route "/" -> page Main
2019-07-04 22:51:05 +03:00
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"
}