mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 23:17:12 +01:00
use types instead of interfaces
This commit is contained in:
11
db/booker.ts
11
db/booker.ts
@@ -1,6 +1,6 @@
|
||||
import * as mongoose from 'mongoose'
|
||||
|
||||
export interface Booker {
|
||||
export type Booker = {
|
||||
name: string
|
||||
email: string
|
||||
phone: string
|
||||
@@ -9,12 +9,11 @@ export interface Booker {
|
||||
city: string
|
||||
}
|
||||
|
||||
export interface BookerDocument
|
||||
extends Booker,
|
||||
mongoose.SchemaTimestampsConfig,
|
||||
mongoose.Document {}
|
||||
export type BookerDocument = Booker &
|
||||
mongoose.SchemaTimestampsConfig &
|
||||
mongoose.Document
|
||||
|
||||
export interface BookerModel extends mongoose.Model<BookerDocument> {}
|
||||
export type BookerModel = mongoose.Model<BookerDocument>
|
||||
|
||||
const BookerSchema = new mongoose.Schema<BookerDocument>(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user