diff --git a/src/entities/mod.rs b/src/entities/mod.rs index 9ce32bd..29b4e8f 100644 --- a/src/entities/mod.rs +++ b/src/entities/mod.rs @@ -1,3 +1,5 @@ +use std::fmt::Display; + use chrono::{ NaiveDate, NaiveDateTime }; use reactive_stores::Store; @@ -226,3 +228,19 @@ impl Name { 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 => "Общий", + }) + } +}