搜索结果列表页面开发
This commit is contained in:
14
src/model/SSHKey.ts
Normal file
14
src/model/SSHKey.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import type { SSHData } from '@/components/SecretKeyItem/types';
|
||||
|
||||
export class SSHKey implements SSHData {
|
||||
email: string;
|
||||
key: string;
|
||||
createdTime: string;
|
||||
expireTime: string;
|
||||
hasBeenUsed: boolean;
|
||||
authority: string;
|
||||
id: number | string;
|
||||
constructor(originData: SSHData) {
|
||||
Object.assign(this, originData);
|
||||
}
|
||||
}
|
||||
23
src/model/pager.ts
Normal file
23
src/model/pager.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export interface IPager {
|
||||
total?: number;
|
||||
pageIndex?: number;
|
||||
pageSize?: number;
|
||||
pageSizeOptions?: Array<number>;
|
||||
}
|
||||
|
||||
export class Pager implements IPager {
|
||||
total?: number;
|
||||
pageIndex: number;
|
||||
pageSize: number;
|
||||
pageSizeOptions?: Array<number>;
|
||||
|
||||
constructor(
|
||||
{
|
||||
total = 0, pageSize = 10, pageIndex = 1, pageSizeOptions = [10, 20, 30, 40, 50]
|
||||
}: IPager) {
|
||||
this.total = total;
|
||||
this.pageSize = pageSize;
|
||||
this.pageIndex = pageIndex;
|
||||
this.pageSizeOptions = pageSizeOptions;
|
||||
}
|
||||
}
|
||||
21
src/model/type/index.ts
Normal file
21
src/model/type/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export enum Visibility {
|
||||
'private' = 'private',
|
||||
'public' = 'public'
|
||||
}
|
||||
|
||||
export enum CommitStatus {
|
||||
created = '0',
|
||||
verified = '1',
|
||||
invalid = '2'
|
||||
}
|
||||
|
||||
export enum IssueStatus {
|
||||
created = '0',
|
||||
verified = '1',
|
||||
invalid = '2'
|
||||
}
|
||||
|
||||
export enum ResourceType {
|
||||
directories = 'directories',
|
||||
paths = 'paths',
|
||||
}
|
||||
Reference in New Issue
Block a user