fix: Use incremental ID

This commit is contained in:
Mahmoud Emad
2025-05-17 13:00:05 +03:00
parent bde5db0e52
commit a676854251
13 changed files with 149 additions and 116 deletions

View File

@@ -13,13 +13,10 @@ pub struct Comment {
}
impl Comment {
/// Create a new comment
///
/// # Arguments
/// * `id` - Optional ID for the comment. If None, the ID will be auto-generated.
pub fn new(id: Option<u32>) -> Self {
/// Create a new comment with auto-generated ID
pub fn new() -> Self {
Self {
base_data: BaseModelData::new(id),
base_data: BaseModelData::new(),
user_id: 0,
content: String::new(),
}