Full split of lang.rs
This commit is contained in:
1 parent
22b455a640
commit
c67663141f
17 files changed
+81
-78
No files matched your search
@@ -0,0 +1,42 @@
|
||||
use std::collections::HashMap;
|
||||
use chrono::{DateTime, Utc};
|
||||
use crate::core::srs::WordOpenMode;
|
||||
use crate::data::{Id, INVALID_ID};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct WordData {
|
||||
pub id: Id,
|
||||
pub key: String,
|
||||
pub value: String,
|
||||
pub tags: String,
|
||||
pub additional: HashMap<String, String>,
|
||||
pub group_id: Id,
|
||||
}
|
||||
#[derive(Clone)]
|
||||
pub struct WordGroup {
|
||||
pub id: Id,
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
|
||||
impl WordData {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
id: INVALID_ID,
|
||||
key: String::new(),
|
||||
value: String::new(),
|
||||
tags: String::new(),
|
||||
additional: Default::default(),
|
||||
group_id: 1.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct HistoryItem {
|
||||
pub timestamp: DateTime<Utc>,
|
||||
pub word_id: Id,
|
||||
pub mode: WordOpenMode,
|
||||
pub before: u8,
|
||||
pub after: u8,
|
||||
}
|
||||
Reference in new issue
Block a user