From f7c1d9f49854f616e335c8a904e709624a51b0b3 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 8 May 2019 23:41:38 -0700 Subject: basic impl of new SQL schema in rust code (not wired to API) --- rust/src/database_models.rs | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) (limited to 'rust/src/database_models.rs') diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs index adb38bda..e7918ec5 100644 --- a/rust/src/database_models.rs +++ b/rust/src/database_models.rs @@ -161,10 +161,10 @@ pub struct CreatorRevRow { pub id: Uuid, pub extra_json: Option, pub display_name: String, - pub given_name: Option, - pub surname: Option, pub orcid: Option, pub wikidata_qid: Option, + pub given_name: Option, + pub surname: Option, } #[derive(Debug, Associations, AsChangeset, Insertable)] @@ -172,10 +172,10 @@ pub struct CreatorRevRow { pub struct CreatorRevNewRow { pub extra_json: Option, pub display_name: String, - pub given_name: Option, - pub surname: Option, pub orcid: Option, pub wikidata_qid: Option, + pub given_name: Option, + pub surname: Option, } entity_structs!( @@ -311,6 +311,8 @@ pub struct WebcaptureRevCdxRow { pub status_code: Option, pub sha1: String, pub sha256: Option, + pub size_bytes: Option, + pub extra_json: Option, } #[derive(Debug, Queryable, Associations, AsChangeset, Insertable)] @@ -324,6 +326,8 @@ pub struct WebcaptureRevCdxNewRow { pub status_code: Option, pub sha1: String, pub sha256: Option, + pub size_bytes: Option, + pub extra_json: Option, } #[derive(Debug, Queryable, Identifiable, Associations, AsChangeset)] @@ -380,7 +384,7 @@ pub struct ReleaseRevRow { pub title: String, pub original_title: Option, pub release_type: Option, - pub release_status: Option, + pub release_stage: Option, pub release_date: Option, pub release_year: Option, pub doi: Option, @@ -397,6 +401,14 @@ pub struct ReleaseRevRow { pub publisher: Option, pub language: Option, pub license_slug: Option, + pub number: Option, + pub version: Option, + pub subtitle: Option, + pub withdrawn_state: Option, + pub withdrawn_date: Option, + pub withdrawn_year: Option, + pub mag_id: Option, + pub ark_id: Option, } #[derive(Debug, Associations, AsChangeset, Insertable)] @@ -409,7 +421,7 @@ pub struct ReleaseRevNewRow { pub title: String, pub original_title: Option, pub release_type: Option, - pub release_status: Option, + pub release_stage: Option, pub release_date: Option, pub release_year: Option, pub doi: Option, @@ -426,6 +438,14 @@ pub struct ReleaseRevNewRow { pub publisher: Option, pub language: Option, pub license_slug: Option, + pub number: Option, + pub version: Option, + pub subtitle: Option, + pub withdrawn_state: Option, + pub withdrawn_date: Option, + pub withdrawn_year: Option, + pub mag_id: Option, + pub ark_id: Option, } entity_structs!( @@ -489,6 +509,8 @@ pub struct ReleaseContribRow { pub raw_affiliation: Option, pub index_val: Option, pub extra_json: Option, + pub given_name: Option, + pub surname: Option, } #[derive(Debug, Insertable)] @@ -501,6 +523,8 @@ pub struct ReleaseContribNewRow { pub raw_affiliation: Option, pub index_val: Option, pub extra_json: Option, + pub given_name: Option, + pub surname: Option, } #[derive(Debug, Queryable, Insertable, Associations, AsChangeset)] -- cgit v1.2.3