import {IProductCollection} from './product-collection.model'; import {IProductTemplate} from './product-template.model'; import {IGuarantee} from './guarantee.model'; import {EFundingType} from './e-funding-type.model'; import {EProductCategory} from './e-product-category.model'; import { Moment } from 'moment'; export interface IProduct { id?: string; label?: string; reissue?: boolean; dateBeginESignature?: Moment; dateEndESignature?: Moment; dateBeginPaper?: Moment; dateEndPaper?: Moment; dateBeginTransfert?: Moment; dateEndTransfert?: Moment; category?: EProductCategory; fundingType?: EFundingType; guarantees?: IGuarantee[]; templates?: IProductTemplate[]; productCollections?: IProductCollection[]; companyId?: string; } export class Product implements IProduct { constructor( public id?: string, public label?: string, public reissue?: boolean, public dateBeginESignature?: Moment, public dateEndESignature?: Moment, public dateBeginPaper?: Moment, public dateEndPaper?: Moment, public dateBeginTransfert?: Moment, public dateEndTransfert?: Moment, public category?: EProductCategory, public fundingType?: EFundingType, public guarantees?: IGuarantee[], public templates?: IProductTemplate[], public productCollections?: IProductCollection[], public companyId?: string ) { this.reissue = this.reissue || false; } }