further work on billing

This commit is contained in:
Thomas Ruoff
2020-10-07 00:32:22 +02:00
committed by Thomas Ruoff
parent f8434233d9
commit c396cdcbf9
6 changed files with 75 additions and 52 deletions

View File

@@ -1,6 +1,5 @@
import * as mongoose from 'mongoose'
import { BILL_STATUS, MILAGE_RATES, getMilageRateValue } from './enums'
import { BookingDocument } from './booking'
export interface AdditionalCosts {
name: string
@@ -10,7 +9,6 @@ export interface AdditionalCosts {
export interface BillDocument
extends mongoose.SchemaTimestampsConfig,
mongoose.Document {
booking: BookingDocument
milageStart: number
milageEnd: number
milage?: number
@@ -23,12 +21,6 @@ export interface BillModel extends mongoose.Model<BillDocument> {}
const BillSchema = new mongoose.Schema<BillDocument>(
{
booking: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Booking',
unique: true,
required: true,
},
milageStart: {
type: Number,
required: true,