fix parsing

This commit is contained in:
2025-10-09 17:40:54 -06:00
parent 4e981a69a8
commit 7cad512010
14 changed files with 520 additions and 214 deletions

View File

@@ -0,0 +1,33 @@
import uuid as uuid;
import orm as orm;
#[derive(DeepCopy, Debug, PartialEq, DeriveEntityModel)]
#[orm::model(table_name = "user")]
pub type User struct {
#[orm::model(primary_key)]
pub id: uuid::UUID;
#[orm::model(unique, column_type = "VARCHAR(256)")]
pub email: String;
#[orm::model(nullable)]
pub password_hash: Option[String];
}
#[derive(DeepCopy, Debug, PartialEq, DeriveEntityModel)]
#[orm::model(table_name = "todo")]
pub type Todo struct {
#[orm::model(primary_key)]
pub id: uuid::UUID;
#[orm::model(foreign_key = "user", on_delete="CASCADE")]
pub user_id: uuid::UUID;
#[orm::model(column_type = "VARCHAR(256)")]
pub title: String;
#[orm::model(column_type = "TEXT")]
pub description: String;
pub created_at: DateTime;
pub updated_at: DateTime;
}