diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-01-02 23:00:39 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-01-02 23:00:39 +0800 |
| commit | ba11b73da83d5f6c66129b52cff7a45d8994a6a0 (patch) | |
| tree | 9b81d605e8732cbe07e54858020c6c1bbfd84034 /crates/vcs_data/src/data/local/latest_info.rs | |
| parent | e982cd090efc8786f32818cfd26b2c07dd801930 (diff) | |
Rename vault admin to host and add serde renames
- Rename `vault_admin_list` to `vault_host_list` in config and actions
- Add `#[serde(rename)]` attributes to all data structures for shorter
JSON keys
- Update field renames in LocalConfig, LatestFileData, LatestInfo,
LocalSheetData, Member, SheetData, Share, and VirtualFileMeta
Diffstat (limited to 'crates/vcs_data/src/data/local/latest_info.rs')
| -rw-r--r-- | crates/vcs_data/src/data/local/latest_info.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/vcs_data/src/data/local/latest_info.rs b/crates/vcs_data/src/data/local/latest_info.rs index a2456fc..e11836b 100644 --- a/crates/vcs_data/src/data/local/latest_info.rs +++ b/crates/vcs_data/src/data/local/latest_info.rs @@ -30,31 +30,39 @@ pub struct LatestInfo { // Sheets /// Visible sheets, /// indicating which sheets I can edit + #[serde(rename = "my")] pub visible_sheets: Vec<SheetName>, /// Invisible sheets, /// indicating which sheets I can export files to (these sheets are not readable to me) + #[serde(rename = "others")] pub invisible_sheets: Vec<SheetInfo>, /// Reference sheets, /// indicating sheets owned by the host, visible to everyone, /// but only the host can modify or add mappings within them + #[serde(rename = "refsheets")] pub reference_sheets: HashSet<SheetName>, /// Reference sheet data, indicating what files I can get from the reference sheet + #[serde(rename = "ref")] pub ref_sheet_content: SheetData, /// Reverse mapping from virtual file IDs to actual paths in reference sheets + #[serde(rename = "ref_vfs")] pub ref_sheet_vfs_mapping: HashMap<VirtualFileId, SheetPathBuf>, /// Shares in my sheets, indicating which external merge requests have entries that I can view + #[serde(rename = "shares")] pub shares_in_my_sheets: HashMap<SheetName, HashMap<SheetShareId, Share>>, /// Update instant + #[serde(rename = "update")] pub update_instant: Option<SystemTime>, // Members /// All member information of the vault, allowing me to contact them more conveniently + #[serde(rename = "members")] pub vault_members: Vec<Member>, } @@ -67,6 +75,9 @@ impl LatestInfo { #[derive(Default, Serialize, Deserialize)] pub struct SheetInfo { + #[serde(rename = "name")] pub sheet_name: SheetName, + + #[serde(rename = "holder")] pub holder_name: Option<MemberId>, } |
