actix-admin/actix_admin_macros/tests/macros_sqlx.rs

24 lines
583 B
Rust
Raw Normal View History

2022-04-23 20:03:09 +02:00
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
use actix_admin_macros::ActixAdmin;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Deserialize, Serialize, ActixAdmin)]
#[sea_orm(table_name = "test")]
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 {}
#[test]
fn test_macro() {
assert_eq!(4, 2);
}