Subversion Repositories SmartDukaan

Rev

Rev 5110 | Rev 5361 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5110 Rev 5185
Line 1... Line 1...
1
namespace java in.shop2020.warehouse
1
namespace java in.shop2020.warehouse
2
namespace py shop2020.thriftpy.warehouse
2
namespace py shop2020.thriftpy.warehouse
3
 
3
 
4
include "GenericService.thrift"
4
include "GenericService.thrift"
5
 
5
 
-
 
6
enum ScanType {
-
 
7
    PURCHASE = 0,   // Scan-in at the time of purchase
-
 
8
    SALE = 1,       // Scan-out for sale
-
 
9
    SALE_RET = 2,   // Scan-in when an item is returned undelivered
-
 
10
    DOA_IN = 3,     // Scan-in when an item is returned by the customer with the DOA certificate
-
 
11
    DOA_OUT = 4,     // Scan-out to return an item to the supplier
-
 
12
    PURCHASE_RETURN = 5, // Scan-out to return an item to the supplier (a Non-DOA case)
-
 
13
    SALE_RET_UNUSABLE = 6,
-
 
14
    LOST_IN_TRANSIT = 7,
-
 
15
    DOA_REPLACED = 8
-
 
16
}
-
 
17
 
6
struct InventoryItem {
18
struct InventoryItem {
7
    // fields in db
19
    // primary fields
8
    1:i64 id,
20
    1:i64 id,
9
    2:i64 itemId,
21
    2:i64 itemId,
10
    3:string itemNumber,
22
    3:string itemNumber,
11
    4:string serialNumber,
23
    4:string serialNumber,
12
    5:i64 initialQuantity,
24
    5:i64 initialQuantity,
13
    6:i64 currentQuantity,
25
    6:i64 currentQuantity,
14
    7:i64 purchaseId,
26
    7:i64 purchaseId,
15
 
27
 
16
    // derived fields for  efficient lookups
28
    // derived fields for  efficient lookups
17
    8:i64 supplierId,
29
    8:i64 supplierId,
18
    9:double unitPrice
30
    9:double unitPrice,
19
}
-
 
20
 
-
 
21
enum ScanType {
-
 
22
    PURCHASE = 0,   // Scan-in at the time of purchase
-
 
23
    SALE = 1,       // Scan-out for sale
-
 
24
    SALE_RET = 2,   // Scan-in when an item is returned undelivered
-
 
25
    DOA_IN = 3,     // Scan-in when an item is returned by the customer with the DOA certificate
-
 
26
    DOA_OUT = 4,     // Scan-out to return an item to the supplier
-
 
27
    PURCHASE_RETURN = 5, // Scan-out to return an item to the supplier (a Non-DOA case)
-
 
28
    SALE_RET_UNUSABLE = 6,
31
    10:i64 currentWarehouseId,
29
    LOST_IN_TRANSIT = 7
32
    11:ScanType lastScanType
30
}
33
}
31
 
34
 
32
struct Scan {
35
struct Scan {
33
    1:i64 id,
36
    1:i64 id,
34
    2:i64 inventoryItemId,
37
    2:i64 inventoryItemId,
Line 117... Line 120...
117
 
120
 
118
    /**
121
    /**
119
     * Gets item ids for a given item number
122
     * Gets item ids for a given item number
120
     */
123
     */
121
    list<i64> getItemIds(1:string itemNumber);
124
    list<i64> getItemIds(1:string itemNumber);
-
 
125
    
-
 
126
    /**
-
 
127
     * Retrieves all inventory items given a last scan type
-
 
128
     */
-
 
129
    list<InventoryItem> getInventoryItemsFromLastScanType(1:ScanType lastScanType) throws (1:WarehouseServiceException wex);
-
 
130
    
-
 
131
    /**
-
 
132
     * Retrieves inventory item given a inventoryItem id
-
 
133
     */
-
 
134
    InventoryItem getInventoryItemFromId(1:i64 inventoryItemId) throws (1:WarehouseServiceException wex);    
122
}
135
}