birdseed 0.2.0

birdseed enables you to seed a libellis database with fake data, clear all tables, or rebuild all tables per the current embedded migrations
Documentation
use crate::schema::*;
use std::time::SystemTime;

#[derive(Serialize, Deserialize, Queryable)]
pub struct Survey {
    pub id: i32,
    pub author: String,
    pub title: String,
    pub description: Option<String>,
    pub anonymous: bool,
    pub published: bool,
    pub date_posted: SystemTime,
    pub category: String,
}

#[derive(Insertable)]
#[table_name = "surveys"]
pub struct NewSurvey<'a> {
    pub author: &'a str,
    pub title: &'a str,
    pub published: bool,
    pub category: &'a str,
}

#[derive(Deserialize, AsChangeset, Default, Clone)]
#[table_name = "surveys"]
pub struct UpdateSurveyData {
    title: Option<String>,
    published: Option<bool>,
    description: Option<String>,
    category: Option<String>,
}