41 lines
1.1 KiB
Rust
41 lines
1.1 KiB
Rust
pub mod filters;
|
|
pub mod models;
|
|
pub mod serializers;
|
|
|
|
use che_tauri::{AppModule, ModuleContext};
|
|
|
|
pub fn module() -> ContractappModule {
|
|
ContractappModule
|
|
}
|
|
|
|
pub struct ContractappModule;
|
|
|
|
impl AppModule for ContractappModule {
|
|
fn name(&self) -> &'static str {
|
|
"contractapp"
|
|
}
|
|
|
|
fn init(&self, ctx: &mut ModuleContext) {
|
|
ctx.resource::<models::Contract>(
|
|
"contract",
|
|
serializers::contractapp_serializer(),
|
|
filters::contractapp_filterset(),
|
|
);
|
|
ctx.resource::<models::ContractCategory>(
|
|
"contract_category",
|
|
serializers::contract_category_serializer(),
|
|
filters::contract_category_filterset(),
|
|
);
|
|
ctx.resource::<models::Counterparty>(
|
|
"counterparty",
|
|
serializers::counterparty_serializer(),
|
|
filters::counterparty_filterset(),
|
|
);
|
|
ctx.resource::<models::ContractApplicationFile>(
|
|
"contract_application_file",
|
|
serializers::contract_application_file_serializer(),
|
|
filters::contract_application_file_filterset(),
|
|
);
|
|
}
|
|
}
|