tildes-statistics/source/entities/snapshot.rs

26 lines
573 B
Rust
Raw Normal View History

//! `SeaORM` Entity. Generated by sea-orm-codegen 0.11.3
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[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 {}