//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.0 use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "file")] pub struct Model { #[sea_orm(primary_key, auto_increment = false, column_type = "Binary(16)")] pub id: Vec, #[sea_orm(unique)] pub hash: String, pub uploader_ip: String, pub uploaded_at: DateTime, pub download_until: DateTime, #[sea_orm(column_type = "Binary(255)")] pub encrypted_metadata: Vec, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm(has_many = "super::access_log::Entity")] AccessLog, } impl Related for Entity { fn to() -> RelationDef { Relation::AccessLog.def() } } impl ActiveModelBehavior for ActiveModel {}