112 lines
3.8 KiB
TypeScript
112 lines
3.8 KiB
TypeScript
import { Database } from 'bun:sqlite';
|
|
|
|
import { siteTextMigrations } from '../src/entities/site-text/schema';
|
|
import { upsertSiteTextBlock } from '../src/entities/site-text/repo';
|
|
import { runMigrations, injectDb } from '../src/shared/db';
|
|
import { logger } from '../src/shared/logger';
|
|
|
|
const dbPath =
|
|
process.argv[2] ??
|
|
process.env['DB_PATH'] ??
|
|
new URL('../data/quinn-api-dev.db', import.meta.url).pathname;
|
|
|
|
const db = new Database(dbPath);
|
|
db.exec('PRAGMA journal_mode = WAL');
|
|
db.exec('PRAGMA foreign_keys = ON');
|
|
injectDb(db);
|
|
|
|
runMigrations(db, siteTextMigrations);
|
|
|
|
const PROVIDER = 'quinn';
|
|
let count = 0;
|
|
|
|
function upsert(
|
|
kind: 'about' | 'etiquette' | 'policy' | 'site_text',
|
|
namespace: string,
|
|
key: string,
|
|
value: string,
|
|
listJson?: string | null,
|
|
sortOrder = 0,
|
|
) {
|
|
upsertSiteTextBlock(db, { kind, namespace, key, value, listJson: listJson ?? null, sortOrder, providerSlug: PROVIDER });
|
|
count++;
|
|
}
|
|
|
|
upsert(
|
|
'about', '', 'bio',
|
|
"I'm Quinn — a trans woman companion based in the Bay Area. I'm warm, curious, and genuinely love meeting new people.",
|
|
);
|
|
upsert('about', '', 'personality', '', JSON.stringify(['warm', 'witty', 'nerdy', 'playful', 'genuine']));
|
|
upsert(
|
|
'about', '', 'availableFor', '',
|
|
JSON.stringify(['Girlfriend Experience (GFE)', 'Dinner Dates', 'Travel Companion', 'Overnights', 'Fly Me To You (FMTY)', 'Online Connections']),
|
|
);
|
|
upsert(
|
|
'about', '', 'availableTo', '',
|
|
JSON.stringify(['Open-minded gentlemen', 'Couples', 'Other companions']),
|
|
);
|
|
|
|
upsert(
|
|
'etiquette', '', 'Booking', '',
|
|
JSON.stringify([
|
|
{ label: 'Deposit Required', detail: 'A deposit secures your appointment.' },
|
|
{ label: 'Screening', detail: 'Brief, confidential screening required for all new clients.' },
|
|
{ label: 'Same-Day', detail: 'Available on select days — inquire early.' },
|
|
]),
|
|
10,
|
|
);
|
|
upsert(
|
|
'etiquette', '', 'During Our Date', '',
|
|
JSON.stringify([
|
|
{ label: 'Be Present', detail: 'Put the phone away and enjoy the moment.' },
|
|
{ label: 'Hygiene', detail: 'Please shower before our time together.' },
|
|
{ label: 'Generosity', detail: 'Leave the donation discreetly at the start of our visit.' },
|
|
]),
|
|
20,
|
|
);
|
|
upsert(
|
|
'etiquette', '', 'Communication', '',
|
|
JSON.stringify([
|
|
{ label: 'Text Only', detail: 'Please reach out via text — no calls unless scheduled.' },
|
|
{ label: 'Response Time', detail: 'I typically respond within a few hours.' },
|
|
{ label: 'Discretion', detail: 'Your privacy is as important to me as my own.' },
|
|
]),
|
|
30,
|
|
);
|
|
|
|
upsert(
|
|
'policy', '', 'Health & Safety', '',
|
|
JSON.stringify([
|
|
{ label: 'Testing', detail: 'I test regularly and expect the same standard.' },
|
|
{ label: 'Protection', detail: 'Non-negotiable. No exceptions.' },
|
|
]),
|
|
10,
|
|
);
|
|
upsert(
|
|
'policy', '', 'Cancellations', '',
|
|
JSON.stringify([
|
|
{ label: 'Notice Required', detail: '24 hours notice required to reschedule without penalty.' },
|
|
{ label: 'No-Shows', detail: 'Deposits are non-refundable for no-shows.' },
|
|
]),
|
|
20,
|
|
);
|
|
upsert(
|
|
'policy', '', 'Boundaries', '',
|
|
JSON.stringify([
|
|
{ label: 'Consent', detail: 'Boundaries are discussed in advance and respected absolutely.' },
|
|
{ label: 'Negotiation', detail: 'Rates and services are not negotiated during our time.' },
|
|
]),
|
|
30,
|
|
);
|
|
|
|
upsert('site_text', 'hero', 'tagline', 'Upscale Trans Companion — Touring Nationwide');
|
|
upsert('site_text', 'hero', 'subline', 'Berkeley-based. Available to travel.');
|
|
upsert('site_text', 'contact', 'cta', 'Book an Appointment');
|
|
upsert('site_text', 'contact', 'note', 'Serious inquiries only. Discretion always.');
|
|
upsert('site_text', 'footer', 'copy', '© Quinn. All rights reserved.');
|
|
|
|
// e2e marker asserted by iter12-e2e
|
|
upsert('site_text', 'e2e', 'marker', 'iter12-native-override');
|
|
|
|
logger.info('seed complete', { count, provider: PROVIDER });
|
|
db.close();
|