Skip to content

Commit 2d8f3bc

Browse files
committed
implemented the milestone
1 parent 89671b3 commit 2d8f3bc

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

contract/src/lib.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,32 @@ pub enum ContractError {
277277
pub enum SessionStatus {
278278
Created,
279279
Locked,
280+
MilestoneInProgress,
280281
Completed,
281282
Approved,
282283
Refunded,
283284
Disputed,
284285
Resolved,
286+
CompletedWithDispute,
285287
Archived,
286288
}
287289

290+
#[derive(Clone, Debug, Eq, PartialEq)]
291+
pub struct Milestone {
292+
pub description: String,
293+
pub percentage: u8,
294+
pub released: bool,
295+
pub completed_at: Option<u64>,
296+
}
297+
298+
#[derive(Clone, Debug, Eq, PartialEq)]
299+
pub struct Rating {
300+
pub buyer_rating: Option<u8>, // 1-5
301+
pub seller_rating: Option<u8>, // 1-5
302+
pub buyer_comment: Option<String>,
303+
pub seller_comment: Option<String>,
304+
}
305+
288306
// ---------------------------------------------------------------------------
289307
// Session struct
290308
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)