Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format code with dotnet-format and Prettier #64

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 39 additions & 38 deletions 数据结构.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# data.db

Table: Users (结构)
| 字段名 | 类型 | 说明 | 备注 |
| 字段名 | 类型 | 说明 | 备注 |
| :---: | :---: | :---: | :---: |
| ID | int | 用户 ID | 主键,自增 |
| Name | varchar(32) | 用户名 | 唯一,非空 |
Expand All @@ -17,48 +18,48 @@ Table: AppInfo (信息)
| RegisterEncryptionKey | byte[] | 注册数据加密密钥 | 用于加密注册数据 |
| RegisterEncryptionIV | byte[] | 注册数据加密初始化向量 | 用于加密注册数据 |


# Session 信息
| 键 | 实际应用类型 | 说明 | 备注 |
| :--: | :---------: | :----: | :--: |
| Name | string | 用户名 | |
| Nick | string | 昵称 | |
| Hash | blob |密码哈希| |
| Salt | blob | 密码盐 | |

| 键 | 实际应用类型 | 说明 | 备注 |
| :--: | :----------: | :------: | :--: |
| Name | string | 用户名 | |
| Nick | string | 昵称 | |
| Hash | blob | 密码哈希 | |
| Salt | blob | 密码盐 | |

# API 代码
| Code | 说明 | Success |
| :--: | :------------------------: |:-------:|
| 0 | 成功 | true |

| Code | 说明 | Success |
| :--: | :--------------------------: | :-----: |
| 0 | 成功 | true |
| 1 | 已经完成过相应操作,视为成功 | true |
| 2 | 已经完成过相应操作,视为失败 | false |
| 3 | 不满足前置条件,如未登录 | false |
| 4 | 参数值有误 | false |
| 5 | 参数缺失或错误 | false |
| 6 | 验证失败,如密码错误 | false |
| 7 | 超出次数限制 | false |
| 8 | 未能满足复杂度或长度要求 | false |
| 9 | 已被占用 | false |
| 10 |服务器内部错误,如数据库错误 | false |

| 3 | 不满足前置条件,如未登录 | false |
| 4 | 参数值有误 | false |
| 5 | 参数缺失或错误 | false |
| 6 | 验证失败,如密码错误 | false |
| 7 | 超出次数限制 | false |
| 8 | 未能满足复杂度或长度要求 | false |
| 9 | 已被占用 | false |
| 10 | 服务器内部错误,如数据库错误 | false |

# ChatHub MessagePack
| 方向 | 命令 | 参数0 | 参数1 | 参数2 | 说明 | 完成情况 |
|:----:| :-----------: | :----------: | :---------: | :--------------------: | :-----: | :------: |
| C->S | `groupEnter` |`create join`| `<name>` |`<password (emptiable)>`| 进入群组 | C:Y S:Y |
| C->S | `groupLeave` | | | | 离开群组 | C:Y S:Y |
| C->S | `message` | `<content>` | `<echo>` | | 发送消息 | C:Y S:Y |
| S->C | `groupEnter` | `cSuccess` | | | 创建成功 | C:Y S:Y |
| S->C | `groupEnter` | `jSuccess` | | | 加入成功 | C:Y S:Y |
| S->C | `groupEnter` | `pwdError` | | | 密码错误 | C:Y S:Y |
| S->C | `groupEnter` | `eFailed` | | | 群已存在 | C:Y S:Y |
| S->C | `groupEnter` | `nFailed` | | | 群不存在 | C:Y S:Y |
| S->C | `groupEnter` | `failed` | `<message>` | | 加入失败 | C:Y S:Y |
| S->C | `groupLeave` | `success` | | | 退出成功 | C:Y S:Y |
| S->C | `groupLeave` | `failed` | `<message>` | | 退出失败 | C:Y S:Y |
| S->C |`messageOthers`| `<sender>` | `<content>` | `<time>` | 他人消息 | C:Y S:Y |
| S->C |`messageServer`| `<sender>` | `<content>` | `<time>` | 系统消息 | C:Y S:Y |
| S->C | `messageSelf` | `<time>` | `<echo>` | | 本人消息 | C:Y S:Y |
| S->C | `notice` | `<title>` | `<message>` | `<icon>` | 系统通知 | C:Y S:Y |
| S->C | `notice` |`<swalParams>`| | | 系统通知 | C:Y S:Y |

| 方向 | 命令 | 参数0 | 参数1 | 参数2 | 说明 | 完成情况 |
| :--: | :-------------: | :------------: | :---------: | :----------------------: | :------: | :------: |
| C->S | `groupEnter` | `create join` | `<name>` | `<password (emptiable)>` | 进入群组 | C:Y S:Y |
| C->S | `groupLeave` | | | | 离开群组 | C:Y S:Y |
| C->S | `message` | `<content>` | `<echo>` | | 发送消息 | C:Y S:Y |
| S->C | `groupEnter` | `cSuccess` | | | 创建成功 | C:Y S:Y |
| S->C | `groupEnter` | `jSuccess` | | | 加入成功 | C:Y S:Y |
| S->C | `groupEnter` | `pwdError` | | | 密码错误 | C:Y S:Y |
| S->C | `groupEnter` | `eFailed` | | | 群已存在 | C:Y S:Y |
| S->C | `groupEnter` | `nFailed` | | | 群不存在 | C:Y S:Y |
| S->C | `groupEnter` | `failed` | `<message>` | | 加入失败 | C:Y S:Y |
| S->C | `groupLeave` | `success` | | | 退出成功 | C:Y S:Y |
| S->C | `groupLeave` | `failed` | `<message>` | | 退出失败 | C:Y S:Y |
| S->C | `messageOthers` | `<sender>` | `<content>` | `<time>` | 他人消息 | C:Y S:Y |
| S->C | `messageServer` | `<sender>` | `<content>` | `<time>` | 系统消息 | C:Y S:Y |
| S->C | `messageSelf` | `<time>` | `<echo>` | | 本人消息 | C:Y S:Y |
| S->C | `notice` | `<title>` | `<message>` | `<icon>` | 系统通知 | C:Y S:Y |
| S->C | `notice` | `<swalParams>` | | | 系统通知 | C:Y S:Y |