Skip to content

Instantly share code, notes, and snippets.

@yodeah
Created April 20, 2018 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yodeah/911c9ffbe895920761798540eb7a9791 to your computer and use it in GitHub Desktop.
Save yodeah/911c9ffbe895920761798540eb7a9791 to your computer and use it in GitHub Desktop.
Uj deal model
/*ORIGINAL*/
export class Deal {
public id:number;
public restaurantId:number;
public name:string;
public price:number;
public currency:string;
public promotionStartDate: string;
public promotionEndDate: string;
public startTime:string;
public endTime:string;
public days:Array<Day>;
public priority:number;
}
/*
{"data"
:{"deals"
:[
{
"id":13,
"restaurantId":5,
"name":"Hello world",
"price":11,
"currency":"USD",
"promotionStartDate":"2018-03-14T12:03:16Z",
"promotionEndDate":"2018-04-06T12:03:20Z",
"startTime":"12:03:24",
"endTime":"17:03:27",
"days":["MONDAY","WEDNESDAY"],
"priority":0
}
]
}
}
*/
/*NEW*/
export class Deal {
public id:number;
public restaurantId:number;
public name:string;
public price:number;
public currency:string;
public promotionDate: string; //innen jott ki a start & end date es igy fog kinezni "2018-04-06"
public startTime:string;
public endTime:string;
public days:Array<Day>;
public priority:number;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment