refactor(Doc): Add addedWhen (Date), addedWho (string), changedWhen (Date) and changedWho (string) properties.

This commit is contained in:
tekh 2025-07-09 13:51:22 +02:00
parent 49452998cb
commit d5f38cff85
2 changed files with 25 additions and 7 deletions

View File

@ -265,26 +265,40 @@ export const _documents: Doc[] = [
{ {
id: 1, id: 1,
name: "example1.pdf", name: "example1.pdf",
data: base64ToUint8Array(_base64.example1_pdf) data: base64ToUint8Array(_base64.example1_pdf),
addedWhen: new Date("2024-01-12T10:00:00Z"),
addedWho: "TekH"
}, },
{ {
id: 2, id: 2,
name: "example2.pdf", name: "example2.pdf",
data: base64ToUint8Array(_base64.example2_pdf) data: base64ToUint8Array(_base64.example2_pdf),
addedWhen: new Date("2024-02-03T09:30:00Z"),
addedWho: "bob",
changedWhen: new Date("2024-03-15T12:00:00Z"),
changedWho: "KammM"
}, },
{ {
id: 3, id: 3,
name: "document1.docx", name: "document1.docx",
data: base64ToUint8Array(_base64.document1_docx) data: base64ToUint8Array(_base64.document1_docx),
addedWhen: new Date("2023-12-20T14:45:00Z"),
addedWho: "SchreiberM"
}, },
{ {
id: 4, id: 4,
name: "spreadsheet1.xlsx", name: "spreadsheet1.xlsx",
data: base64ToUint8Array(_base64.spreadsheet1_xlsx) data: base64ToUint8Array(_base64.spreadsheet1_xlsx),
addedWhen: new Date("2024-05-01T08:15:00Z"),
addedWho: "KammM",
changedWhen: new Date("2024-06-10T16:20:00Z"),
changedWho: "OlgunR"
}, },
{ {
id: 5, id: 5,
name: "report.docx", name: "report.docx",
data: base64ToUint8Array(_base64.report_docx) data: base64ToUint8Array(_base64.report_docx),
}, addedWhen: new Date("2024-04-17T11:25:00Z"),
addedWho: "SchreiberM"
}
]; ];

View File

@ -3,7 +3,11 @@ import { _documents } from "src/_mock"
export type Doc = { export type Doc = {
id: number, id: number,
name: string, name: string,
data: Uint8Array data: Uint8Array,
addedWhen: Date,
addedWho: string,
changedWhen?: Date,
changedWho?: string
} }
export type DocQuery = { export type DocQuery = {