use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "power_curve")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
#[sea_orm(column_type = "Double")]
pub a: f64,
#[sea_orm(column_type = "Double")]
pub b: f64,
#[sea_orm(column_type = "Double")]
pub c: f64,
#[sea_orm(column_type = "Double")]
pub d: f64,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {
#[sea_orm(has_many = "super::cpu::Entity")]
Cpu,
}
impl Related<super::cpu::Entity> for Entity {
fn to() -> RelationDef {
Relation::Cpu.def()
}
}
impl ActiveModelBehavior for ActiveModel {}