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.
25 lines
698 B
25 lines
698 B
export default class Activity {
|
|
constructor(data) {
|
|
this.id = data.id || null;
|
|
this.userId = data.userId || null;
|
|
this.name = data.name || "";
|
|
this.icon = data.icon || "";
|
|
this.dailyBonus = data.dailyBonus || 0;
|
|
this.subActivities = (data.subActivities || []).map(s => new SubActivtiy(s));
|
|
}
|
|
}
|
|
|
|
export class SubActivtiy {
|
|
constructor(data) {
|
|
this.id = data.id || null;
|
|
this.name = data.name || "";
|
|
this.unitName = data.unitName || "minutes";
|
|
this.value = data.value || null;
|
|
}
|
|
}
|
|
|
|
export const ActivityUpdate = class ActivityUpdateDummyForTyping{
|
|
constructor() {
|
|
console.warn(new Error("ActivityUpdate is a dummy, don't instantiate."));
|
|
}
|
|
};
|