test
This commit is contained in:
parent
6a1cddbb47
commit
0fa627ca6d
18 changed files with 6192 additions and 0 deletions
1
src/entities/mod.rs
Normal file
1
src/entities/mod.rs
Normal file
|
|
@ -0,0 +1 @@
|
|||
pub mod task;
|
||||
21
src/entities/task.rs
Normal file
21
src/entities/task.rs
Normal 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 {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue