/
romatur
/
rn-dev
Обзор
Документация
Войти
/
romatur
/
rn-dev
Код
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
rn-dev-project-api/src/models/Files.ts
85 строк
2 KB
Roman.Turusov
init
08 апр 2026, 23:35
08 апр 2026, 23:35
c780c58
Код
Авторство
О чём код?
import { Expose, Transform } from 'class-transformer' import { transformIsNumber } from './transform/files' export enum StepFiles { InspectionStartNumberVehicle, InspectionStartTemperature, InspectionStartTrailer, InspectionStartContainer, InspectionStartBreakingContainer, InspectionStartSeal, StateCargoGoods, TemperatureCheckBoot, ThermogramSensor, ThermogramPhoto, ThermogramFile, RNGCheckList, OutsideInspectionGeneralView, OutsideInspectionVPTTemperature, OutsideInspectionSelection, OutsideInspectionIntegrity, OutsideInspectionLabeling, OutsideInspectionCondensate, MainInspectionGeneralView, MainInspectionGeneralData, MainInspectionDestroyingControl, MainInspectionScree, MainInspectionHerb, MainInspectionSugar, MainInspectionDensity, MainInspectionWaste, MainInspectionNonstandard, MainInspectionCaliber, MainInspectionBadCaliber, MainInspectionBadKind, InspectionAct, } export class File { @Expose() id: string @Expose() step: (typeof StepFiles)[keyof typeof StepFiles] @Expose() url: string } export class INSVehicleFile extends File { @Expose({ name: 'small_url_preview' }) smallUrlPreview?: string } export class ThermogramsFile extends File { @Expose({ name: 'small_url_preview' }) smallUrlPreview?: string } export class RNGFile extends File { @Expose() extraSample: string } export class OutsideFile extends File { @Expose({ name: 'small_url_preview' }) smallUrlPreview?: string } export class MainFile extends File { @Expose({ name: 'small_url_preview' }) smallUrlPreview?: string @Expose({ name: 'group' }) @Transform(transformIsNumber) group?: string } export class InspectionAct extends File { @Expose() matnr?: string }