final db models wip
This commit is contained in:
		@@ -8,16 +8,6 @@ pub trait BaseModelDataOps: Sized {
 | 
			
		||||
        self
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fn set_base_created_at(mut self, time: i64) -> Self {
 | 
			
		||||
        self.get_base_data_mut().created_at = time;
 | 
			
		||||
        self
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fn set_base_modified_at(mut self, time: i64) -> Self {
 | 
			
		||||
        self.get_base_data_mut().modified_at = time;
 | 
			
		||||
        self
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fn add_base_comment(mut self, comment_id: u32) -> Self {
 | 
			
		||||
        self.get_base_data_mut().comments.push(comment_id);
 | 
			
		||||
        self
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,7 @@ pub trait Index {
 | 
			
		||||
/// // Retrieve the model with the assigned ID
 | 
			
		||||
/// let db_user = db.collection().get_by_id(user_id).expect("Failed to get user");
 | 
			
		||||
/// ```
 | 
			
		||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
 | 
			
		||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Clone, Default)]
 | 
			
		||||
pub struct BaseModelData {
 | 
			
		||||
    /// Unique incremental ID - will be auto-generated by OurDB
 | 
			
		||||
    ///
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user