Create webfinger
crate #5
1 changed files with 41 additions and 0 deletions
|
@ -0,0 +1,41 @@
|
||||||
|
use diesel::{Associations, Identifiable, Insertable, Queryable, QueryableByName, Selectable};
|
||||||
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
use super::schema;
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Debug, Queryable, QueryableByName, Identifiable, Selectable, Insertable)]
|
||||||
|
#[diesel(table_name = schema::meta_aliases)]
|
||||||
|
pub struct MetaAlias {
|
||||||
|
pub id: Uuid,
|
||||||
|
pub pattern: String,
|
||||||
|
pub alias: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Queryable, QueryableByName, Identifiable, Selectable, Insertable)]
|
||||||
|
#[diesel(table_name = schema::meta_links)]
|
||||||
|
pub struct MetaLink {
|
||||||
|
pub id: Uuid,
|
||||||
|
pub pattern: String,
|
||||||
|
pub rel: String,
|
||||||
|
pub type_: Option<String>,
|
||||||
|
pub href: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Queryable, QueryableByName, Identifiable, Selectable, Insertable, Associations)]
|
||||||
|
#[diesel(belongs_to(MetaLink))]
|
||||||
|
#[diesel(table_name = schema::meta_link_properties)]
|
||||||
|
pub struct MetaLinkProperty {
|
||||||
|
pub id: Uuid,
|
||||||
|
pub meta_link_id: Uuid,
|
||||||
|
pub rel: String,
|
||||||
|
pub value: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Queryable, QueryableByName, Identifiable, Selectable, Insertable)]
|
||||||
|
#[diesel(table_name = schema::meta_properties)]
|
||||||
|
pub struct MetaProperty {
|
||||||
|
pub id: Uuid,
|
||||||
|
pub pattern: String,
|
||||||
|
pub value: Option<String>,
|
||||||
|
}
|
Loading…
Reference in a new issue