33 lines
810 B
TypeScript
33 lines
810 B
TypeScript
import * as plugins from '../../plugins.ts';
|
|
import { CacheDb } from '../classes.cachedb.ts';
|
|
import { CachedDocument, TTL } from '../classes.cached.document.ts';
|
|
|
|
/**
|
|
* Cached project data from git providers. TTL: 5 minutes.
|
|
*/
|
|
@plugins.smartdata.Collection(() => CacheDb.getInstance().getDb())
|
|
export class CachedProject extends CachedDocument<CachedProject> {
|
|
@plugins.smartdata.unI()
|
|
public id: string = '';
|
|
|
|
@plugins.smartdata.svDb()
|
|
public connectionId: string = '';
|
|
|
|
@plugins.smartdata.svDb()
|
|
public projectName: string = '';
|
|
|
|
@plugins.smartdata.svDb()
|
|
public projectUrl: string = '';
|
|
|
|
@plugins.smartdata.svDb()
|
|
public description: string = '';
|
|
|
|
@plugins.smartdata.svDb()
|
|
public defaultBranch: string = '';
|
|
|
|
constructor() {
|
|
super();
|
|
this.setTTL(TTL.MINUTES_5);
|
|
}
|
|
}
|