-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_work_order.rs
39 lines (29 loc) · 992 Bytes
/
create_work_order.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Create Work Order Example
#[cfg(all(feature = "tmf697", feature = "build-V4"))]
use tmflib::tmf697::v4::work_order::WorkOrder;
#[cfg(all(feature = "tmf697", feature = "build-V4"))]
use tmflib::tmf697::v4::work::{
Work,
WorkRefOrValue,
};
#[cfg(all(feature = "tmf697", feature = "build-V4"))]
use tmflib::tmf697::v4::work_order_item::WorkOrderItem;
#[cfg(all(feature = "tmf697", feature = "build-V5"))]
use tmflib::tmf697::v5::work_order_item::WorkOrderItem;
#[cfg(all(feature = "tmf697", feature = "build-V5"))]
use tmflib::tmf697::v5::work_order::WorkOrder;
#[cfg(all(feature = "tmf697", feature = "build-V5"))]
use tmflib::tmf697::v5::work::{
Work,
WorkRefOrValue,
};
fn main() {
#[cfg(all(feature = "tmf697", feature = "build-V4"))]
{
let mut wo = WorkOrder::new();
let work = Work::new("Some work");
let woi = WorkOrderItem::with(WorkRefOrValue::from(work));
wo.add_item(woi);
dbg!(wo);
}
}