725 B · text History aea77cc
use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "note")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    /// "note" or "todo"
    pub kind: String,
    pub text: String,
    /// For todos
    pub done: bool,
    /// The day of the occurrence it's on
    pub date: Date,
    /// For a holiday or iCal event: its calendar's key and its name
    pub calendar: Option<String>,
    pub event: Option<String>,
    /// For a person's date
    pub sig_date_id: Option<i32>,
    pub date_ins: Date,
    pub date_up: Date,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}

impl ActiveModelBehavior for ActiveModel {}