InventoryKind entity definition and Display impl
This commit is contained in:
parent
8471deef8c
commit
2e742629dd
@ -1,3 +1,5 @@
|
|||||||
|
use std::fmt::Display;
|
||||||
|
|
||||||
use chrono::{ NaiveDate, NaiveDateTime };
|
use chrono::{ NaiveDate, NaiveDateTime };
|
||||||
use reactive_stores::Store;
|
use reactive_stores::Store;
|
||||||
|
|
||||||
@ -226,3 +228,19 @@ impl Name {
|
|||||||
pub struct Settings {
|
pub struct Settings {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Store)]
|
||||||
|
pub enum InventoryKind {
|
||||||
|
Personal,
|
||||||
|
Common
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Display for InventoryKind {
|
||||||
|
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
write!(f, "{}", match self {
|
||||||
|
Self::Personal => "Личный",
|
||||||
|
Self::Common => "Общий",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user