Makes a generic document form

This commit is contained in:
2025-05-31 17:37:38 -07:00
parent 6b6636d695
commit 81fd84790b
5 changed files with 55 additions and 25 deletions

View File

@@ -14,7 +14,7 @@ export type Campaign = RecordModel & {
export type Document = RecordModel & {
id: DocumentId;
campaign: Campaign;
campaign: CampaignId;
data: {};
// These two are not in Pocketbase's types, but they seem to always be present
created: string;
@@ -57,8 +57,11 @@ export const RelationshipType = {
DiscoveredIn: "discoveredIn",
} as const;
export type RelationshipType =
(typeof RelationshipType)[keyof typeof RelationshipType];
export type Relationship = RecordModel & {
primary: DocumentId;
secondary: DocumentId[];
type: (typeof RelationshipType)[keyof typeof RelationshipType];
type: RelationshipType;
};