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

@@ -139,14 +139,13 @@ pub struct Calendar {
}
impl Calendar {
/// Creates a new calendar
/// Creates a new calendar with auto-generated ID
///
/// # Arguments
/// * `id` - Optional ID for the calendar. If None, the ID will be auto-generated.
/// * `name` - Name of the calendar
pub fn new(id: Option<u32>, name: impl ToString) -> Self {
pub fn new(name: impl ToString) -> Self {
Self {
base_data: BaseModelData::new(id),
base_data: BaseModelData::new(),
name: name.to_string(),
description: None,
events: Vec::new(),