fix
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
use che_orm::Model;
|
||||
|
||||
use crate::apps::{
|
||||
frcapp::models::Frc, personemanagment::models::Employee, projectapp::models::Project,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone, Model)]
|
||||
#[model(table = "contractapp")]
|
||||
pub struct Contract {
|
||||
#[field(primary_key)]
|
||||
pub id: i64,
|
||||
|
||||
pub name: String,
|
||||
pub number: String,
|
||||
pub absolute_url: String,
|
||||
pub contract_type: String,
|
||||
pub category: String,
|
||||
pub amount_total_display: String,
|
||||
pub amount_by_ds: String,
|
||||
pub comment: String,
|
||||
pub date: String,
|
||||
pub status_name: String,
|
||||
pub status: String,
|
||||
pub nds: String,
|
||||
pub name_of_product: String,
|
||||
pub counterparty_name: String,
|
||||
pub amount: f64,
|
||||
pub month_pay: Option<f64>,
|
||||
pub avans_pay: String,
|
||||
pub amount_total: f64,
|
||||
pub estimate_nds_cost: f64,
|
||||
pub estimate_nds_cert: f64,
|
||||
pub bill_cost_sum: Option<f64>,
|
||||
pub bill_paid_sum: Option<f64>,
|
||||
pub income_total: f64,
|
||||
pub arrears: f64,
|
||||
|
||||
#[field(foreign_key = Counterparty)]
|
||||
pub counterparty_id: Option<i64>,
|
||||
|
||||
#[field(foreign_key = Project)]
|
||||
pub project_id: Option<i64>,
|
||||
|
||||
#[field(foreign_key = Frc)]
|
||||
pub frc_id: Option<i64>,
|
||||
|
||||
#[field(foreign_key = Employee)]
|
||||
pub employee_id: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Model)]
|
||||
#[model(table = "counterparty")]
|
||||
pub struct Counterparty {
|
||||
#[field(primary_key)]
|
||||
pub id: i64,
|
||||
|
||||
pub name: String,
|
||||
}
|
||||
Reference in New Issue
Block a user