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/sheet.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/sheet.rs')
| -rw-r--r-- | crates/vcs_data/src/data/sheet.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/vcs_data/src/data/sheet.rs b/crates/vcs_data/src/data/sheet.rs index 0a52e26..64b1985 100644 --- a/crates/vcs_data/src/data/sheet.rs +++ b/crates/vcs_data/src/data/sheet.rs @@ -33,21 +33,27 @@ pub struct Sheet<'a> { #[derive(Default, Serialize, Deserialize, ConfigFile, Clone)] pub struct SheetData { /// The write count of the current sheet + #[serde(rename = "v")] pub(crate) write_count: i32, /// The holder of the current sheet, who has full operation rights to the sheet mapping + #[serde(rename = "holder")] pub(crate) holder: Option<MemberId>, /// Mapping of sheet paths to virtual file IDs + #[serde(rename = "map")] pub(crate) mapping: HashMap<SheetPathBuf, SheetMappingMetadata>, /// Mapping of virtual file Ids to sheet paths + #[serde(rename = "id_map")] pub(crate) id_mapping: Option<HashMap<VirtualFileId, SheetPathBuf>>, } #[derive(Debug, Default, Serialize, Deserialize, ConfigFile, Clone, Eq, PartialEq)] pub struct SheetMappingMetadata { + #[serde(rename = "id")] pub id: VirtualFileId, + #[serde(rename = "ver")] pub version: VirtualFileVersion, } |
