mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-01 02:33:35 +03:00
47 lines
958 B
JavaScript
47 lines
958 B
JavaScript
app todoApp {
|
|
title: "ToDo App"
|
|
}
|
|
|
|
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
|
|
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"
|
|
}
|