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.
61 lines
1.3 KiB
61 lines
1.3 KiB
/**
|
|
* Data about an activity.
|
|
*/
|
|
export default class Activity {
|
|
/** ID of the activity, ignored on input */
|
|
public id : string;
|
|
|
|
/** The user ID the activity is associated with. */
|
|
public userId : string;
|
|
|
|
/** A name for the activity */
|
|
public name : string;
|
|
|
|
/** Icon to use for it */
|
|
public icon : string;
|
|
|
|
/** Bonus awarded once daily. This is to reward consistency. */
|
|
public dailyBonus : number;
|
|
|
|
/** Sub activities */
|
|
public subActivites : SubActivtiy[];
|
|
}
|
|
|
|
/**
|
|
* An activity udpate for activities
|
|
*/
|
|
export class ActivityUpdate {
|
|
/** Add a sub activity */
|
|
addSub? : SubActivtiy;
|
|
|
|
/** Replace a sub activity */
|
|
editSub? : SubActivtiy;
|
|
|
|
/** Remove a sub activity by ID */
|
|
removeSub? : string;
|
|
|
|
/** Set activity name */
|
|
setName? : string;
|
|
|
|
/** Set activity icon */
|
|
setIcon? : string;
|
|
}
|
|
|
|
/**
|
|
* Sub-Activity of an activity. While an activity can be as general as "3D modeling", this
|
|
* is where the specific activiteis under that umbrella is. Practice, tutorial, or whatever fits
|
|
* the parent activity.
|
|
*/
|
|
export class SubActivtiy {
|
|
/** ID of the sub-activtiy, ignored on input */
|
|
public id : string;
|
|
|
|
/** Sub-activity name */
|
|
public name : string;
|
|
|
|
/** Measured unit, always plural (e.g. minutes) */
|
|
public unitName : string;
|
|
|
|
/** Points awarded per unit. */
|
|
public value : number;
|
|
}
|