add: stand configs
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Models
|
||||
|
||||
This directory contains code for models provided by this app.
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './query-result.model';
|
||||
export * from './result-issue-info.model';
|
||||
@@ -0,0 +1,24 @@
|
||||
import {Model, model, property} from '@loopback/repository';
|
||||
import {ResultIssueInfo} from './result-issue-info.model';
|
||||
|
||||
@model()
|
||||
export class QueryResult extends Model {
|
||||
@property({
|
||||
type: 'number',
|
||||
})
|
||||
total_count?: number;
|
||||
|
||||
@property.array(ResultIssueInfo)
|
||||
items?: ResultIssueInfo[];
|
||||
|
||||
|
||||
constructor(data?: Partial<QueryResult>) {
|
||||
super(data);
|
||||
}
|
||||
}
|
||||
|
||||
export interface QueryResultRelations {
|
||||
// describe navigational properties here
|
||||
}
|
||||
|
||||
export type QueryResultWithRelations = QueryResult & QueryResultRelations;
|
||||
@@ -0,0 +1,35 @@
|
||||
import {Model, model, property} from '@loopback/repository';
|
||||
|
||||
@model()
|
||||
export class ResultIssueInfo extends Model {
|
||||
@property({
|
||||
type: 'string',
|
||||
})
|
||||
title?: string;
|
||||
|
||||
@property({
|
||||
type: 'string',
|
||||
})
|
||||
html_url?: string;
|
||||
|
||||
@property({
|
||||
type: 'string',
|
||||
})
|
||||
state?: string;
|
||||
|
||||
@property({
|
||||
type: 'number',
|
||||
})
|
||||
age?: number;
|
||||
|
||||
|
||||
constructor(data?: Partial<ResultIssueInfo>) {
|
||||
super(data);
|
||||
}
|
||||
}
|
||||
|
||||
export interface ResultIssueInfoRelations {
|
||||
// describe navigational properties here
|
||||
}
|
||||
|
||||
export type ResultIssueInfoWithRelations = ResultIssueInfo & ResultIssueInfoRelations;
|
||||
Reference in New Issue
Block a user