|
@@ -0,0 +1,42 @@
|
|
|
+//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.0
|
|
|
+
|
|
|
+use sea_orm::entity::prelude::*;
|
|
|
+use serde::{Deserialize, Serialize};
|
|
|
+
|
|
|
+#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
|
|
|
+#[sea_orm(table_name = "store_order_refund")]
|
|
|
+pub struct Model {
|
|
|
+ #[sea_orm(primary_key)]
|
|
|
+ pub id: i32,
|
|
|
+ pub order_id: i32,
|
|
|
+ pub refund_amount: Decimal,
|
|
|
+ #[sea_orm(column_type = "Text")]
|
|
|
+ pub refund_reason: String,
|
|
|
+ #[sea_orm(column_type = "custom(\"DATETIME\")")]
|
|
|
+ pub refund_time: String,
|
|
|
+ #[sea_orm(column_type = "custom(\"DATETIME\")")]
|
|
|
+ pub create_time: String,
|
|
|
+ #[sea_orm(column_type = "custom(\"DATETIME\")")]
|
|
|
+ pub update_time: String,
|
|
|
+ pub status: i32,
|
|
|
+}
|
|
|
+
|
|
|
+#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
|
+pub enum Relation {
|
|
|
+ #[sea_orm(
|
|
|
+ belongs_to = "super::store_order::Entity",
|
|
|
+ from = "Column::OrderId",
|
|
|
+ to = "super::store_order::Column::Id",
|
|
|
+ on_update = "NoAction",
|
|
|
+ on_delete = "NoAction"
|
|
|
+ )]
|
|
|
+ StoreOrder,
|
|
|
+}
|
|
|
+
|
|
|
+impl Related<super::store_order::Entity> for Entity {
|
|
|
+ fn to() -> RelationDef {
|
|
|
+ Relation::StoreOrder.def()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+impl ActiveModelBehavior for ActiveModel {}
|