From 0ec7c973417f5d120db80d1c1dd3e329711a1ca4 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 4 Jun 2018 00:19:36 -0700 Subject: update rust/api for schema extensions --- rust/src/database_models.rs | 28 ++++++++++++++++++++++------ 1 file changed, 22 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 b62492ab..2d72795e 100644 --- a/rust/src/database_models.rs +++ b/rust/src/database_models.rs @@ -111,7 +111,9 @@ entity_structs!( pub struct CreatorRevRow { pub id: i64, pub extra_json: Option, - pub full_name: String, + pub display_name: String, + pub given_name: Option, + pub surname: Option, pub orcid: Option, } @@ -129,8 +131,10 @@ pub struct FileRevRow { pub extra_json: Option, pub size: Option, pub sha1: Option, + pub sha256: Option, pub md5: Option, pub url: Option, + pub mimetype: Option, } entity_structs!("file_edit", FileEditRow, "file_ident", FileIdentRow); @@ -144,13 +148,15 @@ pub struct ReleaseRevRow { pub container_ident_id: Option, pub title: String, pub release_type: Option, - pub date: Option, + pub release_status: Option, + pub release_date: Option, pub doi: Option, pub isbn13: Option, pub volume: Option, pub pages: Option, pub issue: Option, pub publisher: Option, + pub language: Option, } entity_structs!( @@ -179,7 +185,7 @@ pub struct ReleaseContribRow { pub creator_ident_id: Option, pub role: Option, pub index: Option, - pub stub: Option, + pub raw: Option, } #[derive(Debug, Insertable)] @@ -189,7 +195,7 @@ pub struct ReleaseContribNewRow { pub creator_ident_id: Option, pub role: Option, pub index: Option, - pub stub: Option, + pub raw: Option, } #[derive(Debug, Queryable, Identifiable, Associations, AsChangeset)] @@ -199,7 +205,12 @@ pub struct ReleaseRefRow { pub release_rev: i64, pub target_release_ident_id: Option, pub index: Option, - pub stub: Option, + pub key: Option, + pub raw: Option, + pub container_title: Option, + pub year: Option, + pub title: Option, + pub locator: Option, } #[derive(Debug, Insertable, AsChangeset)] @@ -208,7 +219,12 @@ pub struct ReleaseRefNewRow { pub release_rev: i64, pub target_release_ident_id: Option, pub index: Option, - pub stub: Option, + pub key: Option, + pub raw: Option, + pub container_title: Option, + pub year: Option, + pub title: Option, + pub locator: Option, } #[derive(Debug, Queryable, Insertable, Associations, AsChangeset)] -- cgit v1.2.3