diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-14 18:43:07 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-14 18:43:07 -0700 |
commit | 8a130e1000a2b49cbfb571ae0b74f0ec8577e9fe (patch) | |
tree | 197618e5b1f03bb292d5b32321d52932f72306c4 /rust/src/database_models.rs | |
parent | 534cd7b3fa0a4cb0c19da05f740942b93e8b3659 (diff) | |
download | fatcat-8a130e1000a2b49cbfb571ae0b74f0ec8577e9fe.tar.gz fatcat-8a130e1000a2b49cbfb571ae0b74f0ec8577e9fe.zip |
codegen and rust impl created timestamp
Diffstat (limited to 'rust/src/database_models.rs')
-rw-r--r-- | rust/src/database_models.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs index 34ce1de6..79b0137b 100644 --- a/rust/src/database_models.rs +++ b/rust/src/database_models.rs @@ -662,12 +662,17 @@ pub struct EditgroupRow { impl EditgroupRow { /// Returns an Editgroup API model *without* the entity edits actually populated. Useful for, /// eg, entity history queries (where we already have the entity edit we want) - pub fn into_model_partial(self, changelog_index: Option<i64>, editor: Option<Editor>) -> Editgroup { + pub fn into_model_partial( + self, + changelog_index: Option<i64>, + editor: Option<Editor>, + ) -> Editgroup { Editgroup { editgroup_id: Some(uuid2fcid(&self.id)), editor_id: Some(uuid2fcid(&self.editor_id)), editor: editor, changelog_index: changelog_index, + created: Some(chrono::DateTime::from_utc(self.created, chrono::Utc)), submitted: self .submitted .map(|v| chrono::DateTime::from_utc(v, chrono::Utc)), |