//! SeaORM Entity. Generated by sea-orm-codegen 0.1.0

use sea_orm::entity::prelude::*;

#[derive(Copy, Clone, Default, Debug, DeriveEntity)]
pub struct Entity;

impl EntityName for Entity {
    fn table_name(&self) -> & 'static str {
        "imports"
    }
}

#[derive(Clone, Debug, PartialEq, DeriveModel, DeriveActiveModel)]
pub struct Model {
    pub a: Json,
    pub b: Date,
    pub c: Time,
    pub d: DateTime,
    pub e: DateTimeWithTimeZone,
    pub f: Decimal,
    pub g: Uuid,
    pub h: PgVector,
    pub i: IpNetwork,
    pub j: Vec<Json> ,
    pub k: Vec<Vec<IpNetwork>> ,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveColumn)]
pub enum Column {
    A,
    B,
    C,
    D,
    E,
    F,
    G,
    H,
    I,
    J,
    K,
}

#[derive(Copy, Clone, Debug, EnumIter, DerivePrimaryKey)]
pub enum PrimaryKey {
    A,
}

impl PrimaryKeyTrait for PrimaryKey {
    type ValueType = Json;
    fn auto_increment() -> bool {
        true
    }
}

#[derive(Copy, Clone, Debug, EnumIter)]
pub enum Relation {}

impl ColumnTrait for Column {
    type EntityName = Entity;
    fn def(&self) -> ColumnDef {
        match self {
            Self::A => ColumnType::Json.def(),
            Self::B => ColumnType::Date.def(),
            Self::C => ColumnType::Time.def(),
            Self::D => ColumnType::DateTime.def(),
            Self::E => ColumnType::TimestampWithTimeZone.def(),
            Self::F => ColumnType::Decimal(None).def(),
            Self::G => ColumnType::Uuid.def(),
            Self::H => ColumnType::Vector(None).def(),
            Self::I => ColumnType::Inet.def(),
            Self::J => ColumnType::Array(RcOrArc::new(ColumnType::Json)).def(),
            Self::K => ColumnType::Array(RcOrArc::new(ColumnType::Array(RcOrArc::new(
                ColumnType::Cidr
            ))))
            .def(),
        }
    }
}

impl RelationTrait for Relation {
    fn def(&self) -> RelationDef {
        panic!("No RelationDef")
    }
}

impl ActiveModelBehavior for ActiveModel {}
