Transfer repository from Gitlab

This commit is contained in:
Tran, Alex
2022-02-03 10:06:44 -06:00
parent af2efbdbbd
commit 568cc243f0
177 changed files with 13300 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import { IsNotEmpty, IsOptional } from 'class-validator';
import { AssetType } from '../entities/asset.entity';
export class CreateAssetDto {
@IsNotEmpty()
deviceAssetId: string;
@IsNotEmpty()
deviceId: string;
@IsNotEmpty()
assetType: AssetType;
@IsNotEmpty()
createdAt: string;
@IsNotEmpty()
modifiedAt: string;
@IsNotEmpty()
isFavorite: boolean;
@IsNotEmpty()
fileExtension: string;
@IsOptional()
lat: string;
@IsOptional()
lon: string;
}

View File

@@ -0,0 +1,6 @@
import { IsNotEmpty, IsOptional } from 'class-validator';
export class GetAllAssetQueryDto {
@IsOptional()
nextPageKey: string;
}

View File

@@ -0,0 +1,7 @@
import { AssetEntity } from '../entities/asset.entity';
export class GetAllAssetReponseDto {
data: Array<{ date: string; assets: Array<AssetEntity> }>;
count: number;
nextPageKey: string;
}

View File

@@ -0,0 +1,6 @@
import { IsNotEmpty } from 'class-validator';
class GetAssetDto {
@IsNotEmpty()
deviceId: string;
}

View File

@@ -0,0 +1,16 @@
import { Transform } from 'class-transformer';
import { IsBoolean, IsBooleanString, IsNotEmpty, IsOptional } from 'class-validator';
export class ServeFileDto {
//assetId
@IsNotEmpty()
aid: string;
//deviceId
@IsNotEmpty()
did: string;
@IsOptional()
@IsBooleanString()
isThumb: string;
}

View File

@@ -0,0 +1,4 @@
import { PartialType } from '@nestjs/mapped-types';
import { CreateAssetDto } from './create-asset.dto';
export class UpdateAssetDto extends PartialType(CreateAssetDto) {}