Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add asset filehash #65

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions mirror-web-server/src/asset/asset.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ export class AssetPublicData {
isSoftDeleted: boolean
@ApiProperty()
softDeletedAt: string
@ApiProperty()
fileHash: string
}

export type AssetDocument = Asset & Document // Note: we also have subclasses/disciminators for materials and textures (as of 2023-02-04 20:18:08). Walkthrough: https://www.loom.com/share/7e09d2777ef94368bcd5fd8c8341b5ef
Expand Down Expand Up @@ -207,6 +209,10 @@ export class Asset {
@ApiProperty()
currentFile: string

@Prop({ required: false })
@ApiProperty()
fileHash?: string

// Transform properties.
@Prop({})
@ApiProperty()
Expand Down
5 changes: 5 additions & 0 deletions mirror-web-server/src/asset/dto/create-asset.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ export class CreateAssetDto {
@ApiProperty({ required: false })
currentFile?: string

@IsOptional()
@MaxLength(64)
@ApiProperty({ required: false })
fileHash?: string

@IsOptional()
@IsBoolean()
@ApiProperty({ required: false })
Expand Down
Loading