2022-08-18 19:11:19 +00:00
|
|
|
use crate::newtypes::LanguageId;
|
|
|
|
#[cfg(feature = "full")]
|
|
|
|
use crate::schema::language;
|
2022-11-02 19:18:22 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
2023-04-26 04:26:10 +00:00
|
|
|
#[cfg(feature = "full")]
|
|
|
|
use ts_rs::TS;
|
2022-08-18 19:11:19 +00:00
|
|
|
|
2022-09-26 14:09:32 +00:00
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
2023-04-26 04:26:10 +00:00
|
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
2022-09-26 14:09:32 +00:00
|
|
|
#[cfg_attr(feature = "full", diesel(table_name = language))]
|
2023-04-26 04:26:10 +00:00
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
2022-08-18 19:11:19 +00:00
|
|
|
pub struct Language {
|
|
|
|
pub id: LanguageId,
|
|
|
|
pub code: String,
|
|
|
|
pub name: String,
|
|
|
|
}
|