feat: add transaction tag rel model
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.11
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -9,7 +9,7 @@ pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i64,
|
||||
pub name: String,
|
||||
pub r#type: i32,
|
||||
pub account_type: i32,
|
||||
pub uid: i64,
|
||||
pub is_deleted: bool,
|
||||
pub created_at: DateTime,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.11
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.11
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.11
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16
|
||||
|
||||
pub mod prelude;
|
||||
|
||||
@@ -7,3 +7,4 @@ pub mod book;
|
||||
pub mod category;
|
||||
pub mod tag;
|
||||
pub mod transaction;
|
||||
pub mod transaction_tag_rel;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.11
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16
|
||||
|
||||
pub use super::account::Entity as Account;
|
||||
pub use super::book::Entity as Book;
|
||||
pub use super::category::Entity as Category;
|
||||
pub use super::tag::Entity as Tag;
|
||||
pub use super::transaction::Entity as Transaction;
|
||||
pub use super::transaction_tag_rel::Entity as TransactionTagRel;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.11
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.11
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -9,7 +9,7 @@ pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i64,
|
||||
pub uid: i64,
|
||||
pub r#type: i32,
|
||||
pub transaction_type: i32,
|
||||
pub book_id: i64,
|
||||
pub category_id: i64,
|
||||
pub description: String,
|
||||
|
||||
22
src/model/db/transaction_tag_rel.rs
Normal file
22
src/model/db/transaction_tag_rel.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.16
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
|
||||
#[sea_orm(table_name = "transaction_tag_rel")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
pub id: i64,
|
||||
pub uid: i64,
|
||||
pub transaction_id: i64,
|
||||
pub tag_id: i64,
|
||||
pub is_deleted: bool,
|
||||
pub created_at: DateTime,
|
||||
pub updated_at: DateTime,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
||||
Reference in New Issue
Block a user