//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.11 use sea_orm::entity::prelude::*; #[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)] #[sea_orm(table_name = "items_prices")] pub struct Model { #[sea_orm(primary_key)] pub id: i64, #[sea_orm(column_type = "Text")] pub item_name: String, #[sea_orm(column_type = "Text", nullable)] pub item_price: Option, pub user_created_id: i64, pub time_created: DateTimeWithTimeZone, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] pub enum Relation { #[sea_orm( belongs_to = "super::users::Entity", from = "Column::UserCreatedId", to = "super::users::Column::Id", on_update = "NoAction", on_delete = "NoAction" )] Users, } impl Related for Entity { fn to() -> RelationDef { Relation::Users.def() } } impl ActiveModelBehavior for ActiveModel {}