You've already forked obsidian-visualiser
Add character selection using campaign visibility and player characters in campaign
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Database } from "bun:sqlite";
|
||||
import { BunSQLiteDatabase, drizzle } from "drizzle-orm/bun-sqlite";
|
||||
import * as schema from '../db/schema';
|
||||
import { eq, or, sql } from "drizzle-orm";
|
||||
|
||||
let instance: BunSQLiteDatabase<typeof schema> & {
|
||||
$client: Database;
|
||||
|
||||
25
app/types/campaign.d.ts
vendored
Normal file
25
app/types/campaign.d.ts
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { User } from "./auth";
|
||||
import type { Character, ItemState } from "./character";
|
||||
import type { Serialize } from 'nitropack';
|
||||
|
||||
export type CampaignVariables = {
|
||||
money: number;
|
||||
inventory: ItemState[];
|
||||
};
|
||||
export type Campaign = {
|
||||
id: number;
|
||||
name: string;
|
||||
link: string;
|
||||
owner: { id: number, username: string };
|
||||
members: Array<{ member: { id: number, username: string } }>;
|
||||
characters: Array<Partial<{ character: { id: number, name: string, owner: number } }>>;
|
||||
public_notes: string;
|
||||
dm_notes: string;
|
||||
logs: CampaignLog[];
|
||||
} & CampaignVariables;
|
||||
export type CampaignLog = {
|
||||
from: number;
|
||||
timestamp: Serialize<Date>;
|
||||
type: 'ITEM' | 'CHARACTER' | 'PLACE' | 'EVENT' | 'FIGHT' | 'TEXT';
|
||||
details: string;
|
||||
};
|
||||
Reference in New Issue
Block a user