Your IP : 216.73.217.95


Current Path : /proc/thread-self/root/home/deltalab/PMS/logistic-backend/src/models/carriers/
Upload File :
Current File : //proc/thread-self/root/home/deltalab/PMS/logistic-backend/src/models/carriers/carrier.schema.ts

import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';

export type CarrierDocument = Carrier & Document;

@Schema({ timestamps: true, versionKey: false })
export class Carrier {
  @Prop({ required: true })
  name: string;

  @Prop()
  description: string;

  @Prop()
  fuelPrice: number;

  @Prop()
  fuelConsumption: number;

  @Prop()
  rentalCost: number;

  @Prop()
  operatorCost: number;

  @Prop()
  maxPayload: number;

  @Prop()
  maxPayloadPercentage: number;

  @Prop()
  cubicMetersCapacity: number;

  @Prop()
  maxCubicMetersPercentage: number;

  @Prop()
  serviceTime: number;

  @Prop()
  workshiftAvailableTime: number;

  @Prop()
  trafficCoefficentPercentage: number;

  @Prop()
  address: string;
}

export const CarrierSchema = SchemaFactory.createForClass(Carrier);