Skip to content

Instantly share code, notes, and snippets.

@principalweb
Created January 30, 2019 18:17
Show Gist options
  • Save principalweb/2ab23c3fc647a44d5e69379ea784962e to your computer and use it in GitHub Desktop.
Save principalweb/2ab23c3fc647a44d5e69379ea784962e to your computer and use it in GitHub Desktop.
model
export enum GoalType {
BUY = '0',
SELL = '1',
ACCOMPLISH = '2',
SELLBYUSER = '3',
ACCOMPLIAHBYUSER = '4'
}
export interface GoalValue {
name: string;
title: string;
value: any;
}
export interface TargetValue {
name: string;
title: string;
value: any;
type?: string;
id?: string;
accountType?: string;
multiValue?: any;
}
export interface Qualifier {
name: string;
title: string;
value: any;
enabled: boolean;
isReceive: boolean;
}
export interface GoalDuration {
type: string;
value: any;
}
export interface GoalItem {
name: string;
description: string;
current?: number;
target?: number;
duration: GoalDuration;
durationTitle?: string;
startDate?: Date;
endDate?: Date;
remainDays?: number;
achieved?: boolean;
type: any;
recurring: boolean;
values: {
target?: TargetValue,
nonbuy?: GoalValue,
source?: GoalValue,
products?: GoalValue,
brands?: GoalValue
activitytype?: GoalValue,
unique?: GoalValue,
qualifier?: any,
calculatepodby?: any,
calculateceby?: any
};
links?: {
deletegoal: string,
updategoal: string
};
selectdrafts: boolean;
selectpackages: boolean;
supplier: string[];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment