26 lines
566 B
Rust
26 lines
566 B
Rust
//! SeaORM Entity. Generated by sea-orm-codegen 0.9.3
|
|
|
|
use sea_orm::entity::prelude::*;
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
|
#[sea_orm(table_name = "snapshot")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: i64,
|
|
pub date: Date,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {
|
|
#[sea_orm(has_many = "super::group_data::Entity")]
|
|
GroupData,
|
|
}
|
|
|
|
impl Related<super::group_data::Entity> for Entity {
|
|
fn to() -> RelationDef {
|
|
Relation::GroupData.def()
|
|
}
|
|
}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|