UNPKG

@xompass/sdk-cloud-api

Version:

Xompass Client for cloud-api

120 lines (114 loc) 2.76 kB
import {ModelDefinition} from './BaseModels'; import {Log} from './Log'; import {YoloClass} from './YoloClass'; import {Project} from './Project'; declare var Object: any; export interface YoloClassProjectInterface { created?: Date; modified?: Date; deleted?: Date; id?: any; yoloClassId?: any; projectId?: any; trackingLogs?: Log[]; yoloClass?: YoloClass; project?: Project; } export class YoloClassProject implements YoloClassProjectInterface { created: Date; modified: Date; deleted: Date; id: any; yoloClassId: any; projectId: any; trackingLogs?: Log[]; yoloClass?: YoloClass; project?: Project; constructor(data?: YoloClassProjectInterface) { Object.assign(this, data); } /** * The name of the model represented by this $resource, * i.e. `YoloClassProject`. */ public static getModelName(): string { return 'YoloClassProject'; } /** * @method factory * @author Jonathan Casarrubias * @license MIT * This method creates an instance of YoloClassProject for dynamic purposes. */ public static factory(data: YoloClassProjectInterface): YoloClassProject{ return new YoloClassProject(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: 'YoloClassProject', plural: 'YoloClassProjects', path: 'YoloClassProjects', idName: 'id', properties: { created: { name: 'created', type: 'Date' }, modified: { name: 'modified', type: 'Date' }, deleted: { name: 'deleted', type: 'Date', default: undefined }, id: { name: 'id', type: 'any' }, yoloClassId: { name: 'yoloClassId', type: 'any' }, projectId: { name: 'projectId', type: 'any' }, }, relations: { trackingLogs: { name: 'trackingLogs', type: 'Log[]', model: 'Log', relationType: 'hasMany', keyFrom: 'id', keyTo: 'trackingModelId' }, yoloClass: { name: 'yoloClass', type: 'YoloClass', model: 'YoloClass', relationType: 'belongsTo', keyFrom: 'yoloClassId', keyTo: 'id' }, project: { name: 'project', type: 'Project', model: 'Project', relationType: 'belongsTo', keyFrom: 'projectId', keyTo: 'id' }, } }; } }