export class Media { static setMapping ( mapping ) { mapping . forProperty ( 'id' ) . increments ( ) . primary ( ) ; mapping . forProperty ( 'url' ) . field ( { type : 'string' } ) ; mapping . forProperty ( 'offer' ) . manyToOne ( { targetEntity : 'Offer' , inversedBy : 'pictures' } ) . joinColumn ( { onDelete : 'cascade' } ) ; } }