initial commit

This commit is contained in:
2023-06-04 17:46:19 +02:00
commit 4b90f7c8d5
51 changed files with 9952 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
[package]
name = "entity"
version = "0.1.0"
edition = "2021"
[dependencies]
serde = { version = "1.0.144", features = ["derive"] }
sea-orm = "0.9.2"

View File

@@ -0,0 +1 @@
pub mod todo;

View File

@@ -0,0 +1,3 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.2
pub use super::todo::Entity as Todo;

View File

@@ -0,0 +1,28 @@
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.2
use sea_orm::entity::prelude::*;
use serde::{Serialize, Deserialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "todo")]
pub struct Model {
#[sea_orm(primary_key)]
#[serde(skip_deserializing)]
pub id: i32,
pub title: String,
pub description: String,
pub done: bool,
pub created_at: DateTimeWithTimeZone,
pub updated_at: DateTimeWithTimeZone,
}
#[derive(Copy, Clone, Debug, EnumIter)]
pub enum Relation {}
impl RelationTrait for Relation {
fn def(&self) -> RelationDef {
panic!("No RelationDef")
}
}
impl ActiveModelBehavior for ActiveModel {}