* PostgreSQL array (draft) * Fixup * Fixup * Fixup * Fixup * Fixup * Refactoring * generate entity for Postgres array fields * Add tests * Update Cargo.toml Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
16 lines
387 B
Rust
16 lines
387 B
Rust
use sea_orm::entity::prelude::*;
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
|
|
#[sea_orm(table_name = "collection")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: i32,
|
|
pub integers: Vec<i32>,
|
|
pub integers_opt: Option<Vec<i32>>,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|