Subversion Repositories SmartDukaan

Rev

Rev 472 | Rev 483 | 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
 
472 rajveer 10
struct ItemLogistics{
11
	1:i64 warehouseId,
12
	2:i64 availability,
13
	3:i64 shippingTime
14
}
442 rajveer 15
 
472 rajveer 16
 
412 ashish 17
struct ShipmentUpdate{
18
	1:string pin,
19
	2:i64 timestamp,
20
	3:string description
21
}
22
 
23
struct ShipmentStatusInfo{
24
	1:string awb,
442 rajveer 25
	2:i64 provider_id,
26
	3:list<ShipmentUpdate> updates,
27
	4:ShipmentUpdate currentUpdate
412 ashish 28
}
29
 
30
struct Provider{
31
	1:i64 id,
32
	2:string name
33
}
34
 
35
struct Shipment{
36
	1:string warehouse_name,
37
	2:string awb,
38
	3:string origin,
39
	4:string destination,
40
	5:i64 timestamp,
41
	6:string recepient_name,
42
	7:string recepient_address,
43
	8:string recepient_pincode,
44
	9:string recepient_phone,
45
	10:string shipment_weight,
46
	11:string shipment_contents
47
}
48
 
472 rajveer 49
exception LogisticsServiceException{
50
	1:i64 id,
51
	2:string message
52
}
53
 
412 ashish 54
service LogisticsService{
472 rajveer 55
 
56
	//This call would return the logistic estimate 
57
	ItemLogistics getLogisticsEstimation(1:i64 itemId, 2:string destination_pin, 3:i64 provider_id ) throws (1:LogisticsServiceException se),
477 rajveer 58
	void addDeliveryEstimate(1:i64 warahouse_id, 2:string destination_pin, 3:i64 provider_id, 4:i64 delivery_time, 5:i64 reliability),
59
	void addPincodeWarehouseMapping(1:string pin_code, 2:i64 warehouse_id, 3:string warehouse_pin),
60
 
412 ashish 61
	//APIs to be used by shop2020 components
62
	void addEmptyAWBs(1:list<string> numbers, 2:i64 provider_id),
63
	string getEmptyAWB(1:i64 provider_id),
64
	list<Provider> getProviders(),
65
	Provider getProvider(1:i64 provider_id),
442 rajveer 66
	void createShipment(1:Shipment shipment),
67
	void updateShipmentStatus(1:string awb, 2:ShipmentUpdate shipment_update),
412 ashish 68
	ShipmentStatusInfo getShipmentInfo(1:string awb),
472 rajveer 69
 
412 ashish 70
	//APIs to be used by logistic provider
71
	list<Shipment> getShipments(1:i64 warehouse_id, 2:i64 from_date, 3:i64 to_date, 4:i64 provider_id),
72
	list<Shipment> getTodaysShipments(1:i64 warehouse_id,2:i64 provider_id)
73
 
74
}
75