UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

234 lines (228 loc) 5.49 kB
import {ModelDefinition} from './BaseModels'; import {Log} from './Log'; import {Project} from './Project'; import {Customer} from './Customer'; import {Asset} from './Asset'; import {StorylineCategory} from './StorylineCategory'; import {Storypoint} from './Storypoint'; declare var Object: any; export interface StorylineInterface { name: string; status?: string; storylineDate: Date; description?: string; placeOfReference?: string; storypointsOrder?: any; created?: Date; modified?: Date; deleted?: Date; id?: any; projectId?: any; customerId?: any; userId?: string; principalType?: string; assetIds?: Array<any>; storylineCategoryId?: string; trackingLogs?: Log[]; project?: Project; customer?: Customer; author?: any; assets?: Asset[]; storylineCategory?: StorylineCategory; container?: any; storypoints?: Storypoint[]; } export class Storyline implements StorylineInterface { name: string; status: string; storylineDate: Date; description: string; placeOfReference: string; storypointsOrder: any; created: Date; modified: Date; deleted: Date; id: any; projectId: any; customerId: any; userId: string; principalType: string; assetIds: Array<any> = []; storylineCategoryId: string; trackingLogs?: Log[]; project?: Project; customer?: Customer; author?: any; assets?: Asset[]; storylineCategory?: StorylineCategory; container?: any; storypoints?: Storypoint[]; constructor(data?: StorylineInterface) { Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `Storyline`. */ public static getModelName(): string { return 'Storyline'; } /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of Storyline for dynamic purposes. */ public static factory(data: StorylineInterface): Storyline{ return new Storyline(data); } /** * @method getModelDefinition * @author Julien Ledun * @license MIT * This method returns an object that represents some of the model * definitions. */ public static getModelDefinition(): ModelDefinition { return { name: 'Storyline', plural: 'Storylines', path: 'Storylines', idName: 'id', properties: { name: { name: 'name', type: 'string' }, status: { name: 'status', type: 'string' }, storylineDate: { name: 'storylineDate', type: 'Date' }, description: { name: 'description', type: 'string' }, placeOfReference: { name: 'placeOfReference', type: 'string' }, storypointsOrder: { name: 'storypointsOrder', type: 'any' }, created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, id: { name: 'id', type: 'any' }, projectId: { name: 'projectId', type: 'any' }, customerId: { name: 'customerId', type: 'any' }, userId: { name: 'userId', type: 'string' }, principalType: { name: 'principalType', type: 'string' }, assetIds: { name: 'assetIds', type: 'Array&lt;any&gt;', default: [] }, storylineCategoryId: { name: 'storylineCategoryId', type: 'string' }, }, relations: { trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, project: { name: 'project', type: 'Project', model: 'Project', relationType: 'belongsTo', keyFrom: 'projectId', keyTo: 'id' }, customer: { name: 'customer', type: 'Customer', model: 'Customer', relationType: 'belongsTo', keyFrom: 'customerId', keyTo: 'id' }, author: { name: 'author', type: 'any', model: '', relationType: 'belongsTo', keyFrom: 'userId', keyTo: 'id' }, assets: { name: 'assets', type: 'Asset[]', model: 'Asset', relationType: 'referencesMany', keyFrom: 'assetIds', keyTo: 'id' }, storylineCategory: { name: 'storylineCategory', type: 'StorylineCategory', model: 'StorylineCategory', relationType: 'belongsTo', keyFrom: 'storylineCategoryId', keyTo: 'id' }, container: { name: 'container', type: 'any', model: '', relationType: 'hasOne', keyFrom: 'id', keyTo: 'storylineId' }, storypoints: { name: 'storypoints', type: 'Storypoint[]', model: 'Storypoint', relationType: 'hasMany', keyFrom: 'id', keyTo: 'storylineId' }, } }; } }