从"Blog"仓库中分离出来
This commit is contained in:
11
index/src/app/class/LeaveMsg.ts
Normal file
11
index/src/app/class/LeaveMsg.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export class LeaveMsg {
|
||||
id: number;
|
||||
type: number;
|
||||
authorName: string;
|
||||
authorAvatarImgUrl: string;
|
||||
content: string;
|
||||
date: string;
|
||||
pid: number;
|
||||
responseId: string;
|
||||
child: LeaveMsg[];
|
||||
}
|
||||
19
index/src/app/class/article.ts
Normal file
19
index/src/app/class/article.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
export class Article {
|
||||
id: number;
|
||||
title: string;
|
||||
summary: string;
|
||||
mdContent?: string;
|
||||
original?: boolean;
|
||||
url?: string;
|
||||
publishDateFormat?: string;
|
||||
updateDateFormat?: string;
|
||||
category?: string;
|
||||
tags?: string[];
|
||||
authorName?: string;
|
||||
preArticleId?: number;
|
||||
nextArticleId?: number;
|
||||
preArticleTitle?: string;
|
||||
nextArticleTitle?: string;
|
||||
readingNumber?: number;
|
||||
open?: string;
|
||||
}
|
||||
14
index/src/app/class/articleReq.ts
Normal file
14
index/src/app/class/articleReq.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export class ArticleReq {
|
||||
category: string;
|
||||
id?: number;
|
||||
mdContent: string;
|
||||
open: boolean;
|
||||
tags: string;
|
||||
title: string;
|
||||
type: boolean;
|
||||
url?: string;
|
||||
|
||||
constructor() {
|
||||
this.type = true;
|
||||
}
|
||||
}
|
||||
6
index/src/app/class/category.ts
Normal file
6
index/src/app/class/category.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export class Category {
|
||||
id: number;
|
||||
name: string;
|
||||
articles: string;
|
||||
size?: number;
|
||||
}
|
||||
18
index/src/app/class/commentReq.ts
Normal file
18
index/src/app/class/commentReq.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export class CommentReq {
|
||||
articleID: number;
|
||||
comment: boolean;
|
||||
content: string;
|
||||
id: number;
|
||||
pid: number;
|
||||
responseId: string;
|
||||
|
||||
constructor(comment: boolean) {
|
||||
this.comment = comment;
|
||||
this.responseId = '';
|
||||
if (!comment) {
|
||||
this.articleID = -1;
|
||||
}
|
||||
this.pid = -1;
|
||||
this.id = null;
|
||||
}
|
||||
}
|
||||
7
index/src/app/class/count.ts
Normal file
7
index/src/app/class/count.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export class Count {
|
||||
visitorCount: number = 0;
|
||||
leaveMsgCount: number = 0;
|
||||
tagCount: number = 0;
|
||||
articleCount: number = 0;
|
||||
commentCount: number = 0;
|
||||
}
|
||||
6
index/src/app/class/data.ts
Normal file
6
index/src/app/class/data.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export class Data {
|
||||
code: number;
|
||||
msg: string;
|
||||
result: any;
|
||||
date: number;
|
||||
}
|
||||
30
index/src/app/class/editor-config.ts
Normal file
30
index/src/app/class/editor-config.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import {environment} from '../../environments/environment';
|
||||
|
||||
export class EditorConfig {
|
||||
public width = '100%';
|
||||
public height = '400';
|
||||
public path = 'assets/editor.md/lib/';
|
||||
public codeFold: true;
|
||||
public searchReplace = true;
|
||||
public toolbar = true;
|
||||
public placeholder = '欢迎来到小海的创作中心';
|
||||
public emoji = true;
|
||||
public taskList = true;
|
||||
public tex = true;
|
||||
public readOnly = false;
|
||||
public tocm = true;
|
||||
public watch = true;
|
||||
public previewCodeHighlight = true;
|
||||
public saveHTMLToTextarea = true;
|
||||
public markdown = '';
|
||||
public flowChart = true;
|
||||
public syncScrolling = true;
|
||||
public sequenceDiagram = true;
|
||||
public imageUpload = true;
|
||||
public imageFormats = ['jpg', 'jpeg', 'gif', 'png', 'bmp', 'webp'];
|
||||
public imageUploadURL = environment.host + '/imgUpload';
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
}
|
||||
5
index/src/app/class/loginReq.ts
Normal file
5
index/src/app/class/loginReq.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export class LoginReq {
|
||||
email: string;
|
||||
password: string;
|
||||
isRememberMe: boolean = false;
|
||||
}
|
||||
20
index/src/app/class/page.ts
Normal file
20
index/src/app/class/page.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export class Page<T> {
|
||||
total: number;
|
||||
list: T[];
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
size: number;
|
||||
startRow: number;
|
||||
endRow: number;
|
||||
pages: number;
|
||||
prePage: number;
|
||||
nextPage: number;
|
||||
isFirstPage: boolean;
|
||||
isLastPage: boolean;
|
||||
hasPreviousPage: boolean;
|
||||
hasNextPage: boolean;
|
||||
navigatePages: number;
|
||||
navigatepageNums: number[];
|
||||
navigateFirstPage: number;
|
||||
navigateLastPage: number;
|
||||
}
|
||||
6
index/src/app/class/tag.ts
Normal file
6
index/src/app/class/tag.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export class Tag {
|
||||
id?: number;
|
||||
name: string;
|
||||
articles?: string;
|
||||
size: number;
|
||||
}
|
||||
5
index/src/app/class/updateInfo.ts
Normal file
5
index/src/app/class/updateInfo.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export class UpdateInfo {
|
||||
id: number;
|
||||
info: string;
|
||||
time: string;
|
||||
}
|
||||
9
index/src/app/class/user.ts
Normal file
9
index/src/app/class/user.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class User {
|
||||
id: number;
|
||||
email: string;
|
||||
displayName: string;
|
||||
emailStatus: boolean;
|
||||
avatarImgUrl: string;
|
||||
desc: string;
|
||||
role: string;
|
||||
}
|
||||
Reference in New Issue
Block a user