Mari's guided journal software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

40 lines
1.3 KiB

import {Condition, ConditionJTD} from "./Condition";
import {GuidedEmpathy, GuidedEmpathyJTD} from "./GuidedEmpathy";
import {Suicidality, SuicidalityJTD} from "./Suicidality";
import {schema} from "../schemata/SchemaData";
export interface Entry {
readonly startedAt: Date
readonly finishedAt: Date
readonly condition: Condition
readonly summary?: string
readonly journalEntry?: string
readonly guidedEmpathy?: readonly GuidedEmpathy[]
// readonly needs?: Needs
// readonly music?: readonly string[]
// readonly rpg?: RPGStats
// readonly personas?: Personas
// readonly activities?: readonly Activity[]
readonly suicidality?: Suicidality
// readonly recoveries?: readonly Recovery[]
}
export type EntryJTD = typeof EntryJTD
export const EntryJTD = schema({
schema: {
properties: {
startedAt: { type: "timestamp" },
finishedAt: { type: "timestamp" },
condition: ConditionJTD.reference,
},
optionalProperties: {
summary: { type: "string" },
journalEntry: { type: "string" },
guidedEmpathy: { elements: GuidedEmpathyJTD.reference },
suicidality: SuicidalityJTD.reference,
}
},
typeHint: null as Entry|null,
key: "entry",
references: [ConditionJTD, GuidedEmpathyJTD, SuicidalityJTD]
})