Subversion Repositories SmartDukaan

Rev

Rev 412 | Rev 472 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
412 ashish 1
namespace java in.shop2020.logistics
2
namespace py shop2020.thriftpy.logistics
3
 
442 rajveer 4
//struct AWB{
5
//    1:string awb_number,
6
//    2:bool is_available,
7
//    3:i64 provider_id
8
//}
9
 
10
 
412 ashish 11
struct ShipmentUpdate{
12
	1:string pin,
13
	2:i64 timestamp,
14
	3:string description
15
}
16
 
17
struct ShipmentStatusInfo{
18
	1:string awb,
442 rajveer 19
	2:i64 provider_id,
20
	3:list<ShipmentUpdate> updates,
21
	4:ShipmentUpdate currentUpdate
412 ashish 22
}
23
 
24
struct Provider{
25
	1:i64 id,
26
	2:string name
27
}
28
 
29
struct Shipment{
30
	1:string warehouse_name,
31
	2:string awb,
32
	3:string origin,
33
	4:string destination,
34
	5:i64 timestamp,
35
	6:string recepient_name,
36
	7:string recepient_address,
37
	8:string recepient_pincode,
38
	9:string recepient_phone,
39
	10:string shipment_weight,
40
	11:string shipment_contents
41
}
42
 
43
service LogisticsService{
44
	//APIs to be used by shop2020 components
45
	void addEmptyAWBs(1:list<string> numbers, 2:i64 provider_id),
46
	string getEmptyAWB(1:i64 provider_id),
47
	list<Provider> getProviders(),
48
	Provider getProvider(1:i64 provider_id),
442 rajveer 49
	void createShipment(1:Shipment shipment),
50
	void updateShipmentStatus(1:string awb, 2:ShipmentUpdate shipment_update),
412 ashish 51
	ShipmentStatusInfo getShipmentInfo(1:string awb),
52
	//APIs to be used by logistic provider
53
	list<Shipment> getShipments(1:i64 warehouse_id, 2:i64 from_date, 3:i64 to_date, 4:i64 provider_id),
54
	list<Shipment> getTodaysShipments(1:i64 warehouse_id,2:i64 provider_id)
55
 
56
}
57