mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-06-07 16:09:21 +00:00
88a0d2feec
* Adding typescript generation for API. Fixes #2824 * Try to fix Ltree issue 1. * Forgot a few types. * Fixing api tests. * Removing url_serde line. * Manually deriving TS for some types.
17 lines
484 B
Rust
17 lines
484 B
Rust
use crate::newtypes::LanguageId;
|
|
#[cfg(feature = "full")]
|
|
use crate::schema::language;
|
|
use serde::{Deserialize, Serialize};
|
|
#[cfg(feature = "full")]
|
|
use ts_rs::TS;
|
|
|
|
#[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
|
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable, TS))]
|
|
#[cfg_attr(feature = "full", diesel(table_name = language))]
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
pub struct Language {
|
|
pub id: LanguageId,
|
|
pub code: String,
|
|
pub name: String,
|
|
}
|