init
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::hash::{Hash, Hasher};
|
||||
// use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
// use uuid::Uuid;
|
||||
@@ -29,4 +30,18 @@ impl Channel {
|
||||
created_at: Utc::now(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for Channel {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.id == other.id
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for Channel {}
|
||||
|
||||
impl Hash for Channel {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.id.hash(state);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user