use serde::{Deserialize, Serialize};
use crate::models::Id;
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
pub struct Category {
pub id: Id,
pub title: String,
pub channels: Vec<Id>,
}
impl Category {
pub fn new(id: Id, title: impl Into<String>) -> Self {
Self {
id,
title: title.into(),
channels: Vec::new(),
}
}
}