Creates a new reply comment
(content: String, author_id: String, parent_comment_id: String)
| 129 | |
| 130 | /// Creates a new reply comment |
| 131 | pub fn new_reply(content: String, author_id: String, parent_comment_id: String) -> Self { |
| 132 | let now = timestamp(); |
| 133 | Self { |
| 134 | id: Uuid::new_v4().to_string(), |
| 135 | parent_comment_id: Some(parent_comment_id), |
| 136 | content, |
| 137 | author_id, |
| 138 | created_at: now, |
| 139 | updated_at: now, |
| 140 | is_resolved: false, |
| 141 | resolved_by: None, |
| 142 | resolved_at: None, |
| 143 | reactions: HashMap::new(), |
| 144 | attachments: Vec::new(), |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | /// Creates a RowComment from a MapRef |
| 149 | pub fn from_map_ref<T: ReadTxn>(map_ref: &MapRef, txn: &T) -> Option<Self> { |
nothing calls this directly
no test coverage detected