1/*
2 * Legal Notice
3 *
4 * This document and associated source code (the "Work") is a part of a
5 * benchmark specification maintained by the TPC.
6 *
7 * The TPC reserves all right, title, and interest to the Work as provided
8 * under U.S. and international laws, including without limitation all patent
9 * and trademark rights therein.
10 *
11 * No Warranty
12 *
13 * 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION
14 * CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE
15 * AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER
16 * WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
17 * INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES,
18 * DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
19 * PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
20 * WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE.
21 * ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
22 * QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT
23 * WITH REGARD TO THE WORK.
24 * 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO
25 * ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE
26 * COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS
27 * OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT,
28 * INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY,
29 * OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT
30 * RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD
31 * ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
32 *
33 * Contributors:
34 * Gradient Systems
35 */
36#ifndef W_STORE_H
37#define W_STORE_H
38
39#include "address.h"
40#include "decimal.h"
41
42#define RS_W_STORE_NAME 50
43#define RS_W_STORE_MGR 40
44#define RS_W_MARKET_MGR 40
45#define RS_W_MARKET_DESC 100
46#define STORE_MIN_TAX_PERCENTAGE "0.00"
47#define STORE_MAX_TAX_PERCENTAGE "0.11"
48
49/*
50 * STORE table structure
51 */
52struct W_STORE_TBL {
53 ds_key_t store_sk;
54 char store_id[RS_BKEY + 1];
55 ds_key_t rec_start_date_id;
56 ds_key_t rec_end_date_id;
57 ds_key_t closed_date_id;
58 char store_name[RS_W_STORE_NAME + 1];
59 int employees;
60 int floor_space;
61 char *hours;
62 char store_manager[RS_W_STORE_MGR + 1];
63 int market_id;
64 decimal_t dTaxPercentage;
65 char *geography_class;
66 char market_desc[RS_W_MARKET_DESC + 1];
67 char market_manager[RS_W_MARKET_MGR + 1];
68 ds_key_t division_id;
69 char *division_name;
70 ds_key_t company_id;
71 char *company_name;
72 ds_addr_t address;
73};
74
75/***
76 *** STORE_xxx Store Defines
77 ***/
78#define STORE_MIN_DAYS_OPEN 5
79#define STORE_MAX_DAYS_OPEN 500
80#define STORE_CLOSED_PCT 30
81#define STORE_MIN_REV_GROWTH "-0.05"
82#define STORE_MAX_REV_GROWTH "0.50"
83#define STORE_DESC_MIN 15
84
85int mk_w_store(void *info_arr, ds_key_t kIndex);
86
87#endif
88