Generated reference · Data / schema

hathor — data model

Tables, columns, enums, and foreign-key relations — generated from the committed Prisma schema.

33tables34enums45relations

On this page

The persisted data model of hathor, generated from its schema.prisma — every table (Prisma model + its Postgres @@map name), its columns, the enums it defines, and the foreign-key edges that wire them together.

33Tables
359Columns
34Enums
45FK relations

Tables (33)#

Worldworld#
id String PKname Stringdescription String?status WorldStatusgenre WorldGenrescope WorldScopetechnologyLevel TechnologyLevelmagicLevel MagicLeveluserId StringorganizationId String?settings Jsonstats Jsontags String[]createdAt DateTimeupdatedAt DateTimepublishedAt DateTime? +8 more
WorldVersionworld_version#
id String PKversion Intname String?description String?worldId StringbranchId String?parentVersionId String?changes Jsonsnapshot JsoncreatedBy String?createdAt DateTimeisCurrent Boolean
FK: worldWorld Cascade · branchBranch · parentVersionWorldVersion · childVersionsWorldVersion · mergeRequestsSourceMergeRequest · mergeRequestsTargetMergeRequest
Branchbranch#
id String PKname Stringdescription String?worldId StringbranchPointVersionId String?isMain BooleancreatedAt DateTimeupdatedAt DateTimeversions WorldVersion[]
FK: worldWorld Cascade
MergeRequestmerge_request#
id String PKtitle Stringdescription String?sourceVersionId StringtargetVersionId Stringstatus MergeRequestStatusconflicts Jsonresolution Json?createdBy String?reviewedBy String?createdAt DateTimeupdatedAt DateTimemergedAt DateTime?
FK: sourceVersionWorldVersion · targetVersionWorldVersion
Entityentity#
id String PKname Stringdescription String?type EntityTypeworldId StringversionId String?properties Jsontags String[]aliases String[]createdAt DateTimeupdatedAt DateTimedeletedAt DateTime?searchVector Unsupported
FK: worldWorld Cascade · outgoingRelationsEntityRelation · incomingRelationsEntityRelation
EntityRelationentity_relation#
id String PKsourceId StringtargetId Stringtype Stringproperties Jsonstrength Floatbidirectional BooleancreatedAt DateTimeupdatedAt DateTime
FK: sourceEntity Cascade · targetEntity Cascade
StoryGraphstory_graph#
id String PKname Stringdescription String?worldId Stringversion IntisActive Booleantags String[]createdAt DateTimeupdatedAt DateTimepublishedAt DateTime?nodes StoryNode[]arcs StoryArc[]
FK: worldWorld Cascade
StoryNodestory_node#
id String PKstoryGraphId Stringtype StoryNodeTypename Stringcontent String?positionX FloatpositionY Floatconditions Jsonactions Jsonmetadata JsoncreatedAt DateTimeupdatedAt DateTime
FK: storyGraphStoryGraph Cascade · outgoingArcsStoryArc · incomingArcsStoryArc
StoryArcstory_arc#
id String PKstoryGraphId StringsourceId StringtargetId Stringlabel String?conditions Jsonpriority IntcreatedAt DateTime
FK: storyGraphStoryGraph Cascade · sourceStoryNode Cascade · targetStoryNode Cascade
DialogueTreedialogue_tree#
id String PKname Stringdescription String?worldId Stringspeakers JsonlocationId String?tags String[]createdAt DateTimeupdatedAt DateTimenodes DialogueNode[]sessions DialogueSession[]
FK: worldWorld Cascade
DialogueNodedialogue_node#
id String PKdialogueTreeId Stringtype DialogueNodeTypespeakerId String?content String?emotion String?conditions Jsonactions JsonisStart BooleanisEnd Booleanchoices JsonnextNodes JsoncreatedAt DateTimeupdatedAt DateTime
FK: dialogueTreeDialogueTree Cascade
DialogueSessiondialogue_session#
id String PKdialogueTreeId StringcurrentNodeId String?history Jsoncontext JsonparticipantId String?isComplete BooleanstartedAt DateTimecompletedAt DateTime?
FK: dialogueTreeDialogueTree Cascade
Questquest#
id String PKname Stringdescription String?worldId Stringcategory QuestCategorypriority QuestPrioritystatus QuestStatusgiverId String?locationId String?minLevel Int?maxLevel Int?prerequisites Jsontags String[]createdAt DateTimeupdatedAt DateTimepublishedAt DateTime? +2 more
FK: worldWorld Cascade
QuestObjectivequest_objective#
id String PKquestId Stringtype ObjectiveTypedescription StringtargetCount IntcurrentProgress IntisCompleted BooleanisOptional BooleanorderIndex InttargetEntityId String?metadata JsoncreatedAt DateTimeupdatedAt DateTime
FK: questQuest Cascade
QuestRewardquest_reward#
id String PKquestId Stringtype Stringamount Int?itemId String?description String?isChoice BooleancreatedAt DateTime
FK: questQuest Cascade
SimulationRunsimulation_run#
id String PKworldId Stringtype SimulationTypestatus SimulationStatuspriority SimulationPriorityinput Jsonoutput Json?progress FloatcurrentTick InttotalTicks Int?errorMessage String?errorDetails Json?workerId String?startVersionId String?endVersionId String?createdAt DateTime +5 more
FK: worldWorld Cascade
SimulationEventsimulation_event#
id String PKsimulationId Stringtype Stringtick Intdata JsonaffectedEntities JsoncreatedAt DateTime
FK: simulationSimulationRun Cascade
SimulationSnapshotsimulation_snapshot#
id String PKsimulationId Stringtick Intstate JsoncreatedAt DateTime
FK: simulationSimulationRun Cascade
ValidationResultvalidation_result#
id String PKworldId StringentityId String?validationType StringisValid Booleanissues Jsonsuggestions JsoncreatedAt DateTime
AuditLogaudit_log#
id String PKentityType StringentityId Stringaction StringuserId String?changes JsonpreviousState Json?createdAt DateTime
Ideaidea#
id String PKkind IdeaKindstatus IdeaStatustitle Stringbody Stringpayload Jsontags String[]worldId String?boardId String?embeddingMeta Json?generatorMeta Json?createdBy StringcreatedAt DateTimeupdatedAt DateTimerevisions IdeaRevision[]optionMemberships OptionSetMember[] +4 more
FK: boardIdeaBoard · linksFromIdeaLink · linksToIdeaLink
IdeaRevisionidea_revision#
id String PKideaId Stringseq Intauthor StringdiffSummary Stringsnapshot JsoncreatedAt DateTime
FK: ideaIdea Cascade
IdeaBoardidea_board#
id String PKname Stringpurpose String?layout Jsonarchived BooleancreatedBy StringcreatedAt DateTimeupdatedAt DateTimeideas Idea[]tournaments IdeationTournament[]
OptionSetoption_set#
id String PKgeneratorId StringgeneratorParamsHash StringpromptMeta JsoncreatedBy StringcreatedAt DateTimemembers OptionSetMember[]tournaments IdeationTournament[]
OptionSetMemberoption_set_member#
id String PKoptionSetId StringideaId Stringordinal Int
FK: optionSetOptionSet Cascade · ideaIdea Cascade
IdeationTournamentideation_tournament#
id String PKoptionSetId String?boardId String?method TournamentMethodstatus TournamentStatusconfig JsonresultCache Json?createdBy StringcreatedAt DateTimeupdatedAt DateTimejudgments IdeationJudgment[]
FK: optionSetOptionSet · boardIdeaBoard
IdeationJudgmentideation_judgment#
id String PKtournamentId StringjudgeId StringaId StringbId Stringwinner JudgmentWinnercreatedAt DateTime
FK: tournamentIdeationTournament Cascade
RubricScorerubric_score#
id String PKideaId StringrubricId StringcriterionKey Stringscore FloatweightAtTime Floatsource ScoreSourcesourceDetail StringcreatedAt DateTime
FK: ideaIdea Cascade
IdeationDecisionideation_decision#
id String PKsubjectIdeaId Stringdecision IdeationDecisionTypegate IdeationGate?rejectedIdeaIds String[]scoresSnapshot Jsonreason StringdecidedBy StringcreatedAt DateTime
FK: subjectIdeaIdea
IdeationPromotionideation_promotion#
id String PKideaId StringtargetType PromotionTargetTypetargetId StringworldBranchId String?validationFindings JsontargetDeletedAt DateTime?targetDeletedNote String?promotedBy StringcreatedAt DateTime
FK: ideaIdea
IdeationNoteideation_note#
id String PKsubjectType StringsubjectId Stringbody Stringseverity Stringblocking Booleanauthor Stringassignee String?state IdeationNoteStateresolutionLink String?resolutionNote String?createdAt DateTimeresolvedAt DateTime?
LadderArtifactladder_artifact#
id String PKideaId Stringrung LadderRungversion Intcontent Jsonorigin LadderOrigindraftModelId String?status LadderArtifactStatusderivedFromArtifactId String?createdBy StringcreatedAt DateTime
FK: ideaIdea Cascade

Enums (34)#

WorldStatus4 values
DRAFTACTIVEARCHIVEDDELETED
WorldGenre8 values
FANTASYSCIENCE_FICTIONHISTORICALCONTEMPORARYHORRORMYSTERYMYTHOLOGYCUSTOM
WorldScope5 values
SMALLMEDIUMLARGEEPICCOSMIC
TechnologyLevel9 values
PRIMITIVEANCIENTMEDIEVALRENAISSANCEINDUSTRIALMODERNFUTURISTICADVANCEDMIXED
MagicLevel5 values
NONELOWMEDIUMHIGHEPIC
EntityType10 values
CHARACTERFACTIONLOCATIONEVENTRELATIONSHIPERAREGIONITEMCULTURERELIGION
CharacterStatus5 values
ALIVEDECEASEDUNKNOWNMISSINGLEGENDARY
FactionType10 values
GOVERNMENTMILITARYRELIGIOUSCRIMINALMERCHANTGUILDSECRET_SOCIETYFAMILYTRIBALOTHER
LocationType11 values
CITYTOWNVILLAGEFORTRESSTEMPLEDUNGEONWILDERNESSLANDMARKREGIONREALMPLANE
QuestStatus6 values
DRAFTAVAILABLEACTIVECOMPLETEDFAILEDCANCELLED
QuestCategory6 values
MAINSIDEEXPLORATIONFACTIONDAILYWORLD_EVENT
QuestPriority4 values
LOWNORMALHIGHCRITICAL
ObjectiveType8 values
COLLECTKILLTALKEXPLOREESCORTDELIVERCRAFTCUSTOM
StoryNodeType6 values
STARTSCENECHOICECONDITIONACTIONEND
DialogueNodeType6 values
GREETINGSTATEMENTQUESTIONRESPONSECHOICEEND
SimulationType5 values
ECONOMYPOLITICSCULTURESCENARIOFULL
SimulationStatus6 values
PENDINGQUEUEDRUNNINGCOMPLETEDFAILEDCANCELLED
SimulationPriority4 values
LOWNORMALHIGHCRITICAL
MergeRequestStatus5 values
OPENAPPROVEDMERGEDREJECTEDCANCELLED
ValidationSeverity4 values
INFOWARNINGERRORCRITICAL
IdeaKind14 values
PREMISELOGLINEWHAT_IFCHARACTER_CONCEPTCULTURE_SEEDWORLD_SEEDLOCATION_SEEDFACTION_SEEDQUEST_SEEDTHEMETITLEIMAGE_REFAUDIO_REFFRAGMENT
IdeaStatus7 values
CAPTUREDDEVELOPINGSHORTLISTEDSELECTEDPROMOTEDKILLEDARCHIVED
IdeaLinkType5 values
DERIVED_FROMMERGED_FROMINSPIRED_BYCONTRADICTSPROMOTED_TO
TournamentMethod2 values
ELOBRADLEY_TERRY
TournamentStatus3 values
ACTIVECOMPLETEDCANCELLED
JudgmentWinner3 values
ABTIE
ScoreSource3 values
HUMANCRITIC_AGENTANALYZER
IdeationDecisionType6 values
SELECTEDKILLEDREVIVEDGATE_ADVANCEDGATE_HELDOVERRIDE
IdeationGate3 values
CONCEPTDEVELOPGREENLIGHT
PromotionTargetType6 values
CHARACTERCULTUREWORLD_ENTITYQUESTPROTOTYPE_BRIEFBIBLE
IdeationNoteState4 values
OPENADDRESSEDREBUTTEDDEFERRED
LadderRung4 values
LOGLINESYNOPSISTREATMENTBEAT_OUTLINE
LadderOrigin2 values
MODEL_DRAFTHUMAN
LadderArtifactStatus3 values
DRAFTEDITEDAPPROVED