Vertragsereignisse: Nachweise, Widerrufsfristen, Speicher-Aufgaben
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7e869280f3
commit
7799d7c4de
4 files changed
+318
No files matched your search
@@ -119,6 +119,11 @@ await ensureCollection(
|
||||
{ type: 'string', key: 'offerText', size: 300 },
|
||||
// Plan 1: Produkt des Abos (wartung | hosting)
|
||||
{ type: 'string', key: 'productKey', size: 16 },
|
||||
// Plan 2 (Hosting-Abo + Zusatzspeicher): Wechseltag (Beginn der neuen Mindestlaufzeit) und bezahlter Speicherstand
|
||||
{ type: 'datetime', key: 'termStartAt' },
|
||||
{ type: 'integer', key: 'storageUnits' },
|
||||
{ type: 'integer', key: 'storagePaidUnits' },
|
||||
{ type: 'datetime', key: 'storagePaidPeriodEnd' },
|
||||
],
|
||||
[
|
||||
{ key: 'idx_customer', type: 'key', attributes: ['customerId'] },
|
||||
@@ -186,6 +191,8 @@ await ensureCollection(
|
||||
'Abo-Angebote',
|
||||
[
|
||||
{ type: 'string', key: 'customerId', size: 64 },
|
||||
// Plan 2: Angebot gilt fuer dieses Produkt (wartung | hosting)
|
||||
{ type: 'string', key: 'productKey', size: 16 },
|
||||
{ type: 'string', key: 'status', size: 20 },
|
||||
{ type: 'string', key: 'scope', size: 16 },
|
||||
{ type: 'integer', key: 'monthlyPriceCents' },
|
||||
@@ -208,6 +215,35 @@ await ensureCollection(
|
||||
]
|
||||
)
|
||||
|
||||
// Vertragsereignisse: ein Dokument je Bestellung/Aenderung (Neuabschluss, Wechsel, Zusatzspeicher,
|
||||
// Kuendigung, Widerruf) mit den Nachweisen der Zustimmung, der Widerrufsfrist und - bei Zusatzspeicher -
|
||||
// dem Stand der Aufgabe fuers Team.
|
||||
await ensureCollection(
|
||||
'contractEvents',
|
||||
'Vertragsereignisse',
|
||||
[
|
||||
{ type: 'string', key: 'customerId', size: 64 },
|
||||
{ type: 'string', key: 'subscriptionId', size: 64 },
|
||||
{ type: 'string', key: 'type', size: 16 },
|
||||
{ type: 'string', key: 'productKey', size: 16 },
|
||||
{ type: 'string', key: 'details', size: 2000 },
|
||||
{ type: 'string', key: 'termsVersion', size: 32 },
|
||||
{ type: 'datetime', key: 'consentAt' },
|
||||
{ type: 'string', key: 'consentIp', size: 64 },
|
||||
{ type: 'string', key: 'consentUserAgent', size: 300 },
|
||||
{ type: 'datetime', key: 'earlyStartConsentAt' },
|
||||
{ type: 'string', key: 'status', size: 16 },
|
||||
{ type: 'datetime', key: 'dueAt' },
|
||||
{ type: 'datetime', key: 'doneAt' },
|
||||
{ type: 'string', key: 'doneBy', size: 255 },
|
||||
{ type: 'datetime', key: 'confirmationSentAt' },
|
||||
],
|
||||
[
|
||||
{ key: 'idx_customer', type: 'key', attributes: ['customerId'] },
|
||||
{ key: 'idx_type_status', type: 'key', attributes: ['type', 'status'] },
|
||||
]
|
||||
)
|
||||
|
||||
// Worksheet-Flag: nur markierte Arbeitszeit wird vom Abo-Guthaben abgezogen
|
||||
await ensure('worksheets.countsToPlan', () =>
|
||||
aw(`${col('worksheets')}/attributes/boolean`, {
|
||||
|
||||
Reference in new issue
Block a user