Forest Anderson bb39684f48
Add JsonBinary attribute (#1346)
* Add JsonBinary attribute to column

* Add Postgres test section, test binary json

* Added expanded entity format test

* Fixed unit test
2023-01-18 19:09:01 +08:00

22 lines
669 B
Rust

//! SeaORM Entity. Generated by sea-orm-codegen 0.1.0
//!
//! This file tests that the JsonBinary column type is annotated correctly is
//! compact entity form. More information can be found in this issue:
//!
//! https://github.com/SeaQL/sea-orm/issues/1344
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "task")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
pub payload: Json,
#[sea_orm(column_type = "JsonBinary")]
pub payload_binary: Json,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}