1- import { DvObjectOwnerNode } from '../../../core/domain/models/DvObjectOwnerNode'
1+ import { DvObjectOwnerNode , DvObjectType } from '../../../core/domain/models/DvObjectOwnerNode'
22
33export interface FileModel {
44 id : number
@@ -30,6 +30,11 @@ export interface FileModel {
3030 tabularTags ?: string [ ]
3131 creationDate ?: string
3232 publicationDate ?: string
33+ /**
34+ * The timestamp of the last update to this file record.
35+ * Format: ISO 8601 string (e.g., "2023-06-01T12:34:56Z").
36+ * Used for optimistic concurrency control to detect concurrent updates.
37+ */
3338 lastUpdateTime : string
3439 deleted : boolean
3540 tabularData : boolean
@@ -46,3 +51,52 @@ export interface FileChecksum {
4651 type : string
4752 value : string
4853}
54+
55+ const fileModelExample : FileModel = {
56+ id : 123 ,
57+ persistentId : 'doi:10.1234/example' ,
58+ name : 'data.csv' ,
59+ pidURL : 'http://example.com/file/123' ,
60+ sizeBytes : 2048 ,
61+ version : 1 ,
62+ description : 'Sample data file' ,
63+ restricted : false ,
64+ latestRestricted : false ,
65+ directoryLabel : '/data' ,
66+ datasetVersionId : 1 ,
67+ categories : [ 'survey' , 'demographics' ] ,
68+ contentType : 'text/csv' ,
69+ friendlyType : 'CSV' ,
70+ embargo : {
71+ dateAvailable : new Date ( '2024-12-31' ) ,
72+ reason : 'Embargo until publication'
73+ } ,
74+ storageIdentifier : 's3://bucket/key' ,
75+ originalFormat : 'csv' ,
76+ originalFormatLabel : 'CSV' ,
77+ originalSize : 2048 ,
78+ originalName : 'data_original.csv' ,
79+ UNF : 'UNF:6:abc123' ,
80+ rootDataFileId : 123 ,
81+ previousDataFileId : 122 ,
82+ md5 : 'd41d8cd98f00b204e9800998ecf8427e' ,
83+ checksum : {
84+ type : 'MD5' ,
85+ value : 'd41d8cd98f00b204e9800998ecf8427e'
86+ } ,
87+ metadataId : 456 ,
88+ tabularTags : [ 'tabular' , 'data' ] ,
89+ creationDate : '2024-01-01T12:00:00Z' ,
90+ publicationDate : '2024-06-01T12:00:00Z' ,
91+ lastUpdateTime : '2024-06-15T12:34:56Z' ,
92+ deleted : false ,
93+ tabularData : true ,
94+ fileAccessRequest : false ,
95+ isPartOf : {
96+ type : 'dataverse' as DvObjectType ,
97+ displayName : 'My Dataverse' ,
98+ identifier : 'my-dataverse'
99+ }
100+ }
101+
102+ fileModelExample . lastUpdateTime
0 commit comments