2018-07-12 14:11:31 +02:00
|
|
|
import { Deserializable } from '../deserializable.model';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Content of the 'assignment_related_users' property
|
|
|
|
* @ignore
|
|
|
|
*/
|
|
|
|
export class AssignmentUser implements Deserializable {
|
2018-08-29 13:21:25 +02:00
|
|
|
public id: number;
|
|
|
|
public user_id: number;
|
|
|
|
public elected: boolean;
|
|
|
|
public assignment_id: number;
|
|
|
|
public weight: number;
|
2018-07-12 14:11:31 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Needs to be completely optional because assignment has (yet) the optional parameter 'assignment_related_users'
|
|
|
|
* @param id
|
|
|
|
* @param user_id
|
|
|
|
* @param elected
|
|
|
|
* @param assignment_id
|
|
|
|
* @param weight
|
|
|
|
*/
|
2018-08-29 13:21:25 +02:00
|
|
|
public constructor(id?: number, user_id?: number, elected?: boolean, assignment_id?: number, weight?: number) {
|
2018-07-12 14:11:31 +02:00
|
|
|
this.id = id;
|
|
|
|
this.user_id = user_id;
|
|
|
|
this.elected = elected;
|
|
|
|
this.assignment_id = assignment_id;
|
|
|
|
this.weight = weight;
|
|
|
|
}
|
|
|
|
|
2018-08-29 13:21:25 +02:00
|
|
|
public deserialize(input: any): this {
|
2018-07-12 14:11:31 +02:00
|
|
|
Object.assign(this, input);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|