Exam base
This commit is contained in:
1 parent
6628d79307
commit
4b9e257cdf
12 files changed
+183
-17
No files matched your search
@@ -216,6 +216,40 @@ impl EntityData for CustomField {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct Exam {
|
||||
pub id: Id,
|
||||
pub timestamp: DateTime<Utc>,
|
||||
pub deck_id: Id,
|
||||
}
|
||||
|
||||
impl EntityData for Exam {
|
||||
fn id(&self) -> Id {
|
||||
self.id
|
||||
}
|
||||
fn set_id(&mut self, id: Id) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct ExamEntry{
|
||||
pub id: Id,
|
||||
pub exam_id: Id,
|
||||
pub word_id: Id,
|
||||
pub status: Option<bool>
|
||||
}
|
||||
|
||||
impl EntityData for ExamEntry {
|
||||
fn id(&self) -> Id {
|
||||
self.id
|
||||
}
|
||||
|
||||
fn set_id(&mut self, id: Id) {
|
||||
self.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EntityHandle<E> {
|
||||
pub(crate) id: Id,
|
||||
index: u32,
|
||||
|
||||
Reference in new issue
Block a user