mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-28 07:11:20 +00:00
23 lines
641 B
Rust
23 lines
641 B
Rust
|
use crate::newtypes::InstanceId;
|
||
|
use std::fmt::Debug;
|
||
|
|
||
|
#[cfg(feature = "full")]
|
||
|
use crate::schema::instance;
|
||
|
|
||
|
#[derive(PartialEq, Eq, Debug)]
|
||
|
#[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
|
||
|
#[cfg_attr(feature = "full", diesel(table_name = instance))]
|
||
|
pub struct Instance {
|
||
|
pub id: InstanceId,
|
||
|
pub domain: String,
|
||
|
pub published: chrono::NaiveDateTime,
|
||
|
pub updated: Option<chrono::NaiveDateTime>,
|
||
|
}
|
||
|
|
||
|
#[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
|
||
|
#[cfg_attr(feature = "full", diesel(table_name = instance))]
|
||
|
pub struct InstanceForm {
|
||
|
pub domain: String,
|
||
|
pub updated: Option<chrono::NaiveDateTime>,
|
||
|
}
|