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, #[pb(index = 4)] pub md5: String, } impl Revision { pub fn new(base_rev_id: i64, rev_id: i64, delta: Vec, md5: String) -> Revision { Self { base_rev_id, rev_id, delta, md5, } } }