diff --git a/readme.md b/readme.md index 931c203..ef7772a 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# 【从零开发】主义主义网站 系列视频 +# 【从零开发】主义主义网站 -[视频列表](https://space.bilibili.com/483417795/video) +## [系列视频](https://space.bilibili.com/483417795/video) diff --git a/typ.ts b/typ.ts new file mode 100644 index 0000000..eb7e058 --- /dev/null +++ b/typ.ts @@ -0,0 +1,55 @@ +export type Id = { + _id: number, + utc: number, + nam: string, + adm1: string, + adm2: string, + msg: string, +} + +export type Usr = Id & { + nbr?: string, + sms?: { code: number, utc: number }, + jwt?: string, +} +export type Soc = Id & { + sec: Usr["_id"][], + agr: { msg: string, utc: number }, +} +export type Agd = Id & { + soc: Soc["_id"], +} + +export type Rec = { + _id: { usr: Usr["_id"], soc: Soc["_id"], utc: number }, + msg: string, + amt: number, + sec?: Usr["_id"], +} +export type Cdt = Rec & { + utc: { eft: number, exp: number, agr: number }, + aug?: { msg: string, amt: number, utc: number, sec: Usr["_id"] }[], +} +export type Dbt = Rec & { + rev?: { msg: string, rev: 1 | 2 | 3 | 4 | 5, utc: number }, +} +export type Ern = Rec + +export type Msg = { + _id: number, + nam: string, + utc: { pre: number, put: number }, + usr: Usr["_id"], + msg: string, + pin?: true, +} +export type Wsl = Msg +export type Lit = Msg + +export type Aut = { + _id: 1, + sup: Usr["_id"][], // super supreme 超级用户 + aut: Usr["_id"][], // author 管理员 + wsl: Usr["_id"][], // 编辑 + lit: Usr["_id"][], // 编辑 +}