1 use crate::newtypes::InstanceId;
2 #[cfg(feature = "full")]
3 use crate::schema::instance;
4 use serde::{Deserialize, Serialize};
6 use typed_builder::TypedBuilder;
8 #[derive(Clone, PartialEq, Eq, Debug, Serialize, Deserialize)]
9 #[cfg_attr(feature = "full", derive(Queryable, Identifiable))]
10 #[cfg_attr(feature = "full", diesel(table_name = instance))]
14 pub published: chrono::NaiveDateTime,
15 pub updated: Option<chrono::NaiveDateTime>,
16 pub software: Option<String>,
17 pub version: Option<String>,
20 #[derive(Clone, TypedBuilder)]
21 #[builder(field_defaults(default))]
22 #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
23 #[cfg_attr(feature = "full", diesel(table_name = instance))]
24 pub struct InstanceForm {
27 pub software: Option<String>,
28 pub version: Option<String>,
29 pub updated: Option<chrono::NaiveDateTime>,