|
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 }
|
|
}
|
|
}
|