* version update, all examples marked with #notcomplete does not compile with cargo run * WIP * salvo example fixed * testing, and boost a minor version * fmt * build dependency update * CI * cleanup --------- Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
20 lines
536 B
Rust
20 lines
536 B
Rust
use salvo::prelude::Extractible;
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Extractible, Deserialize, Serialize)]
|
|
#[sea_orm(table_name = "posts")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
#[serde(skip_deserializing)]
|
|
pub id: i32,
|
|
pub title: String,
|
|
#[sea_orm(column_type = "Text")]
|
|
pub text: String,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|