aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/database_models.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-25 17:05:03 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-25 17:05:03 -0700
commit92d297ffc895f471a5061250bdd49b71e50a95ab (patch)
tree4f232bf398e53cf2db3aef0dac4c4146390c848a /rust/src/database_models.rs
parent8e92be6e1e9396f4920c0f947337e1be643e1994 (diff)
downloadfatcat-92d297ffc895f471a5061250bdd49b71e50a95ab.tar.gz
fatcat-92d297ffc895f471a5061250bdd49b71e50a95ab.zip
refs and contribs
Diffstat (limited to 'rust/src/database_models.rs')
-rw-r--r--rust/src/database_models.rs46
1 files changed, 33 insertions, 13 deletions
diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs
index 5e4e9710..44b57f85 100644
--- a/rust/src/database_models.rs
+++ b/rust/src/database_models.rs
@@ -150,29 +150,49 @@ entity_structs!("work_edit", WorkEditRow, "work_ident", WorkIdentRow);
#[derive(Debug, Queryable, Identifiable, Associations, AsChangeset)]
#[table_name = "release_contrib"]
pub struct ReleaseContribRow {
- id: i64,
- release_rev: i64,
- creator_ident_id: Option<Uuid>,
- stub: Option<String>,
- contrib_type: Option<String>,
+ pub id: i64,
+ pub release_rev: i64,
+ pub creator_ident_id: Option<Uuid>,
+ pub stub: Option<String>,
+ // XXX: pub index: Option<i64>,
+ pub contrib_type: Option<String>,
+}
+
+#[derive(Debug, Insertable)]
+#[table_name = "release_contrib"]
+pub struct ReleaseContribNewRow {
+ pub release_rev: i64,
+ pub creator_ident_id: Option<Uuid>,
+ pub stub: Option<String>,
+ // XXX: pub index: Option<i64>,
+ pub contrib_type: Option<String>,
}
#[derive(Debug, Queryable, Identifiable, Associations, AsChangeset)]
#[table_name = "release_ref"]
pub struct ReleaseRefRow {
- id: i64,
- release_rev: i64,
- target_release_ident_id: Option<Uuid>,
- index: Option<i64>,
- stub: Option<String>,
+ pub id: i64,
+ pub release_rev: i64,
+ pub target_release_ident_id: Option<Uuid>,
+ pub index: Option<i64>,
+ pub stub: Option<String>,
+}
+
+#[derive(Debug, Insertable, AsChangeset)]
+#[table_name = "release_ref"]
+pub struct ReleaseRefNewRow {
+ pub release_rev: i64,
+ pub target_release_ident_id: Option<Uuid>,
+ pub index: Option<i64>,
+ pub stub: Option<String>,
}
#[derive(Debug, Queryable, Identifiable, Associations, AsChangeset)]
#[table_name = "file_release"]
pub struct FileReleaseRow {
- id: i64,
- file_rev: i64,
- target_release_ident_id: Uuid,
+ pub id: i64,
+ pub file_rev: i64,
+ pub target_release_ident_id: Uuid,
}
#[derive(Debug, Queryable, Identifiable, Associations, AsChangeset)]