You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
558 B

export class RelationItem {
constructor(
public id: number,
public fromId: number,
public toId: number,
public type: number,
) {
}
static valueOf(
{id, from_id, to_id, type}: { id: number, from_id: number, to_id: number, type: number }
): RelationItem {
return new RelationItem(id, from_id, to_id, type)
}
toObject(): Object {
return {
id: this.id,
from_id: this.fromId,
to_id: this.toId,
type: this.type,
}
}
}