1
Fork 0

Create webfinger crate #5

Merged
steffo merged 53 commits from feature/webfinger into main 2024-11-16 06:33:06 +00:00
Showing only changes of commit 21842d9f80 - Show all commits

View file

@ -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>,
}