db&score, feed_channel impl & score from db

Adds a feed_channel implementation which reflects a feed's specific
settings per channel.

Also added an UnparsedTimedScore to score which allows parsing to score
from db in a controlled fashion.
This commit is contained in:
Julia Lange 2026-02-06 14:49:13 -08:00
parent 5d7e96eb31
commit 336f39a60f
Signed by: Julia
SSH key fingerprint: SHA256:5DJcfxa5/fKCYn57dcabJa2vN2e6eT0pBerYi5SUbto
4 changed files with 292 additions and 1 deletions

View file

@ -2,6 +2,8 @@ mod user;
pub use user::User;
mod feed;
pub use feed::Feed;
mod feed_channel;
pub use feed_channel::FeedChannel;
mod channel;
pub use channel::Channel;
mod item;
@ -12,9 +14,17 @@ macro_rules! define_key {
#[derive(PartialEq, Debug, Copy, Clone)]
pub struct $name(i64);
};
($name:ident, $($field:ident : $type:ty),* $(,)?) => {
#[derive(PartialEq, Debug, Copy, Clone)]
pub struct $name {
$($field: $type),*
}
};
}
define_key!(UserKey);
define_key!(FeedKey);
define_key!(FeedChannelKey, feed_key: FeedKey, channel_key: ChannelKey);
define_key!(ChannelKey);
define_key!(ItemKey);