rss-reader/src/models/feed/new_feed.rs

16 lines
284 B
Rust

use crate::schema::feed;
use diesel::Insertable;
#[derive(Insertable, Clone)]
#[diesel(table_name=feed)]
pub struct NewFeed {
pub title: String,
pub url: String,
}
impl NewFeed {
pub fn new(title: String, url: String) -> NewFeed {
NewFeed { title, url }
}
}