argos/dmp-frontend/src/app/models/projects/ProjectListingModel.ts

27 lines
765 B
TypeScript
Raw Normal View History

2017-12-14 14:10:56 +01:00
import { Serializable } from "../Serializable";
export class ProjectListingModel implements Serializable<ProjectListingModel> {
public id: String;
public label: String;
public abbreviation: String;
public reference: String;
public uri: String;
public status: String;
public startDate: Date;
public endDate: Date;
public description: String;
fromJSONObject(item: any): ProjectListingModel {
this.id = item.id;
this.label = item.label;
this.abbreviation = item.abbreviation;
this.reference = item.reference;
this.uri = item.uri;
this.status = item.status;
2017-12-21 09:54:49 +01:00
this.startDate = new Date(item.startdate);
this.endDate = new Date(item.enddate);
2017-12-14 14:10:56 +01:00
this.description = item.description;
return this;
}
}