import { Attr } from 'ts-framework' import { TripDomainResponseDTO} from './trip' import { CreateTripOperatorDTO } from './trip-operator' import { CreateTripVehicleDTO } from './trip-vehicle' export class CreateTripStatusDTO { @Attr({ type: String, optional: true }) comment?: string @Attr({ type: String }) status: string @Attr({ type: Number, optional: true }) statusId?: number @Attr({ type: String }) tripId: string } export class TripStatusDTO { @Attr({ type: String }) id: string @Attr({ type: String }) status: string @Attr({ type: Date }) createdAt: Date @Attr({ type: TripDomainResponseDTO}) trip: TripDomainResponseDTO } export class UpdateTripStatusDTO { @Attr({ type: String }) tripId: string @Attr({ type: CreateTripStatusDTO }) status: CreateTripStatusDTO @Attr({ type: CreateTripOperatorDTO }) operator?: CreateTripOperatorDTO @Attr({ type: CreateTripVehicleDTO }) vehicle?: CreateTripVehicleDTO } export class TripStatusResponseDTO { id: string comment: string createdAt: Date createdBy: string status: string constructor(model: TripStatusResponseDTO) { this.id = model.id this.comment = model.comment this.createdAt = model.createdAt this.createdBy = model.createdBy this.status = model.status } static of(model: TripStatusResponseDTO): TripStatusResponseDTO { return new TripStatusResponseDTO(model) } }