]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/reporter/tables.example.xml
adjusting backdate so it does not clear fines for "today" (the backdate day); fine...
[Evergreen.git] / Open-ILS / src / reporter / tables.example.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <tables>
3
4         <table id="wide-circulation" partition="false" fact-table="true">
5                 <label>Circulation</label>
6                 <description>Base table for creating circulation reports</description>
7                 <tablename>stats.fleshed_circulation</tablename>
8
9                 <fields>
10                         <field
11                           name="id"
12                           primary="true"
13                           create-type="serial"
14                           datatype="int">
15                                 <label>ID</label>
16                                 <description>Circulation ID</description>
17                         </field>
18                         <field
19                           name="circ_lib"
20                           datatype="int"
21                           indexed="true">
22                                 <label>Circulator</label>
23                                 <description>ID of the Circulating Library</description>
24                         </field>
25                         <field
26                           name="checkin_lib"
27                           datatype="int"
28                           indexed="true">
29                                 <label>Checkin Library</label>
30                                 <description>ID of the Checkin Library</description>
31                         </field>
32                         <field
33                           name="owning_lib"
34                           datatype="int"
35                           indexed="true">
36                                 <label>Owner</label>
37                                 <description>ID of the Owning Library</description>
38                         </field>
39                         <field
40                           name="start_date_day"
41                           datatype="date">
42                                 <label>Start Date</label>
43                                 <description>Date of the copy's cataloging</description>
44                         </field>
45                         <field
46                           name="start_date_hour"
47                           datatype="timestamptz">
48                                 <label>Start Date and Hour</label>
49                                 <description>Date and Hour of the circulation start</description>
50                         </field>
51                         <field
52                           name="due_date_day"
53                           datatype="date"
54                           indexed="true" >
55                                 <label>Due Date</label>
56                                 <description>Day the circulation is due</description>
57                         </field>
58                         <field
59                           name="due_date_hour"
60                           datatype="timestamptz"
61                           indexed="true" >
62                                 <label>Due Date and Hour</label>
63                                 <description>Day and Hour the circulation is due</description>
64                         </field>
65                         <field
66                           name="due_date"
67                           datatype="timestamptz"
68                           indexed="true"
69                           default="now()">
70                                 <label>Due Date</label>
71                                 <description>Timestamp of the circulation due date</description>
72                         </field>
73                         <field
74                           name="xact_start"
75                           datatype="timestamptz"
76                           indexed="true"
77                           default="now()">
78                                 <label>Start Time</label>
79                                 <description>Timestamp of the circulation start</description>
80                         </field>
81                         <field
82                           name="xact_finish"
83                           datatype="timestamptz"
84                           indexed="true"
85                           default="now()">
86                                 <label>Finish Time</label>
87                                 <description>Timestamp of the circulation end</description>
88                         </field>
89                         <field
90                           name="finish_date_day"
91                           datatype="date">
92                                 <label>Finsh Date</label>
93                                 <description>Date of the circulation end</description>
94                         </field>
95                         <field
96                           name="finish_date_hour"
97                           datatype="timestamptz">
98                                 <label>Finish Date and Hour</label>
99                                 <description>Date and Hour of the circulation end</description>
100                         </field>
101                         <field
102                           name="item_lang"
103                           datatype="text">
104                                 <label>Language</label>
105                                 <description>MARC Item Language</description>
106                         </field>
107                         <field
108                           name="item_form"
109                           datatype="text">
110                                 <label>Form</label>
111                                 <description>MARC Item Form of Material</description>
112                         </field>
113                         <field
114                           name="item_type"
115                           datatype="text">
116                                 <label>Type</label>
117                                 <description>MARC Item Type</description>
118                         </field>
119                         <field
120                           name="call_number_label"
121                           transform-group="call_number"
122                           widget-family="string-input"
123                           datatype="text">
124                                 <label>Call Number</label>
125                                 <description>Copy Call Number Label</description>
126                         </field>
127                 </fields>
128
129                 <links>
130                         <link
131                           field="start_date_day"
132                           table="generic_day_series"
133                           id="circ_start_day"
134                           key="date"
135                           type="has_a"/>
136                         <link
137                           field="start_date_hour"
138                           table="generic_hour_series"
139                           id="circ_start_hour"
140                           key="date_hour"
141                           type="has_a"/>
142                         <link
143                           field="finish_date_day"
144                           table="generic_day_series"
145                           id="circ_finish_day"
146                           key="date"
147                           type="has_a"/>
148                         <link
149                           field="finish_date_hour"
150                           table="generic_hour_series"
151                           id="circ_finish_hour"
152                           key="date_hour"
153                           type="has_a"/>
154                         <link
155                           field="due_date_day"
156                           table="generic_day_series"
157                           id="circ_due_date_day"
158                           key="date"
159                           type="has_a"/>
160                         <link
161                           field="due_date_hour"
162                           table="generic_hour_series"
163                           id="circ_due_date_hour"
164                           key="date_hour"
165                           type="has_a"/>
166                         <link
167                           field="checkin_lib"
168                           table="org_unit"
169                           id="circ_checkin_lib"
170                           key="id"
171                           type="has_a"/>
172                         <link
173                           field="owning_lib"
174                           table="org_unit"
175                           id="circ_owning_lib"
176                           key="id"
177                           type="has_a"/>
178                         <link
179                           field="item_lang"
180                           table="marc_lang_map"
181                           id="circ_language"
182                           key="code"
183                           type="has_a"/>
184                         <link
185                           field="item_form"
186                           table="marc_form_map"
187                           id="circ_item_form"
188                           key="code"
189                           type="has_a"/>
190                         <link
191                           field="item_type"
192                           table="marc_type_map"
193                           id="circ_item_type"
194                           key="code"
195                           type="has_a"/>
196                         <link
197                           field="circ_lib"
198                           table="org_unit"
199                           id="circ_circ_lib"
200                           key="id"
201                           type="has_a"/>
202                 </links>
203
204         </table>
205
206         <table id="wide-copy" partition="false" fact-table="true">
207                 <label>Copies</label>
208                 <description>Base table for creating snapshot reports on copy information</description>
209                 <tablename>stats.fleshed_copy</tablename>
210
211                 <fields>
212                         <field
213                           name="id"
214                           primary="true"
215                           create-type="serial"
216                           datatype="int">
217                                 <label>ID</label>
218                                 <description>Copy ID</description>
219                         </field>
220                         <field
221                           name="barcode"
222                           widget-family="string-input"
223                           datatype="text">
224                                 <label>Barcode</label>
225                                 <description>Copy Barcode</description>
226                         </field>
227                         <field
228                           name="owning_lib"
229                           datatype="int"
230                           indexed="true">
231                                 <label>Owner</label>
232                                 <description>ID of the Owning Library</description>
233                         </field>
234                         <field
235                           name="circ_lib"
236                           datatype="int"
237                           indexed="true">
238                                 <label>Circulator</label>
239                                 <description>ID of the Circulating Library</description>
240                         </field>
241                         <field
242                           name="create_date_day"
243                           datatype="date">
244                                 <label>Create Date</label>
245                                 <description>Date of the copy's cataloging</description>
246                         </field>
247                         <field
248                           name="create_date_hour"
249                           datatype="timestamptz">
250                                 <label>Create Date and Hour</label>
251                                 <description>Date and Hour of the copy's cataloging</description>
252                         </field>
253                         <field
254                           name="create_date"
255                           datatype="timestamptz"
256                           indexed="true"
257                           default="now()">
258                                 <label>Create Date</label>
259                                 <description>Timestamp of the copy's cataloging</description>
260                         </field>
261                         <field
262                           name="edit_date"
263                           datatype="timestamptz"
264                           indexed="true"
265                           default="now()">
266                                 <label>Edit Date</label>
267                                 <description>Timestamp of the copy's last edit</description>
268                         </field>
269                         <field
270                           name="edit_date_day"
271                           datatype="date">
272                                 <label>Edit Date</label>
273                                 <description>Date of the copy's last edit</description>
274                         </field>
275                         <field
276                           name="edit_date_hour"
277                           datatype="timestamptz">
278                                 <label>Edit Date and Hour</label>
279                                 <description>Date and Hour of the copy's last edit</description>
280                         </field>
281                         <field
282                           name="item_lang"
283                           datatype="text">
284                                 <label>Language</label>
285                                 <description>MARC Item Language</description>
286                         </field>
287                         <field
288                           name="item_form"
289                           datatype="text">
290                                 <label>Form</label>
291                                 <description>MARC Item Form of Material</description>
292                         </field>
293                         <field
294                           name="item_type"
295                           datatype="text">
296                                 <label>Type</label>
297                                 <description>MARC Item Type</description>
298                         </field>
299                         <field
300                           name="call_number_label"
301                           transform-group="call_number"
302                           widget-family="string-input"
303                           datatype="text">
304                                 <label>Call Number</label>
305                                 <description>Copy Call Number Label</description>
306                         </field>
307                 </fields>
308
309                 <links>
310                         <link
311                           field="create_date_day"
312                           table="generic_day_series"
313                           id="copy_create_day"
314                           key="date"
315                           type="has_a"/>
316                         <link
317                           field="create_date_hour"
318                           table="generic_hour_series"
319                           id="copy_create_hour"
320                           key="date_hour"
321                           type="has_a"/>
322                         <link
323                           field="edit_date_day"
324                           table="generic_day_series"
325                           id="copy_edit_day"
326                           key="date"
327                           type="has_a"/>
328                         <link
329                           field="edit_date_hour"
330                           table="generic_hour_series"
331                           id="copy_edit_hour"
332                           key="date_hour"
333                           type="has_a"/>
334                         <link
335                           field="owning_lib"
336                           table="org_unit"
337                           id="copy_owning_lib"
338                           key="id"
339                           type="has_a"/>
340                         <link
341                           field="item_lang"
342                           table="marc_lang_map"
343                           id="copy_language"
344                           key="code"
345                           type="has_a"/>
346                         <link
347                           field="item_form"
348                           table="marc_form_map"
349                           id="copy_item_form"
350                           key="code"
351                           type="has_a"/>
352                         <link
353                           field="item_type"
354                           table="marc_type_map"
355                           id="copy_item_type"
356                           key="code"
357                           type="has_a"/>
358                         <link
359                           field="circ_lib"
360                           table="org_unit"
361                           id="copy_circ_lib"
362                           key="id"
363                           type="has_a"/>
364                 </links>
365
366         </table>
367
368         <table id="wide-call-number" partition="false" fact-table="true">
369                 <label>Call Numbers/Volumes</label>
370                 <description>Base table for creating snapshot reports on call number/volume information</description>
371                 <tablename>stats.fleshed_call_number</tablename>
372
373                 <fields>
374                         <field
375                           name="id"
376                           primary="true"
377                           create-type="serial"
378                           datatype="int">
379                                 <label>ID</label>
380                                 <description>Call Number ID</description>
381                         </field>
382                         <field
383                           name="owning_lib"
384                           datatype="int"
385                           indexed="true">
386                                 <label>Owner</label>
387                                 <description>ID of the Owning Library</description>
388                         </field>
389                         <field
390                           name="create_date_day"
391                           datatype="date">
392                                 <label>Create Date</label>
393                                 <description>Date of the call number's cataloging</description>
394                         </field>
395                         <field
396                           name="create_date_hour"
397                           datatype="timestamptz">
398                                 <label>Create Date and Hour</label>
399                                 <description>Date and Hour of the call number's cataloging</description>
400                         </field>
401                         <field
402                           name="create_date"
403                           datatype="timestamptz"
404                           indexed="true"
405                           default="now()">
406                                 <label>Create Date</label>
407                                 <description>Timestamp of the call number's cataloging</description>
408                         </field>
409                         <field
410                           name="edit_date"
411                           datatype="timestamptz"
412                           indexed="true"
413                           default="now()">
414                                 <label>Edit Date</label>
415                                 <description>Timestamp of the call number's last edit</description>
416                         </field>
417                         <field
418                           name="edit_date_day"
419                           datatype="date">
420                                 <label>Edit Date</label>
421                                 <description>Date of the call number's last edit</description>
422                         </field>
423                         <field
424                           name="edit_date_hour"
425                           datatype="timestamptz">
426                                 <label>Edit Date and Hour</label>
427                                 <description>Date and Hour of the call number's last edit</description>
428                         </field>
429                         <field
430                           name="item_lang"
431                           datatype="text">
432                                 <label>Language</label>
433                                 <description>MARC Item Language</description>
434                         </field>
435                         <field
436                           name="item_form"
437                           datatype="text">
438                                 <label>Form</label>
439                                 <description>MARC Item Form of Material</description>
440                         </field>
441                         <field
442                           name="item_type"
443                           datatype="text">
444                                 <label>Type</label>
445                                 <description>MARC Item Type</description>
446                         </field>
447                         <field
448                           name="label"
449                           transform-group="call_number"
450                           widget-family="string-input"
451                           datatype="text">
452                                 <label>Call Number</label>
453                                 <description>Call Number Label</description>
454                         </field>
455                 </fields>
456
457                 <links>
458                         <link
459                           field="create_date_day"
460                           table="generic_day_series"
461                           id="call_number_create_day"
462                           key="date"
463                           type="has_a"/>
464                         <link
465                           field="create_date_hour"
466                           table="generic_hour_series"
467                           id="call_number_create_hour"
468                           key="date_hour"
469                           type="has_a"/>
470                         <link
471                           field="edit_date_day"
472                           table="generic_day_series"
473                           id="call_number_edit_day"
474                           key="date"
475                           type="has_a"/>
476                         <link
477                           field="edit_date_hour"
478                           table="generic_hour_series"
479                           id="call_number_edit_hour"
480                           key="date_hour"
481                           type="has_a"/>
482                         <link
483                           field="owning_lib"
484                           table="org_unit"
485                           id="call_number_owning_lib"
486                           key="id"
487                           type="has_a"/>
488                         <link
489                           field="item_lang"
490                           table="marc_lang_map"
491                           id="call_number_language"
492                           key="code"
493                           type="has_a"/>
494                         <link
495                           field="item_form"
496                           table="marc_form_map"
497                           id="call_number_item_form"
498                           key="code"
499                           type="has_a"/>
500                         <link
501                           field="item_type"
502                           table="marc_type_map"
503                           id="call_number_item_type"
504                           key="code"
505                           type="has_a"/>
506                 </links>
507
508         </table>
509                 
510         <table id="org_unit" partition="false" fact-table="false">
511                 <label>Organizational Units</label>
512                 <description>Table containing library hierarchy definition</description>
513                 <tablename>actor.org_unit</tablename>
514
515                 <fields>
516                         <field
517                           name="id"
518                           primary="true"
519                           filterable='true'
520                           widget-family="lib-choose"
521                           create-type="serial"
522                           datatype="int">
523                                 <label>Unique Library</label>
524                                 <description>Globally Unique Library Identifier</description>
525                         </field>
526                         <field
527                           name="name"
528                           widget-family="string-choose"
529                           datatype="text">
530                                 <label>Library Name</label>
531                                 <description>Friendly Library Name</description>
532                         </field>
533                         <field
534                           name="shortname"
535                           widget-family="string-choose"
536                           datatype="text">
537                                 <label>Short Name</label>
538                                 <description>Library Short (Policy) Name</description>
539                         </field>
540                 </fields>
541         </table>
542
543         <table id="marc_lang_map" partition="false" fact-table="false">
544                 <label>MARC Language Codes</label>
545                 <description>Table mapping MARC three character codes to language names</description>
546                 <tablename>config.language_map</tablename>
547
548                 <fields>
549                         <field
550                           name="code"
551                           primary='true'
552                           datatype="text">
553                                 <label>Code</label>
554                                 <description>MARC Language Code</description>
555                         </field>
556                         <field
557                           name="value"
558                           widget-family="string-choose"
559                           datatype="text">
560                                 <label>Language Name</label>
561                                 <description>Name associated with the MARC code</description>
562                         </field>
563                 </fields>
564         </table>
565
566         <table id="generic_day_series" partition="false" fact-table="false">
567                 <label>Constant day series</label>
568                 <description>View providing a day series starting at 1900 and ending at 'now'</description>
569                 <tablename>reporter.date_series</tablename>
570
571                 <fields>
572                         <field
573                           name="date"
574                           primary='true'
575                           filterable='true'
576                           hidden='false'
577                           datatype="timestamptz">
578                                 <label>Date</label>
579                                 <description>Date</description>
580                         </field>
581                 </fields>
582         </table>
583
584         <table id="generic_hour_series" partition="false" fact-table="false">
585                 <label>Constant hour series</label>
586                 <description>View providing a hour series starting at 1900 and ending at 'now'</description>
587                 <tablename>reporter.date_hour_series</tablename>
588
589                 <fields>
590                         <field
591                           name="date_hour"
592                           primary='true'
593                           filterable='true'
594                           hidden='false'
595                           datatype="timestamptz">
596                                 <label>Date and Hour</label>
597                                 <description>Date and Hour</description>
598                         </field>
599                 </fields>
600         </table>
601
602         <table id="marc_form_map" partition="false" fact-table="false">
603                 <label>MARC Item Form Codes</label>
604                 <description>Table mapping MARC three character codes to Item Form names</description>
605                 <tablename>config.item_form_map</tablename>
606
607                 <fields>
608                         <field
609                           name="code"
610                           primary='true'
611                           datatype="text">
612                                 <label>Code</label>
613                                 <description>MARC Item Form Code</description>
614                         </field>
615                         <field
616                           name="value"
617                           widget-family="string-choose"
618                           datatype="text">
619                                 <label>Item Form Name</label>
620                                 <description>Name associated with the MARC code</description>
621                         </field>
622                 </fields>
623         </table>
624
625         <table id="marc_type_map" partition="false" fact-table="false">
626                 <label>MARC Item Type Codes</label>
627                 <description>Table mapping MARC three character codes to Item Type names</description>
628                 <tablename>config.item_type_map</tablename>
629
630                 <fields>
631                         <field
632                           name="code"
633                           primary='true'
634                           datatype="text">
635                                 <label>Code</label>
636                                 <description>MARC Item Type Code</description>
637                         </field>
638                         <field
639                           name="value"
640                           widget-family="string-choose"
641                           datatype="text">
642                                 <label>Item Type Name</label>
643                                 <description>Name associated with the MARC code</description>
644                         </field>
645                 </fields>
646         </table>
647
648         <!-- 
649
650         <table id="silly.fact" partition="true" fact-table="false">
651                 <label>Silly Fact table</label>
652                 <description>Base table for creating reports on silly words</description>
653                 <tablename>stats.silly_fact</tablename>
654
655                 <partition>
656                         <field>said_when</field>
657                         --><!-- Valid options:  years, months, weeks, days, hours, minutes, seconds  --><!--
658                         <chunk>months</chunk>
659                         <start>2005-09-01</start>
660                         <end>2005-12-31</end>
661                 </partition>
662
663                 <fields>
664                         <field
665                           name="id"
666                           primary="true"
667                           create-type="serial"
668                           datatype="int">
669                                 <label>Silly entry id</label>
670                                 <description>Silly entry id</description>
671                         </field>
672                         <field
673                           name="silly_word_dim"
674                           datatype="int"
675                           indexed="true">
676                                 <label>Silly word dim</label>
677                                 <description>Silly word entry dimension link</description>
678                         </field>
679                         <field
680                           name="silly_sayer_dim"
681                           datatype="int"
682                           indexed="true">
683                                 <label>Silly sayer dim</label>
684                                 <description>Silly sayer entry dimension link</description>
685                         </field>
686                         <field
687                           name="said_when"
688                           datatype="timestamptz"
689                           core="true"
690                           indexed="true"
691                           default="now()">
692                                 <label>Silly word timestamp</label>
693                                 <description>Silly word entry timestamp</description>
694                         </field>
695                 </fields>
696                 <links>
697                         <link
698                           field="silly_word_dim"
699                           table="silly.word_dim"
700                           key="id"
701                           type="has_a"/>
702                         <link
703                           field="silly_sayer_dim"
704                           table="silly.sayer_dim"
705                           key="id"
706                           type="has_a"/>
707                 </links>
708         </table>
709
710         <table id="silly.word_dim">
711                 <label>Silly word list</label>
712                 <description>Silly word list</description>
713                 <tablename>stats.words</tablename>
714                 <fields>
715                         <field
716                           name="id"
717                           primary="true"
718                           create-type="serial"
719                           datatype="int">
720                                 <label>Silly word id</label>
721                         </field>
722                         <field
723                           name="word"
724                           datatype="text"
725                           indexed="true"
726                           index-type="BTREE">
727                                 <label>Silly word</label>
728                         </field>
729                 </fields>
730         </table>
731
732         <table id="silly.sayer_dim">
733                 <label>Silly word sayer list</label>
734                 <description>Silly word sayer list</description>
735                 <tablename>stats.silly_sayers</tablename>
736                 <fields>
737                         <field
738                           name="id"
739                           primary="true"
740                           create-type="serial"
741                           datatype="int">
742                                 <label>Silly person id</label>
743                         </field>
744                         <field
745                           name="sayer"
746                           widget-family="string-choose"
747                           datatype="text"
748                           indexed="true"
749                           index-type="BTREE">
750                                 <label>Silly person</label>
751                         </field>
752                 </fields>
753         </table>
754
755         -->
756
757 </tables>
758