├── .gitignore ├── Cargo.lock ├── Cargo.toml └── src ├── dto ├── mod.rs └── user.rs └── main.rs /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | target -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "floatbot" 7 | version = "0.1.0" 8 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "floatbot" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /src/dto/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod user; -------------------------------------------------------------------------------- /src/dto/user.rs: -------------------------------------------------------------------------------- 1 | /// 用户对象 2 | #[derive(Debug)] 3 | pub struct User { 4 | /// 用户 id 5 | pub id: String, 6 | 7 | /// 用户名 8 | pub username: String, 9 | 10 | /// 用户头像地址 11 | pub avatar: String, 12 | 13 | /// 是否是机器人 14 | pub bot: bool, 15 | 16 | /// 特殊关联应用的 openid, 17 | /// 需要特殊申请并配置后才会返回。 18 | /// 如需申请,请联系平台运营人员。 19 | pub union_openid: String, 20 | 21 | /// 机器人关联的互联应用的用户信息, 22 | /// 与union_openid关联的应用是同一个。 23 | /// 如需申请,请联系平台运营人员。 24 | pub union_user_account: String, 25 | } 26 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | pub mod dto; 2 | 3 | fn main() { 4 | } 5 | --------------------------------------------------------------------------------