From 0c508fcfece8b151eb54de3a1c56ec1ad22c3c2a Mon Sep 17 00:00:00 2001 From: 728 Date: Wed, 1 Nov 2023 12:29:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B=E5=A3=B0?= =?UTF-8?q?=E6=98=8E=20#45?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 4 ++-- typ.ts | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 typ.ts 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"][], // 编辑 +}