migrate new model
This commit is contained in:
1 parent
5dae704649
commit
e2e17eef96
19 files changed
+202
-108
No files matched your search
@@ -1,2 +1,2 @@
|
||||
export * from '../service/models';
|
||||
export * from '../service/operator';
|
||||
export * from './models';
|
||||
export * from './operator';
|
||||
@@ -1,3 +1,4 @@
|
||||
import { IDocument } from '../document';
|
||||
import { IService } from '../service';
|
||||
|
||||
export interface IForm {
|
||||
@@ -47,15 +48,18 @@ export interface IApi {
|
||||
id: string;
|
||||
path: string;
|
||||
endpoint: string;
|
||||
alias: string;
|
||||
price?: number;
|
||||
title?: string;
|
||||
introduction?: string;
|
||||
apply_count?: number;
|
||||
free_count?: number;
|
||||
tags?: string[];
|
||||
request: IRequest;
|
||||
request_id: string;
|
||||
responses: IResponse[];
|
||||
response_ids: string[];
|
||||
is_free?: boolean;
|
||||
document?: IDocument;
|
||||
document_id?: string;
|
||||
service?: IService;
|
||||
service_id?: string;
|
||||
created_at?: string;
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
import { IService } from '../service';
|
||||
import { IApi } from '../api';
|
||||
|
||||
export enum IApplicationType {
|
||||
API = 'Api',
|
||||
PROXY = 'Proxy'
|
||||
}
|
||||
|
||||
export interface IApplication {
|
||||
id?: string;
|
||||
service?: IService;
|
||||
service_id?: string;
|
||||
api?: IApi;
|
||||
type?: IApplicationType;
|
||||
api_id?: string;
|
||||
proxy_id?: string;
|
||||
api_key?: string;
|
||||
user_id?: string;
|
||||
remaining_count?: number;
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import { IApi } from '../api/models';
|
||||
|
||||
export enum IDocumentType {
|
||||
API = 'Api',
|
||||
TEXT = 'Text'
|
||||
}
|
||||
|
||||
export interface IDocument {
|
||||
id?: string;
|
||||
name?: string;
|
||||
type: 'API' | 'TEXT';
|
||||
type: IDocumentType;
|
||||
title?: string;
|
||||
content?: string;
|
||||
rank?: number;
|
||||
|
||||
@@ -3,12 +3,10 @@ import { IApi } from '../api/models';
|
||||
export interface IService {
|
||||
id: string;
|
||||
title: string;
|
||||
price?: number;
|
||||
description?: string;
|
||||
tags?: string[];
|
||||
thumbnail?: string;
|
||||
icon?: string;
|
||||
price?: number;
|
||||
applied_count?: number;
|
||||
introduction?: string;
|
||||
api_ids?: string[];
|
||||
apis?: IApi[];
|
||||
|
||||
Reference in new issue
Block a user