Subversion Repositories SmartDukaan

Rev

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