import { Customer } from './customer' ; export class Order { id : number ; customerId : number ; memo : string ; orderDate : Date ; static create ( id , order = { } , customer ? ) { const newOrder = Object . assign ( new Order ( ) , { customerId : customer ? customer . id : 0 , orderDate : new Date ( ) , ... order , id } ) ; return newOrder ; } }