-
Notifications
You must be signed in to change notification settings - Fork 52
/
store.d.ts
218 lines (156 loc) · 3.1 KB
/
store.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
declare namespace StoreState {
export type State = 0 | 1 | 2 | 3 | string
// 公用
interface Common {
/** 唯一标识 */
readonly _id?: string,
/** 发布日期 */
readonly create_at?: Date,
/** 修改日期 */
readonly update_at?: Date,
/** 删除中... */
deleteing?: boolean
}
// 评论产生
interface Author {
name: string,
email?: string,
site?: string
}
// 登录
export interface Login {
/** 用户名 */
username: string,
/** 密码 */
password: string
}
// 用户数据
export interface User {
/** 唯一标识 */
readonly _id: string,
/** 名称 */
name: string,
/** 用户名 */
username: string,
/** 密码 */
password?: string,
/** 老密码 */
oldPassword: string,
/** 新密码 */
newPassword: string,
/** 用户签名 */
slogan: string,
/** 头像 */
gravatar: string
}
// 网站信息
export interface Option {
/** 唯一标识 */
readonly _id: string,
/** 网站标题 */
title: string,
/** 副标题 */
sub_title: string,
/** 关键字 */
keyword: string,
/** 描述 */
descript: string,
/** 地址 */
url: string,
/** email */
email: string,
/** 备案号 */
icp: string
}
// 标签
export interface Tag extends Common {
/** 名称 */
name: string,
/** 描述 */
descript: string,
/** 排序 */
sort?: number,
/** 文章数量 */
count?: number
}
// 英雄版(留言墙)
export interface Hero extends Common {
/** 名称 */
name: string,
/** 内容 */
content: string,
/** 状态 */
state: State,
/** ip */
ip: string,
/** 用户位置 */
city: String,
range: String,
country: String
}
// 评论
export interface Comment extends Common {
name?: string
/** 评论文章所在 id */
post_id?: string,
/** 父级 id */
pid?: string,
/** 内容 */
content?: string,
/** 被赞数 */
likes?: number,
/** ip */
ip?: string,
/** 用户位置 */
city?: String,
range?: String,
country?: String,
/** 用户 UA */
agent?: string,
/** 评论产生 */
author?: Author,
/** 评论状态 */
state?: State
}
// 文章
export interface Article extends Common {
/** 标题 */
title: string,
/** 关键字 */
keyword: string,
/** 描述 */
descript: string,
/** 内容 */
content?: string,
/** 状态 */
state: State,
/** 公开状态 */
publish: State,
/** 类别 */
type: State,
/** 缩略图 */
thumb: string,
/** 其他 */
[propName: string]: any
}
// 书本
export interface Book extends Common {
/** 名称 */
name: string,
/** 描述 */
descript: string,
/** 缩略图 */
thumb: string,
/** 状态 */
state?: State
}
// 书本
export interface Link extends Common {
/** 名称 */
name: string,
/** 描述 */
url: string,
/** 状态 */
state?: State
}
}