use uuid::Uuid; //use diesel::prelude::*; use database_schema::*; // Ugh. I thought the whole point was to *not* do this, but: // https://github.com/diesel-rs/diesel/issues/1589 /* table! { changelog (id) { id -> Int8, editgroup_id -> Int8, timestamp -> Nullable, } } */ #[derive(Debug, Queryable, Identifiable, Associations)] // AsChangeset #[table_name = "container_edit"] pub struct ContainerEditRow { pub id: i64, pub ident_id: Uuid, pub rev_id: Option, pub redirect_id: Option, pub editgroup_id: i64, //pub extra_json: Option, } #[derive(Debug, Queryable, Identifiable, Associations)] // AsChangeset #[table_name = "container_ident"] pub struct ContainerIdentRow { pub id: Uuid, pub is_live: bool, pub rev_id: Option, pub redirect_id: Option, } #[derive(Debug, Queryable, Identifiable, Associations)] // AsChangeset #[table_name = "container_rev"] pub struct ContainerRevRow { pub id: i64, //extra_json: Option, pub name: Option, pub parent_ident_id: Option, pub publisher: Option, pub issn: Option, } /* table! { creator_edit (id) { id -> Int8, extra_json -> Nullable, ident_id -> Uuid, rev_id -> Nullable, redirect_id -> Nullable, editgroup_id -> Int8, } } table! { creator_ident (id) { id -> Uuid, is_live -> Bool, rev_id -> Nullable, redirect_id -> Nullable, } } table! { creator_rev (id) { id -> Int8, extra_json -> Nullable, name -> Nullable, orcid -> Nullable, } } table! { editgroup (id) { id -> Int8, extra_json -> Nullable, editor_id -> Int8, description -> Nullable, } } table! { editor (id) { id -> Int8, username -> Text, is_admin -> Bool, active_editgroup_id -> Nullable, } } table! { file_edit (id) { id -> Int8, extra_json -> Nullable, ident_id -> Uuid, rev_id -> Nullable, redirect_id -> Nullable, editgroup_id -> Int8, } } table! { file_ident (id) { id -> Uuid, is_live -> Bool, rev_id -> Nullable, redirect_id -> Nullable, } } table! { file_release (id) { id -> Int8, file_rev -> Int8, target_release_ident_id -> Uuid, } } table! { file_rev (id) { id -> Int8, extra_json -> Nullable, size -> Nullable, sha1 -> Nullable, url -> Nullable, } } table! { release_contrib (id) { id -> Int8, release_rev -> Int8, creator_ident_id -> Nullable, stub -> Nullable, contrib_type -> Nullable, } } table! { release_edit (id) { id -> Int8, extra_json -> Nullable, ident_id -> Uuid, rev_id -> Nullable, redirect_id -> Nullable, editgroup_id -> Int8, } } table! { release_ident (id) { id -> Uuid, is_live -> Bool, rev_id -> Nullable, redirect_id -> Nullable, } } table! { release_ref (id) { id -> Int8, release_rev -> Int8, target_release_ident_id -> Nullable, index -> Nullable, stub -> Nullable, } } table! { release_rev (id) { id -> Int8, extra_json -> Nullable, work_ident_id -> Nullable, container_ident_id -> Nullable, title -> Nullable, license -> Nullable, release_type -> Nullable, date -> Nullable, doi -> Nullable, volume -> Nullable, pages -> Nullable, issue -> Nullable, } } table! { work_edit (id) { id -> Int8, extra_json -> Nullable, ident_id -> Uuid, rev_id -> Nullable, redirect_id -> Nullable, editgroup_id -> Int8, } } table! { work_ident (id) { id -> Uuid, is_live -> Bool, rev_id -> Nullable, redirect_id -> Nullable, } } table! { work_rev (id) { id -> Int8, extra_json -> Nullable, work_type -> Nullable, primary_release_id -> Nullable, } } */