This commit is contained in:
pavel 2026-02-10 18:34:43 +01:00
commit 0fa627ca6d
18 changed files with 6192 additions and 0 deletions

1
src/entities/mod.rs Normal file
View file

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

21
src/entities/task.rs Normal file
View file

@ -0,0 +1,21 @@
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[sea_orm(table_name = "tasks")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub goal: String,
pub status: String,
#[sea_orm(column_type = "Text")]
pub logs: String,
#[sea_orm(column_type = "Text", nullable)]
pub answer: Option<String>,
pub created_at: DateTimeWithTimeZone,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}