Skip to content

Commit

Permalink
Merge pull request #534 from SciCatProject/hot-fix-datafile-schema
Browse files Browse the repository at this point in the history
Fixed data properties for orig datablocks file
  • Loading branch information
nitrosx authored Jun 2, 2023
2 parents 69e5ce1 + b28b16a commit 848a023
Showing 1 changed file with 39 additions and 8 deletions.
47 changes: 39 additions & 8 deletions src/common/schemas/datafile.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,50 +7,81 @@ export type DataFileDocument = DataFile & Document;
export class DataFile {
@ApiProperty({
type: String,
required: true,
description: "Relative path of the file within the dataset folder.",
})
@Prop({ type: String, required: true })
@Prop({
type: String,
required: true,
})
path: string;

@ApiProperty({
type: Number,
required: true,
description: "Uncompressed file size in bytes.",
})
@Prop()
@Prop({
type: Number,
required: true,
})
size: number;

@ApiProperty({
type: Date,
required: true,
description:
"Time of file creation on disk, format according to chapter 5.6 internet date/time format in RFC 3339. Local times without timezone/offset info are automatically transformed to UTC using the timezone of the API server.",
})
@Prop()
@Prop({
type: Date,
required: true,
})
time: Date;

@ApiProperty({
type: String,
required: false,
description:
"Checksum for the file, e.g. its sha-2 hashstring. The hash algorithm should be encoded in the (Orig)Datablock.",
})
@Prop()
@Prop({
type: String,
required: false,
})
chk: string;

@ApiProperty({
type: String,
required: false,
description: "User ID name as seen on filesystem.",
})
@Prop()
@Prop({
type: String,
required: false,
})
uid: string;

@ApiProperty({
type: String,
required: false,
description: "Group ID name as seen on filesystem.",
})
@Prop()
@Prop({
type: String,
required: false,
})
gid: string;

@ApiProperty({ type: String, description: "Posix permission bits." })
@Prop()
@ApiProperty({
type: String,
required: false,
description: "Posix permission bits.",
})
@Prop({
type: String,
required: false,
})
perm: string;
}

Expand Down

0 comments on commit 848a023

Please sign in to comment.