mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-10-29 09:01:05 +00:00
28 lines
495 B
Rust
28 lines
495 B
Rust
|
|
use flowy_derive::ProtoBuf;
|
||
|
|
|
||
|
|
#[derive(Debug, Clone, Default, ProtoBuf)]
|
||
|
|
pub struct Revision {
|
||
|
|
#[pb(index = 1)]
|
||
|
|
pub base_rev_id: i64,
|
||
|
|
|
||
|
|
#[pb(index = 2)]
|
||
|
|
pub rev_id: i64,
|
||
|
|
|
||
|
|
#[pb(index = 3)]
|
||
|
|
pub delta: Vec<u8>,
|
||
|
|
|
||
|
|
#[pb(index = 4)]
|
||
|
|
pub md5: String,
|
||
|
|
}
|
||
|
|
|
||
|
|
impl Revision {
|
||
|
|
pub fn new(base_rev_id: i64, rev_id: i64, delta: Vec<u8>, md5: String) -> Revision {
|
||
|
|
Self {
|
||
|
|
base_rev_id,
|
||
|
|
rev_id,
|
||
|
|
delta,
|
||
|
|
md5,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|