]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
New columns to acq.fund: balance_wqarning_percent and balance_stop_percent.
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 -->
23
24 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
25
26         <!-- Virtual classes -->
27         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
28                 <fields>
29                         <field name="usr" oils_persist:virtual="true" />
30                         <field name="forgive_payment" oils_persist:virtual="true" />
31                         <field name="work_payment" oils_persist:virtual="true" />
32                         <field name="credit_payment" oils_persist:virtual="true" />
33                         <field name="goods_payment" oils_persist:virtual="true" />
34                 </fields>
35                 <links>
36                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
37                 </links>
38         </class>
39
40         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
41                 <fields>
42                         <field name="workstation" oils_persist:virtual="true" />
43                         <field name="cash_payment" oils_persist:virtual="true" />
44                         <field name="check_payment" oils_persist:virtual="true" />
45                         <field name="credit_card_payment" oils_persist:virtual="true" />
46                 </fields>
47                 <links>
48                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
49                 </links>
50         </class>
51
52         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
53                 <fields>
54                         <field name="id" oils_persist:virtual="true" />
55                         <field name="children" oils_persist:virtual="true" />
56                         <field name="owner_doc" oils_persist:virtual="true" />
57                         <field name="intra_doc_id" oils_persist:virtual="true" />
58                         <field name="parent_node" oils_persist:virtual="true" />
59                         <field name="node_type" oils_persist:virtual="true" />
60                         <field name="namespace_uri" oils_persist:virtual="true" />
61                         <field name="name" oils_persist:virtual="true" />
62                         <field name="value" oils_persist:virtual="true" />
63                 </fields>
64         </class>
65
66         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
67                 <fields>
68                         <field name="title" oils_persist:virtual="true" />
69                         <field name="author" oils_persist:virtual="true" />
70                         <field name="doc_id" oils_persist:virtual="true" />
71                         <field name="doc_type" oils_persist:virtual="true" />
72                         <field name="pubdate" oils_persist:virtual="true" />
73                         <field name="isbn" oils_persist:virtual="true" />
74                         <field name="publisher" oils_persist:virtual="true" />
75                         <field name="tcn" oils_persist:virtual="true" />
76                         <field name="subject" oils_persist:virtual="true" />
77                         <field name="types_of_resource" oils_persist:virtual="true" />
78                         <field name="call_numbers" oils_persist:virtual="true" />
79                         <field name="edition" oils_persist:virtual="true" />
80                         <field name="online_loc" oils_persist:virtual="true" />
81                         <field name="synopsis" oils_persist:virtual="true" />
82                         <field name="physical_description" oils_persist:virtual="true" />
83                         <field name="toc" oils_persist:virtual="true" />
84                         <field name="copy_count" oils_persist:virtual="true" />
85                         <field name="series" oils_persist:virtual="true" />
86                         <field name="serials" oils_persist:virtual="true" />
87                 </fields>
88         </class>
89
90         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
91                 <fields>
92                         <field name="err_msg" oils_persist:virtual="true" />
93                         <field name="type" oils_persist:virtual="true" />
94                 </fields>
95         </class>
96
97         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
98                 <fields>
99                         <field name="err_msg" oils_persist:virtual="true" />
100                         <field name="type" oils_persist:virtual="true" />
101                 </fields>
102         </class>
103
104         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
105                 <fields oils_persist:primary="matchpoint">
106                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
107                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
108                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
109                 </fields>
110                 <links>
111                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
112                 </links>
113         </class>
114
115         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
116         <!-- when the time is right, turn me into a view.  -->
117                 <fields>
118             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
119             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
120             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
121             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
122             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
123             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
124             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
125             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
127             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
128                 </fields>
129         </class>
130
131
132         <!-- Actually in the DB -->
133         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
134                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
135                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
136                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
137                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
138                 </fields>
139                 <links>
140                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
141                 </links>
142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
143                         <actions>
144                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
145                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
146                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
147                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
148                         </actions>
149                 </permacrud>
150         </class>
151
152         <class id="vii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item" oils_persist:tablename="vandelay.import_item" reporter:label="Import Item">
153                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
154                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
155                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
156                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
157                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
158                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
159                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
160                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
161                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
162                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
163                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
164                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
165                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
166                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
167                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
168                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
169                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
170                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
171                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
172                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
173                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
174                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
175                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
176                 </fields>
177                 <links>
178                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
179                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
180                 </links>
181                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
182                         <actions>
183                                 <create permission="CREATE_IMPORT_ITEM">
184                     <context link="definition" field="owner"/>
185                                 </create>
186                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
187                     <context link="definition" field="owner"/>
188                                 </retrieve>
189                                 <update permission="UPDATE_IMPORT_ITEM">
190                     <context link="definition" field="owner"/>
191                                 </update>
192                                 <delete permission="DELETE_IMPORT_ITEM">
193                     <context link="definition" field="owner"/>
194                                 </delete>
195                         </actions>
196                 </permacrud>
197         </class>
198
199         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
200                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
201                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
202                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
203                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
204                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
205                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
206                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
207                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
208                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
209                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
210                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
211                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
212                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
213                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
214                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
215                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
216                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
217                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
218                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
219                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
220                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
221                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
222                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
223                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
224                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
225                 </fields>
226                 <links>
227                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
228                 </links>
229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
230                         <actions>
231                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
232                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
233                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
234                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
235                         </actions>
236                 </permacrud>
237         </class>
238
239         <class id="vbq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_queue" oils_persist:tablename="vandelay.bib_queue" reporter:label="Import/Overlay Bib Queue">
240                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
241                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
242                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
243                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
244                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
245                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
246                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
247                 </fields>
248                 <links>
249                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
250                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
251                 </links>
252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
253                         <actions>
254                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
255                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
256                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
257                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
258                         </actions>
259                 </permacrud>
260         </class>
261
262         <class id="vqbr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record" oils_persist:tablename="vandelay.queued_bib_record" reporter:label="Queued Bib Record">
263                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
264                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
265                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
266                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
267                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
268                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
269                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
270                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
271                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
272                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
273                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
274                 </fields>
275                 <links>
276                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
277                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
278                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
279             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
280             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
281                 </links>
282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
283                         <actions>
284                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
285                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
286                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
287                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
288                         </actions>
289                 </permacrud>
290         </class>
291
292         <class id="vqbrad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_attr_definition" oils_persist:tablename="vandelay.bib_attr_definition" reporter:label="Queued Bib Record Attribute Definition">
293                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
294                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
295                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
296                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
297                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
298                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
299                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
300                 </fields>
301                 <links/>
302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
303                         <actions>
304                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
305                 <retrieve/>
306                 <!--
307                                 <retrieve permission="CREATE_BIB_IMPORT_IMPORT_FIELD_DEF UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
308                 -->
309                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
310                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
311                         </actions>
312                 </permacrud>
313         </class>
314
315         <class id="vqbra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_bib_record_attr" oils_persist:tablename="vandelay.queued_bib_record_attr" reporter:label="Queued Bib Record Attribute">
316                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
317                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
318                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
319                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
320                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
321                 </fields>
322                 <links>
323                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
324                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
325                 </links>
326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
327                         <actions>
328                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
329                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
330                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
331                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
332                         </actions>
333                 </permacrud>
334         </class>
335
336         <class id="vbm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::bib_match" oils_persist:tablename="vandelay.bib_match" reporter:label="Queued Bib Record Match">
337                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
338                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
339                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
340                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
341                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
342                         <field reporter:label="Field Type" name="field_type" reporter:datatype="text"/>
343                 </fields>
344                 <links>
345                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
346                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
347                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
348                 </links>
349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
350                         <actions>
351                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
352                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
353                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
354                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
355                         </actions>
356                 </permacrud>
357         </class>
358
359         <class id="vaq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_queue" oils_persist:tablename="vandelay.authority_queue" reporter:label="Import/Overlay Authority Queue">
360                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
361                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
362                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
363                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
364                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
365                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
366                 </fields>
367                 <links>
368                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
369                 </links>
370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
371                         <actions>
372                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
373                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
374                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
375                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
376                         </actions>
377                 </permacrud>
378         </class>
379
380         <class id="vqar" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record" oils_persist:tablename="vandelay.queued_authority_record" reporter:label="Queued Authority Record">
381                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
382                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
383                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
384                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
385                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
386                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
387                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
388                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
389                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
390                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
391                 </fields>
392                 <links>
393                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
394                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
395             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
396             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
397                 </links>
398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
399                         <actions>
400                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
401                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
402                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
403                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <class id="vqarad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_attr_definition" oils_persist:tablename="vandelay.authority_attr_definition" reporter:label="Queued Authority Record Attribute Definition">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
412                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
413                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
414                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
415                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
416                 </fields>
417                 <links/>
418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
419                         <actions>
420                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
421                 <retrieve/>
422                 <!--
423                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
424                 -->
425                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
426                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
427                         </actions>
428                 </permacrud>
429         </class>
430
431         <class id="vqara" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::queued_authority_record_attr" oils_persist:tablename="vandelay.queued_authority_record_attr" reporter:label="Queued Authority Record Attribute">
432                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
433                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
434                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
435                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
436                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
437                 </fields>
438                 <links>
439                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
440                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
441                 </links>
442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
443                         <actions>
444                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
445                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
446                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
447                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
448                         </actions>
449                 </permacrud>
450         </class>
451
452         <class id="vam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::authority_match" oils_persist:tablename="vandelay.authority_match" reporter:label="Queued Authority Record Match">
453                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
454                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
455                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
456                         <field reporter:label="Matched Attribute" name="matched_attr" reporter:datatype="link"/>
457                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
458                 </fields>
459                 <links>
460                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
461                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
462                         <link field="matched_attr" reltype="has_a" key="id" map="" class="vqbra"/>
463                 </links>
464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
465                         <actions>
466                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
470                         </actions>
471                 </permacrud>
472         </class>
473
474
475         <class id="auoi" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_org_unit_opt_in" oils_persist:tablename="actor.usr_org_unit_opt_in" reporter:label="User Sharing Opt-in">
476                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
477                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
478                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
479                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
480                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
481                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
482                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
483                 </fields>
484                 <links>
485                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
486                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
487                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
488                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
489                 </links>
490         </class>
491
492     <class id="cin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::index_normalizer" oils_persist:tablename="config.index_normalizer" reporter:label="Indexing Normalizer" oils_persist:field_safe="true">
493         <fields oils_persist:primary="id">
494             <field reporter:label="ID" name="id" reporter:datatype="id"/>
495             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
496             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
497             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
498             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
499         </fields>
500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
501             <actions>
502                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
503                 <retrieve/>
504                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
505                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
506             </actions>
507         </permacrud>
508     </class>
509
510         <class id="cmfinm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_index_norm_map" oils_persist:tablename="config.metabib_field_index_norm_map" reporter:label="Metabib Field to Indexing Normalizer Map" oils_persist:field_safe="true">
511                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
512                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
513                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
514                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
515                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
516                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
517                 </fields>
518                 <links>
519                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
520                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
521                 </links>
522         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
523             <actions>
524                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
525                 <retrieve/>
526                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
527                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
528             </actions>
529         </permacrud>
530         </class>
531
532         <class id="cracct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::remote_account" oils_persist:tablename="config.remote_account" reporter:label="Remote (3rd party) Account">
533                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
534                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
535                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
536                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
537                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
538                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
539                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
540                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
541                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
542                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
543                 </fields>
544                 <links>
545                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
546                 </links>
547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
548             <actions>
549                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
550                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
551                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
552                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
553             </actions>
554         </permacrud>
555         </class>
556
557     <class id="czs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_source" oils_persist:tablename="config.z3950_source" reporter:label="Z39.50 Source">
558         <fields oils_persist:primary="name">
559             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
560             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
561             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
562             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
563             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
564             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
565             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
566             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
567             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
568         </fields>
569         <links>
570             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
571         </links>
572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
573             <actions>
574                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
575                 <retrieve/>
576                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
577                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
578             </actions>
579         </permacrud>
580     </class>
581
582     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
583         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
584             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
585             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
586             <field reporter:label="Name" name="name" reporter:datatype="text"/>
587             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
588             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
589             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
590             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
591         </fields>
592         <links>
593             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
594         </links>
595     </class>
596
597         <class id="ateo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_output" oils_persist:tablename="action_trigger.event_output" reporter:label="Event Output">
598                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
599                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
600                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
601                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
602                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
603                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
604                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
605                 </fields>
606                 <links>
607             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
608             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <retrieve/>
613                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
614                         </actions>
615                 </permacrud>
616         </class>
617
618         <class id="ath" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::hook" oils_persist:tablename="action_trigger.hook" reporter:label="Trigger Hook Point">
619                 <fields oils_persist:primary="key">
620                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
621                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
622                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
623                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
624                 </fields>
625                 <links/>
626                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
627                         <actions>
628                                 <create permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
629                                 <retrieve/>
630                                 <update permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
631                                 <delete permission="ADMIN_TRIGGER_HOOK" global_required="true"/>
632                         </actions>
633                 </permacrud>
634         </class>
635
636         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
637                 <fields oils_persist:primary="module">
638                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
639                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
640                 </fields>
641                 <links/>
642         </class>
643
644         <class id="atval" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::validator" oils_persist:tablename="action_trigger.validator" reporter:label="Trigger Condition Validator">
645                 <fields oils_persist:primary="module">
646                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
647                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
648                 </fields>
649                 <links/>
650                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
651                         <actions>
652                                 <create permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
653                                 <retrieve/>
654                                 <update permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
655                                 <delete permission="ADMIN_TRIGGER_VALIDATOR" global_required="true"/>
656                         </actions>
657                 </permacrud>
658         </class>
659
660         <class id="atreact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::reactor" oils_persist:tablename="action_trigger.reactor" reporter:label="Trigger Event Reactor">
661                 <fields oils_persist:primary="module">
662                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
663                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
664                 </fields>
665                 <links/>
666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
667                         <actions>
668                                 <create permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
669                                 <retrieve/>
670                                 <update permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
671                                 <delete permission="ADMIN_TRIGGER_REACTOR" global_required="true"/>
672                         </actions>
673                 </permacrud>
674         </class>
675
676         <class id="atclean" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::cleanup" oils_persist:tablename="action_trigger.cleanup" reporter:label="Trigger Event Cleanup">
677                 <fields oils_persist:primary="module">
678                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
679                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
680                 </fields>
681                 <links/>
682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
683                         <actions>
684                                 <create permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
685                                 <retrieve/>
686                                 <update permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
687                                 <delete permission="ADMIN_TRIGGER_CLEANUP" global_required="true"/>
688                         </actions>
689                 </permacrud>
690         </class>
691
692         <class id="atenv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::environment" oils_persist:tablename="action_trigger.environment" reporter:label="Trigger Event Environment Entry">
693                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
694                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
695                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
696                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
697                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
698                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
699                 </fields>
700                 <links>
701                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
702                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
703                 </links>
704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
705                         <actions>
706                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
707                     <context link="event_def" field="owner"/>
708                 </create>
709                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
710                     <context link="event_def" field="owner"/>
711                 </retrieve>
712                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
713                     <context link="event_def" field="owner"/>
714                 </update>
715                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
716                     <context link="event_def" field="owner"/>
717                 </delete>
718                         </actions>
719                 </permacrud>
720         </class>
721
722         <class id="atevdef" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_definition" oils_persist:tablename="action_trigger.event_definition" reporter:label="Trigger Event Definition">
723                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
724                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
725                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
726                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
727                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
728                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
729                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
730                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
731                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
732                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
733                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
734                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
735                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
736                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
737                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
738                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
739                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
740                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
741                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
742                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
743                 </fields>
744                 <links>
745                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
746                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
747                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
748                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
749                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
750                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
751                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
752                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
753                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
754                 </links>
755                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756                         <actions>
757                                 <create permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
758                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
759                                 <update permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
760                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF" context_field="owner"/>
761                         </actions>
762                 </permacrud>
763         </class>
764
765         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
766                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
767                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
768                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
769                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
770                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
771                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
772                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
773                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
774                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
775                         <field reporter:label="State" name="state" reporter:datatype="text"/>
776                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
777                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
778                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
779                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
780                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
781                 </fields>
782                 <links>
783                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
784                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
785                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
786                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
787                 </links>
788         </class>
789
790         <class id="atevparam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::event_param" oils_persist:tablename="action_trigger.event_params" reporter:label="Trigger Event Parameter">
791                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
792                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
793                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
794                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
795                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
796                 </fields>
797                 <links>
798                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
799                 </links>
800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
801                         <actions>
802                                 <create permission="ADMIN_TRIGGER_EVENT_DEF">
803                     <context link="event_def" field="owner"/>
804                 </create>
805                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF">
806                     <context link="event_def" field="owner"/>
807                 </retrieve>
808                                 <update permission="ADMIN_TRIGGER_EVENT_DEF">
809                     <context link="event_def" field="owner"/>
810                 </update>
811                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF">
812                     <context link="event_def" field="owner"/>
813                 </delete>
814                         </actions>
815                 </permacrud>
816         </class>
817
818         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
819                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
820                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
821                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
822                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
823                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
824                 </fields>
825                 <links>
826                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
827                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
828                 </links>
829         </class>
830
831         <class id="ccm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_modifier" oils_persist:tablename="config.circ_modifier" reporter:label="Circulation Modifier">
832                 <fields oils_persist:primary="code">
833                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
834                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
835                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
836                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
837                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
838                 </fields>
839                 <links/>
840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
841             <actions>
842                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
843                 <retrieve/>
844                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
845                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
846             </actions>
847         </permacrud>
848         </class>
849
850         <class id="ccpbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_type" oils_persist:tablename="container.copy_bucket_type" reporter:label="Copy Bucket Type" oils_persist:field_safe="true">
851                 <fields oils_persist:primary="code">
852                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
853                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
854                 </fields>
855                 <links/>
856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
857             <actions>
858                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
859                 <retrieve permission="CREATE_COPY_BTYPE UPDATE_COPY_BTYPE DELETE_COPY_BTYPE" global_required="true"/>
860                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
861                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
862             </actions>
863         </permacrud>
864         </class>
865
866         <class id="ccnbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::call_number_bucket_type" oils_persist:tablename="container.call_number_bucket_type" reporter:label="Call Number Bucket Type" oils_persist:field_safe="true">
867                 <fields oils_persist:primary="code">
868                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
869                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
870                 </fields>
871                 <links/>
872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
873             <actions>
874                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
875                 <retrieve permission="CREATE_CN_BTYPE UPDATE_CN_BTYPE DELETE_CN_BTYPE" global_required="true"/>
876                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
877                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
878             </actions>
879         </permacrud>
880         </class>
881
882         <class id="cbrebt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::biblio_record_entry_bucket_type" oils_persist:tablename="container.biblio_record_entry_bucket_type" reporter:label="Bibliographic Record Bucket Type" oils_persist:field_safe="true">
883                 <fields oils_persist:primary="code">
884                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
885                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
886                 </fields>
887                 <links/>
888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
889             <actions>
890                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
891                 <retrieve permission="CREATE_BIB_BTYPE UPDATE_BIB_BTYPE DELETE_BIB_BTYPE" global_required="true"/>
892                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
893                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
894             </actions>
895         </permacrud>
896         </class>
897
898         <class id="cubt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::user_bucket_type" oils_persist:tablename="container.user_bucket_type" reporter:label="User Bucket Type" oils_persist:field_safe="true">
899                 <fields oils_persist:primary="code">
900                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
901                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
902                 </fields>
903                 <links/>
904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
905             <actions>
906                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
907                 <retrieve permission="CREATE_USER_BTYPE UPDATE_USER_BTYPE DELETE_USER_BTYPE" global_required="true"/>
908                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
909                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
910             </actions>
911         </permacrud>
912         </class>
913
914         <class id="cvrfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::videorecording_format_map" oils_persist:tablename="config.videorecording_format_map" reporter:label="Videorecording Format" oils_persist:field_safe="true">
915                 <fields oils_persist:primary="code">
916                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
917                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
918                 </fields>
919                 <links/>
920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
921             <actions>
922                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
923                 <retrieve/>
924                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
925                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
926             </actions>
927         </permacrud>
928         </class>
929
930         <class id="chmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_matchpoint" oils_persist:tablename="config.hold_matrix_matchpoint" reporter:label="Hold Matrix Matchpoint">
931                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
932                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
933                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
934                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
935                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
936                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
937                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
938                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
939                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
940                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
941                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
942                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
943                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
944                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
945                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
946                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
947                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
948                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
949                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
950                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
951                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
952                 </fields>
953                 <links>
954                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
955                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
956                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
957                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
958                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
959                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
960                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
961                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
962                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
963                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
964                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
965                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
966             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
967                 </links>
968         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
969             <actions>
970                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
971                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
972                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
973                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
974             </actions>
975         </permacrud>
976         </class>
977
978         <class id="ccmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_matchpoint" oils_persist:tablename="config.circ_matrix_matchpoint" reporter:label="Circulation Matrix Matchpoint">
979                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
980                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
981                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
982                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
983                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
984                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link"/>
985                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
986                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
987                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
988                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
989                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
990                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
991                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
992                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
993                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
994                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
995                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
996                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
997                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
998                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
999                 </fields>
1000                 <links>
1001                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1002                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1003                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1004                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1005                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1006                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1007                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1008                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1009                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1010                 </links>
1011         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1012             <actions>
1013                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1014                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1015                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1016                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1017             </actions>
1018         </permacrud>
1019         </class>
1020
1021         <class id="ccmcmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test" oils_persist:tablename="config.circ_matrix_circ_mod_test" reporter:label="Circulation Matrix Circulation Modifier Subtest">
1022                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1023                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1024                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1025                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1026                 </fields>
1027                 <links>
1028                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1029                 </links>
1030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1031             <actions>
1032                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1033                     <context link="matchpoint" field="org_unit"/>
1034                 </create>
1035                 <retrieve/>
1036                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1037                     <context link="matchpoint" field="org_unit"/>
1038                 </update>
1039                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1040                     <context link="matchpoint" field="org_unit"/>
1041                 </delete>
1042             </actions>
1043         </permacrud>
1044         </class>
1045
1046         <class id="ccmcmtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_circ_mod_test_map" oils_persist:tablename="config.circ_matrix_circ_mod_test_map" reporter:label="Circulation Matrix Circulation Modifier Subtest Circulation Modifier Set">
1047                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1048                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1049                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1050                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1051                 </fields>
1052                 <links>
1053                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1054                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1055                 </links>
1056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1057             <actions>
1058                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1059                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1060                 </create>
1061                 <retrieve/>
1062                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1063                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1064                 </update>
1065                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1066                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1067                 </delete>
1068             </actions>
1069         </permacrud>
1070         </class>
1071
1072         <class id="cit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::identification_type" oils_persist:tablename="config.identification_type" reporter:label="Identification Type">
1073                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1074                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1075                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1076                 </fields>
1077                 <links/>
1078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1079             <actions>
1080                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1081                 <retrieve/>
1082                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1083                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1084             </actions>
1085         </permacrud>
1086         </class>
1087
1088         <class id="asvq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_question" oils_persist:tablename="action.survey_question" reporter:label="User Survey Question">
1089                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1090                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1091                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1092                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1093                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1094                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1095                 </fields>
1096                 <links>
1097                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1098                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1099                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1100                 </links>
1101         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1102             <actions>
1103                 <create permission="ADMIN_SURVEY">
1104                     <context link="survey" field="owner"/>
1105                 </create>
1106                 <retrieve/>
1107                 <update permission="ADMIN_SURVEY">
1108                     <context link="survey" field="owner"/>
1109                 </update>
1110                 <delete permission="ADMIN_SURVEY">
1111                     <context link="survey" field="owner"/>
1112                 </delete>
1113             </actions>
1114         </permacrud>
1115         </class>
1116         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1117                 <fields oils_persist:primary="id" oils_persist:sequence="">
1118                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1119                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1120                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1121                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1122                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1123                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1124                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1125                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1126                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1127                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1128                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1129                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1130                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1131                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1132                 </fields>
1133                 <links>
1134                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1135                 </links>
1136         </class>
1137         <class id="mbtslv" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary_location_view" oils_persist:tablename="money.billable_xact_summary_location_view" reporter:label="Billable Transaction Summary with Billing Location" oils_persist:readonly="true" reporter:core="true">
1138                 <fields oils_persist:primary="id" oils_persist:sequence="">
1139                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1140                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1141                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1142                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1143                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1144                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1145                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1146                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1147                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1148                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1149                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1150                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1151                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1152                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1153                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1154                 </fields>
1155                 <links>
1156                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1157                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1158                 </links>
1159         </class>
1160         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1161                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1162                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1163                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1164                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1165                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1166                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1167                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1168                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1169                 </fields>
1170                 <links>
1171                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1172                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1173                 </links>
1174         </class>
1175         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1176                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1177                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1178                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1179                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1180                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1181                 </fields>
1182                 <links>
1183                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1184                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1185                 </links>
1186         </class>
1187         <class id="mafe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::author_field_entry" oils_persist:tablename="metabib.author_field_entry" reporter:label="Author Field Entry">
1188                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1189                         <field name="field" reporter:datatype="link"/>
1190                         <field name="id" reporter:datatype="id" />
1191                         <field name="source" reporter:datatype="link"/>
1192                         <field name="value" reporter:datatype="text"/>
1193                 </fields>
1194                 <links>
1195                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1196                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1197                 </links>
1198         </class>
1199         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
1200                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1201                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1202                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1203                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1204                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1205                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1206                 </fields>
1207                 <links>
1208                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1209                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1210                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1211                 </links>
1212         </class>
1213         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
1214                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1215                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1216                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1217                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1218                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1219                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1220                 </fields>
1221                 <links>
1222                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1223                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1224                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1225                 </links>
1226         </class>
1227         <class id="atc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::transit_copy" oils_persist:tablename="action.transit_copy" reporter:core="true" reporter:label="Copy Transit">
1228                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1229                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1230                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1231                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1232                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1233                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1234                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1235                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1236                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1237                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1238                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1239                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1240                 </fields>
1241                 <links>
1242                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1243                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1244                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1245                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1246                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1247                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1248                 </links>
1249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1250             <actions>
1251                 <create permission="TRANSIT_COPY" context_field="owner">
1252                     <context link="target_copy" field="circ_lib"/>
1253                 </create>
1254                 <retrieve/>
1255                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1256                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1257             </actions>
1258         </permacrud>
1259         </class>
1260         <class id="asvr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_response" oils_persist:tablename="action.survey_response" reporter:label="Survey Response">
1261                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1262                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1263                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1264                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1265                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1266                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1267                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1268                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1269                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1270                 </fields>
1271                 <links>
1272                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1273                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1274                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1275                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1276                 </links>
1277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1278             <actions>
1279                 <create permission="ADMIN_SURVEY">
1280                     <context link="survey" field="owner"/>
1281                 </create>
1282                 <retrieve/>
1283                 <update permission="ADMIN_SURVEY">
1284                     <context link="survey" field="owner"/>
1285                 </update>
1286                 <delete permission="ADMIN_SURVEY">
1287                     <context link="survey" field="owner"/>
1288                 </delete>
1289             </actions>
1290         </permacrud>
1291         </class>
1292         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
1293                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1294                         <field name="bucket" />
1295                         <field name="id" reporter:datatype="id" />
1296                         <field name="target_copy" reporter:datatype="link"/>
1297                         <field name="create_time" reporter:datatype="timestamp" />
1298                         <field name="pos" reporter:datatype="int" />
1299                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1300                 </fields>
1301                 <links>
1302                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1303                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1304             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1305                 </links>
1306         </class>
1307         <class id="ccbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item_note" oils_persist:tablename="container.copy_bucket_item_note" reporter:label="Copy Bucket Item Note">
1308                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1309                         <field name="id" reporter:datatype="id" />
1310                         <field name="item" reporter:datatype="link"/>
1311                         <field name="note" reporter:datatype="text" />
1312                 </fields>
1313                 <links>
1314                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1315                 </links>
1316         </class>
1317         <class id="are" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1318                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1319                         <field name="active" reporter:datatype="bool"/>
1320                         <field name="arn_source" />
1321                         <field name="arn_value" />
1322                         <field name="create_date" reporter:datatype="timestamp"/>
1323                         <field name="creator" />
1324                         <field name="deleted" reporter:datatype="bool"/>
1325                         <field name="edit_date" reporter:datatype="timestamp"/>
1326                         <field name="editor" />
1327                         <field name="id" reporter:datatype="id" />
1328                         <field name="last_xact_id" />
1329                         <field name="marc" />
1330                         <field name="source" />
1331                         <field name="fixed_fields" oils_persist:virtual="true" />
1332                         <field name="notes" oils_persist:virtual="true" />
1333                 </fields>
1334                 <links>
1335                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1336                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1337                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1338                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1339                 </links>
1340         </class>
1341         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1342                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1343                         <field name="char_encoding" />
1344                         <field name="id" />
1345                         <field name="record" />
1346                         <field name="record_status" />
1347                 </fields>
1348                 <links>
1349                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1350                 </links>
1351         </class>
1352         <class id="clm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::language_map" oils_persist:tablename="config.language_map" reporter:label="Language Map" oils_persist:field_safe="true">
1353                 <fields oils_persist:primary="code" oils_persist:sequence="">
1354                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1355                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359             <actions>
1360                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1361                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1362                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1363                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1364             </actions>
1365         </permacrud>
1366         </class>
1367         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
1368                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1369                         <field name="accepting_usr" />
1370                         <field name="amount" reporter:datatype="money" />
1371                         <field name="amount_collected" reporter:datatype="money" />
1372                         <field name="approval_code" reporter:datatype="text"/>
1373                         <field name="cash_drawer" reporter:datatype="link"/>
1374                         <field name="cc_number" reporter:datatype="text"/>
1375                         <field name="cc_type" reporter:datatype="text"/>
1376                         <field name="cc_processor" reporter:datatype="text"/>
1377                         <field name="expire_month" reporter:datatype="int" />
1378                         <field name="expire_year" reporter:datatype="int" />
1379                         <field name="id" reporter:datatype="id" />
1380                         <field name="note" reporter:datatype="text"/>
1381                         <field name="payment_ts" reporter:datatype="timestamp"/>
1382                         <field name="xact" reporter:datatype="link"/>
1383                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1384                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1385                 </fields>
1386                 <links>
1387                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
1388                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
1389                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
1390                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
1391                 </links>
1392         </class>
1393         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
1394                 <fields oils_persist:primary="name">
1395                         <field reporter:label="Field Class" name="field_class" />
1396                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1397                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
1398                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
1399                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
1400                 </fields>
1401                 <links/>
1402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1403             <actions>
1404                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
1405                 <retrieve/>
1406                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
1407                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
1408             </actions>
1409         </permacrud>
1410         </class>
1411         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field">
1412                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
1413                         <field name="field_class" />
1414                         <field name="id" reporter:datatype="id" />
1415                         <field name="name" reporter:datatype="text"/>
1416                         <field name="xpath" reporter:datatype="text"/>
1417                         <field name="weight" reporter:datatype="int" />
1418                         <field name="format" reporter:datatype="link"/>
1419                         <field name="search_field" reporter:datatype="bool" />
1420                         <field name="facet_field" reporter:datatype="bool" />
1421                 </fields>
1422                 <links/>
1423         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1424             <actions>
1425                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
1426                 <retrieve/>
1427                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
1428                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
1429             </actions>
1430         </permacrud>
1431         </class>
1432         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
1433                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
1434                         <field name="id" reporter:datatype="id" />
1435                         <field name="name" reporter:datatype="text"/>
1436                         <field name="xpath" reporter:datatype="text"/>
1437                         <field name="format" reporter:datatype="link"/>
1438                         <field name="first_word" reporter:datatype="bool" />
1439                 </fields>
1440                 <links/>
1441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1442             <actions>
1443                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
1444                 <retrieve/>
1445                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
1446                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
1447             </actions>
1448         </permacrud>
1449         </class>
1450         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
1451                 <fields oils_persist:primary="code" oils_persist:sequence="">
1452                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1453                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1454                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1455                 </fields>
1456                 <links/>
1457         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1458             <actions>
1459                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1460                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
1461                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1462                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1463             </actions>
1464         </permacrud>
1465         </class>
1466         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
1467                 <fields oils_persist:primary="code" oils_persist:sequence="">
1468                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1469                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
1470                 </fields>
1471                 <links/>
1472         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1473             <actions>
1474                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1475                 <retrieve/>
1476                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1477                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1478             </actions>
1479         </permacrud>
1480         </class>
1481         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
1482                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
1483                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
1484                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
1485                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
1486                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1487                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
1488                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1489                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
1490                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
1491                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1492                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
1493                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1494                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1495                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
1496                 </fields>
1497                 <links>
1498                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1499                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1500                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1501                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1502                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
1503                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
1504                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
1505                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
1506                 </links>
1507         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1508             <actions>
1509                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
1510                 <retrieve/>
1511                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
1512                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
1513             </actions>
1514         </permacrud>
1515         </class>
1516         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
1517                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
1518                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
1519                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
1520                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1521                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
1522                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1523                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
1524                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1525                 </fields>
1526                 <links>
1527                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
1528                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
1529         </links>
1530         </class>
1531         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
1532                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
1533                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1534                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
1535                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
1536                 </fields>
1537                 <links>
1538                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
1539                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
1540                 </links>
1541         </class>
1542         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
1543                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
1544                         <field name="id" reporter:datatype="id" />
1545                         <field name="value" oils_persist:i18n="true" />
1546                 </fields>
1547                 <links/>
1548         </class>
1549         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
1550                 <fields oils_persist:primary="usr" oils_persist:sequence="">
1551                         <field name="balance_owed" reporter:datatype="money" />
1552                         <field name="total_owed" reporter:datatype="money" />
1553                         <field name="total_paid" reporter:datatype="money" />
1554                         <field name="usr" reporter:datatype="link"/>
1555                 </fields>
1556                 <links>
1557                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1558         </links>
1559         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1560             <actions>
1561                 <retrieve permission="VIEW_USER">
1562                     <context link="usr" field="home_ou"/>
1563                 </retrieve>
1564             </actions>
1565         </permacrud>
1566         </class>
1567         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
1568                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
1569                         <field name="collector" />
1570                         <field name="enter_time" reporter:datatype="timestamp"/>
1571                         <field name="id" reporter:datatype="id" />
1572                         <field name="location" reporter:datatype="link"/>
1573                         <field name="usr" reporter:datatype="link"/>
1574                 </fields>
1575                 <links>
1576                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1577                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
1578                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
1579                 </links>
1580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1581             <actions>
1582                 <create permission="money.collections_tracker.create" context_field="location"/>
1583                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
1584                 <delete permission="money.collections_tracker.create" context_field="location"/>
1585             </actions>
1586         </permacrud>
1587         </class>
1588         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
1589                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
1590                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
1591                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1592                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
1593                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1594                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
1595                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
1596                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
1597                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
1598                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
1599                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
1600                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
1601                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
1602                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
1603                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
1604                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
1605                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
1606                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
1607                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
1608                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1609                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1610                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1611                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1612                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1613                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1614                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1615                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
1616                 </fields>
1617                 <links>
1618                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1619                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1620                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
1621                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
1622                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
1623                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
1624                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
1625                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
1626                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
1627                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
1628                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
1629                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
1630                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
1631                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
1632                 </links>
1633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1634             <actions>
1635                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1636                 <retrieve/>
1637                 <update permission="UPDATE_MARC" global_required="true"/>
1638             </actions>
1639         </permacrud>
1640         </class>
1641         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
1642                 <fields oils_persist:primary="id">
1643                         <field name="dow_0_close" />
1644                         <field name="dow_0_open" />
1645                         <field name="dow_1_close" />
1646                         <field name="dow_1_open" />
1647                         <field name="dow_2_close" />
1648                         <field name="dow_2_open" />
1649                         <field name="dow_3_close" />
1650                         <field name="dow_3_open" />
1651                         <field name="dow_4_close" />
1652                         <field name="dow_4_open" />
1653                         <field name="dow_5_close" />
1654                         <field name="dow_5_open" />
1655                         <field name="dow_6_close" />
1656                         <field name="dow_6_open" />
1657                         <field name="id" reporter:datatype="id" />
1658                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
1659                 </fields>
1660                 <links>
1661                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
1662                 </links>
1663         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1664             <actions>
1665                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
1666                 <retrieve/>
1667                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
1668                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
1669             </actions>
1670         </permacrud>
1671         </class>
1672         <class id="aoucd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::closed_date" oils_persist:tablename="actor.org_unit_closed" reporter:label="Closed Dates">
1673                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
1674                         <field name="close_end" reporter:datatype="timestamp" />
1675                         <field name="close_start" reporter:datatype="timestamp" />
1676                         <field name="id" reporter:datatype="id" />
1677                         <field name="org_unit" reporter:datatype="org_unit"/>
1678                         <field name="reason" reporter:datatype="text"/>
1679                 </fields>
1680                 <links>
1681                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1682                 </links>
1683         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1684             <actions>
1685                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1686                 <retrieve/>
1687                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1688                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
1689             </actions>
1690         </permacrud>
1691         </class>
1692         <class id="crcd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::circ_duration" oils_persist:tablename="config.rule_circ_duration" reporter:label="Circulation Duration Rule">
1693                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
1694                         <field name="extended" reporter:datatype="interval"/>
1695                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
1696                         <field name="max_renewals" reporter:datatype="int" />
1697                         <field name="name" reporter:datatype="text"/>
1698                         <field name="normal" reporter:datatype="interval"/>
1699                         <field name="shrt" reporter:datatype="interval"/>
1700                 </fields>
1701                 <links>
1702                 </links>
1703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1704             <actions>
1705                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
1706                 <retrieve/>
1707                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
1708                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
1709             </actions>
1710         </permacrud>
1711         </class>
1712         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
1713                 <fields oils_persist:primary="id" oils_persist:sequence="">
1714                         <field name="balance_owed" reporter:datatype="money"/>
1715                         <field name="id" reporter:datatype="id" />
1716                         <field name="last_billing_note" reporter:datatype="text"/>
1717                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
1718                         <field name="last_billing_type" reporter:datatype="text"/>
1719                         <field name="last_payment_note" reporter:datatype="text"/>
1720                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
1721                         <field name="last_payment_type" reporter:datatype="text"/>
1722                         <field name="total_owed" reporter:datatype="money"/>
1723                         <field name="total_paid" reporter:datatype="money"/>
1724                         <field name="usr" reporter:datatype="link"/>
1725                         <field name="xact_finish" reporter:datatype="timestamp" />
1726                         <field name="xact_start" reporter:datatype="timestamp" />
1727                         <field name="xact_type" reporter:datatype="text"/>
1728                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
1729                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
1730                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
1731                         <field name="billing_location" reporter:datatype="link"/>
1732                 </fields>
1733                 <links>
1734                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1735                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
1736                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
1737                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
1738                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1739                 </links>
1740         </class>
1741         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
1742                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
1743                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
1744                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
1745                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
1746                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
1747                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
1748                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
1749                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
1750                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
1751                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
1752                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
1753                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
1754                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1755                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
1756                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
1757                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
1758                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
1759                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
1760                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
1761                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1762                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
1763                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
1764                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
1765                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
1766                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
1767                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
1768                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
1769                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
1770                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
1771                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
1772                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
1773                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
1774                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
1775                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
1776                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
1777                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
1778                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
1779                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
1780                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
1781                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
1782                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
1783                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
1784                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
1785                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
1786                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
1787                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
1788                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
1789                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
1790                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
1791                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
1792                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
1793                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
1794                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
1795                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1796                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
1797                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
1798                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1799                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
1800                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
1801                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1802                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
1803                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
1804                 </fields>
1805                 <links>
1806                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
1807                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
1808                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
1809                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
1810                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
1811                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
1812                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
1813                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
1814                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
1815                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
1816                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
1817                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
1818                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
1819                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
1820                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
1821                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
1822                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
1823                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
1824                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
1825                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
1826                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
1827                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
1828                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
1829                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
1830                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
1831                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
1832                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
1833                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
1834                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
1835                 </links>
1836         </class>
1837
1838         <class id="cust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_setting_type" oils_persist:tablename="config.usr_setting_type" reporter:label="User Setting Type">
1839                 <fields oils_persist:primary="name">
1840                         <field name="name" reporter:datatype="text"/>
1841                         <field name="label" reporter:datatype="text"/>
1842                         <field name="description" reporter:datatype="text"/>
1843                         <field name="datatype" reporter:datatype="text"/>
1844                         <field name="fm_class" reporter:datatype="text"/>
1845                 </fields>
1846                 <links>
1847                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
1848                 </links>
1849                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1850                         <actions>
1851                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1852                                 <retrieve/>
1853                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1854                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
1855                         </actions>
1856                 </permacrud>
1857         </class>
1858         <class id="coust" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type" oils_persist:tablename="config.org_unit_setting_type" reporter:label="Organizational Unit Setting Type">
1859                 <fields oils_persist:primary="name">
1860                         <field name="name" reporter:datatype="text"/>
1861                         <field name="label" reporter:datatype="text"/>
1862                         <field name="description" reporter:datatype="text"/>
1863                         <field name="datatype" reporter:datatype="text"/>
1864                         <field name="view_perm" reporter:datatype="link"/>
1865                         <field name="update_perm" reporter:datatype="link"/>
1866                         <field name="fm_class" reporter:datatype="text"/>
1867                 </fields>
1868                 <links>
1869                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
1870                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
1871                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
1872                 </links>
1873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1874                         <actions>
1875                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1876                                 <retrieve/>
1877                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1878                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
1879                         </actions>
1880                 </permacrud>
1881         </class>
1882         <class id="aous" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_setting" oils_persist:tablename="actor.org_unit_setting" reporter:label="Organizational Unit Setting">
1883                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
1884                         <field name="id" />
1885                         <field name="name"  reporter:datatype="text"/>
1886                         <field name="org_unit" reporter:datatype="org_unit"/>
1887                         <field name="value"  reporter:datatype="text"/>
1888                 </fields>
1889                 <links>
1890                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1891                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
1892                 </links>
1893         </class>
1894         <class id="acpn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_note" oils_persist:tablename="asset.copy_note" reporter:label="Copy Note">
1895                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
1896                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1897                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
1898                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1899                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
1900                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1901                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
1902                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
1903                 </fields>
1904                 <links>
1905                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
1906                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1907                 </links>
1908         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1909             <actions>
1910                 <create permission="CREATE_COPY_NOTE">
1911                     <context link="owning_copy" field="circ_lib"/>
1912                 </create>
1913                 <retrieve permission="VIEW_COPY_NOTES">
1914                     <context link="owning_copy" field="circ_lib"/>
1915                 </retrieve>
1916                 <update permission="UPDATE_COPY_NOTE">
1917                     <context link="owning_copy" field="circ_lib"/>
1918                 </update>
1919                 <delete permission="DELETE_COPY_NOTE">
1920                     <context link="owning_copy" field="circ_lib"/>
1921                 </delete>
1922             </actions>
1923         </permacrud>
1924         </class>
1925         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
1926                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
1927                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
1928                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
1929                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
1930                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
1931                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
1932                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
1933                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
1934                 </fields>
1935                 <links>
1936                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
1937                 </links>
1938         </class>
1939         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
1940                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
1941                         <field name="fingerprint"  reporter:datatype="text"/>
1942                         <field name="id" reporter:datatype="id" />
1943                         <field name="master_record" reporter:datatype="link"/>
1944                         <field name="mods"  reporter:datatype="text"/>
1945                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
1946                 </fields>
1947                 <links>
1948                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
1949                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
1950                 </links>
1951         </class>
1952         <class id="cnal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::net_access_level" oils_persist:tablename="config.net_access_level" reporter:label="Net Access Level">
1953                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
1954                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
1955                         <field name="name"  reporter:datatype="text"/>
1956                 </fields>
1957                 <links/>
1958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1959             <actions>
1960                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
1961                 <retrieve/>
1962                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
1963                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
1964             </actions>
1965         </permacrud>
1966         </class>
1967         <class id="ppl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::perm_list" oils_persist:tablename="permission.perm_list" reporter:label="Permission List">
1968                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
1969                         <field name="code"  reporter:datatype="text"/>
1970                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
1971                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
1972                 </fields>
1973                 <links/>
1974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1975             <actions>
1976                 <create permission="CREATE_PERM" global_required="true"/>
1977                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
1978                 <update permission="UPDATE_PERM" global_required="true"/>
1979                 <delete permission="DELETE_PERM" global_required="true"/>
1980             </actions>
1981         </permacrud>
1982         </class>
1983         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
1984                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
1985                         <field name="id" reporter:datatype="id" />
1986                         <field name="metarecord" reporter:datatype="link"/>
1987                         <field name="source" reporter:datatype="link"/>
1988                 </fields>
1989                 <links>
1990                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1991                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
1992                 </links>
1993         </class>
1994         <class id="mkfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::keyword_field_entry" oils_persist:tablename="metabib.keyword_field_entry" reporter:label="Keyword Field Entry">
1995                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
1996                         <field name="field" reporter:datatype="link"/>
1997                         <field name="id" reporter:datatype="id" />
1998                         <field name="source" reporter:datatype="link"/>
1999                         <field name="value"  reporter:datatype="text"/>
2000                 </fields>
2001                 <links>
2002                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2003                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2004                 </links>
2005         </class>
2006         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2007                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2008                         <field name="accepting_usr" reporter:datatype="link"/>
2009                         <field name="amount" reporter:datatype="money" />
2010                         <field name="amount_collected" reporter:datatype="money" />
2011                         <field name="cash_drawer" reporter:datatype="link"/>
2012                         <field name="id" reporter:datatype="id" />
2013                         <field name="note"  reporter:datatype="text"/>
2014                         <field name="payment_ts" reporter:datatype="timestamp"/>
2015                         <field name="xact" reporter:datatype="link"/>
2016                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2017                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2018                 </fields>
2019                 <links>
2020                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2021                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2022                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2023                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2024                 </links>
2025         </class>
2026         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2027                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2028                         <field name="accepting_usr" reporter:datatype="link"/>
2029                         <field name="amount" reporter:datatype="money" />
2030                         <field name="amount_collected" reporter:datatype="money" />
2031                         <field name="id" reporter:datatype="id" />
2032                         <field name="note"  reporter:datatype="text"/>
2033                         <field name="payment_ts" reporter:datatype="timestamp"/>
2034                         <field name="xact" reporter:datatype="link"/>
2035                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2036                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2037                 </fields>
2038                 <links>
2039                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2040                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2041                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2042                 </links>
2043         </class>
2044         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2045                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2046                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2047                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2048                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2049                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2050                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2051                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2052                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2053                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2054                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2055                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2056                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2057                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2058                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2059                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2060                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2061                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2062                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2063                 </fields>
2064                 <links>
2065                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2066                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2067                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2068                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2069                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2070                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2071                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2072                 </links>
2073         </class>
2074
2075         <class id="csp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::standing_penalty" oils_persist:tablename="config.standing_penalty" reporter:label="Standing Penalty">
2076                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2077                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2078                         <field name="name"  reporter:datatype="text"/>
2079                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2080                         <field name="block_list" reporter:datatype="text"/>
2081                         <field name="org_depth" reporter:datatype="int"/>
2082                 </fields>
2083                 <links/>
2084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2085             <actions>
2086                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2087                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2088                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2089                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2090             </actions>
2091         </permacrud>
2092         </class>
2093         <class id="pgpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_penalty_threshold" oils_persist:tablename="permission.grp_penalty_threshold" reporter:label="Group Penalty Threshold">
2094                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2095                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2096                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2097                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2098                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2099                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2100                 </fields>
2101                 <links>
2102                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2103                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2104                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2105         </links>
2106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2107             <actions>
2108                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2109                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2110                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2111                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2112             </actions>
2113         </permacrud>
2114         </class>
2115         <class id="ccs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::copy_status" oils_persist:tablename="config.copy_status" oils_persist:restrict_primary="100" reporter:label="Copy Status">
2116                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2117                         <field name="holdable" reporter:datatype="bool"/>
2118                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2119                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2120                         <field name="opac_visible" reporter:datatype="bool"/>
2121                 </fields>
2122                 <links/>
2123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2124             <actions>
2125                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2126                 <retrieve permission="CREATE_COPY_STATUS UPDATE_COPY_STATUS DELETE_COPY_STATUS" global_required="true"/>
2127                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2128                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2129             </actions>
2130         </permacrud>
2131         </class>
2132         <class id="ausp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user_standing_penalty" oils_persist:tablename="actor.usr_standing_penalty" oils_persist:restrict_primary="100" reporter:label="User Standing Penalty">
2133                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
2134                         <field name="id" reporter:datatype="id" reporter:label="ID" />
2135                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
2136                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
2137                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
2138                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
2139                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
2140                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
2141                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
2142                 </fields>
2143                 <links>
2144                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2145                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2146                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2147                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
2148                 </links>
2149                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2150                         <actions>
2151                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
2152                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
2153                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
2154                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
2155                         </actions>
2156                 </permacrud>
2157         </class>
2158         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
2159                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
2160                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
2161                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
2162                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
2163                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
2164                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
2165                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
2166                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
2167                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
2168                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
2169                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2170                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
2171                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
2172                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
2173                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
2174                 </fields>
2175                 <links>
2176                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2177                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
2178                 </links>
2179         </class>
2180         <class id="acnn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_note" oils_persist:tablename="asset.call_number_note" reporter:label="Call Number Note">
2181                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
2182                         <field name="call_number" />
2183                         <field name="create_date" reporter:datatype="timestamp"/>
2184                         <field name="creator" reporter:datatype="link"/>
2185                         <field name="id" reporter:datatype="id" />
2186                         <field name="pub" reporter:datatype="bool"/>
2187                         <field name="title"  reporter:datatype="text"/>
2188                         <field name="value"  reporter:datatype="text"/>
2189                 </fields>
2190                 <links>
2191                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2192                 </links>
2193         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2194             <actions>
2195                 <create permission="CREATE_VOLUME_NOTE">
2196                     <context link="call_number" field="owning_lib"/>
2197                 </create>
2198                 <retrieve permission="VIEW_VOLUME_NOTES">
2199                     <context link="call_number" field="owning_lib"/>
2200                 </retrieve>
2201                 <update permission="UPDATE_VOLUME_NOTE">
2202                     <context link="call_number" field="owning_lib"/>
2203                 </update>
2204                 <delete permission="DELETE_VOLUME_NOTE">
2205                     <context link="call_number" field="owning_lib"/>
2206                 </delete>
2207             </actions>
2208         </permacrud>
2209         </class>
2210         <class id="arn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_note" oils_persist:tablename="authority.record_note" reporter:label="Authority Record Note">
2211                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
2212                         <field name="create_date" reporter:datatype="timestamp"/>
2213                         <field name="creator" reporter:datatype="link"/>
2214                         <field name="edit_date" reporter:datatype="timestamp"/>
2215                         <field name="editor" reporter:datatype="link"/>
2216                         <field name="id" reporter:datatype="id" />
2217                         <field name="record" reporter:datatype="link"/>
2218                         <field name="value" reporter:datatype="text"/>
2219                 </fields>
2220                 <links>
2221                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2222                 </links>
2223         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2224             <actions>
2225                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2226                 <retrieve permission="VIEW_AUTHORITY_RECORD_NOTES" global_required='true'/>
2227                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2228                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
2229             </actions>
2230         </permacrud>
2231         </class>
2232         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
2233                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2234                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2235                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2236                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2237                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2238                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2239                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2240                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2241                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2242                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2243                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2244                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2245                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2246                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2247                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2248                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2249                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2250                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2251                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2252                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2253                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2254                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2255                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
2256                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2257                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2258                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2259                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2260                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2261                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2262                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2263                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2264                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2265                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2266                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2267                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2268                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2269                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2270                 </fields>
2271                 <links>
2272                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2273                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2274                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2275                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2276                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2277                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2278                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2279                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2280                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2281                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2282                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2283                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2284                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2285                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2286                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2287                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2288                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2289                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
2290                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2291                 </links>
2292         </class>
2293         <class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
2294                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2295                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2296                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2297                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2298                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2299                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2300                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2301                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2302                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2303                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2304                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2305                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2306                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2307                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2308                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2309                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2310                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2311                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2312                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2313                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2314                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2315                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2316                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2317                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2318                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2319                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2320                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2321                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2322                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2323                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2324                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2325                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2326                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2327                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2328                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2329                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2330                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2331                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2332                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2333                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2334                 </fields>
2335                 <links>
2336                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2337                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2338                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2339                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2340                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2341                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2342                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2343                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2344                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2345                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2346                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2347                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2348                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2349                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2350                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2351                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2352                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2353                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2354                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2355                 </links>
2356         </class>
2357         <class id="acirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::aged_circulation" oils_persist:tablename="action.aged_circulation" reporter:core="true" reporter:label="Aged (patronless) Circulation">
2358                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2359                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
2360                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
2361                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
2362                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
2363                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
2364                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
2365                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
2366                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
2367                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
2368                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2369                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
2370                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
2371                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
2372                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
2373                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
2374                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
2375                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
2376                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
2377                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
2378                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
2379                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
2380                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
2381                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
2382                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
2383                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
2384                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
2385                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
2386                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
2387                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
2388                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2389                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2390                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
2391                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
2392                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2393                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2394                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
2395                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
2396                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
2397                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
2398                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
2399                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
2400                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
2401                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
2402                 </fields>
2403                 <links>
2404                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
2405                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
2406                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
2407                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2408                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
2409                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2410                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2411                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2412                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
2413                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
2414                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
2415                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
2416                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2417                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2418                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
2419                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
2420                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2421                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
2422                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
2423                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
2424                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
2425                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
2426                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
2427                 </links>
2428         </class>
2429
2430         <class id="brt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_type" oils_persist:tablename="booking.resource_type" reporter:label="Resource Type">
2431                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
2432                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id"/>
2433                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
2434                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2435                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2436                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2437                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2438                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
2439                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
2440                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
2441                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
2442                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
2443                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2444                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
2445                 </fields>
2446                 <links>
2447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2448                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2449                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
2450                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
2451                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
2452                 </links>
2453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2454                         <actions>
2455                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2456                                 <retrieve />
2457                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2458                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" global_required='true'/>
2459                         </actions>
2460                 </permacrud>
2461         </class>
2462
2463         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
2464                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
2465                         <field reporter:label="Resource ID" name="id" reporter:datatype="id"/>
2466                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2467                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
2468                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
2469                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
2470                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
2471                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
2472                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
2473                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2474                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2475                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
2476                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
2477                 </fields>
2478                 <links>
2479                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2480                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
2481                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
2482                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
2483                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
2484                 </links>
2485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2486                         <actions>
2487                                 <create permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2488                                 <retrieve />
2489                                 <update permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2490                                 <delete permission="ADMIN_BOOKING_RESOURCE" global_required='true'/>
2491                         </actions>
2492                 </permacrud>
2493         </class>
2494         
2495         <class id="bra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr" oils_persist:tablename="booking.resource_attr" reporter:label="Resource Attribute">
2496                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
2497                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id"/>
2498                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2499                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
2500                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
2501                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
2502                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
2503                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2504                 </fields>
2505                 <links>
2506                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2507                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
2508                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
2509                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
2510                 </links>
2511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2512                         <actions>
2513                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2514                                 <retrieve />
2515                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2516                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" global_required='true'/>
2517                         </actions>
2518                 </permacrud>
2519         </class>
2520         
2521         <class id="brav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_value" oils_persist:tablename="booking.resource_attr_value" reporter:label="Resource Attribute Value">
2522                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
2523                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id"/>
2524                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
2525                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
2526                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
2527                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2528                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2529                 </fields>
2530                 <links>
2531                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2532                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
2533                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
2534                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
2535                 </links>
2536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2537                         <actions>
2538                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2539                                 <retrieve />
2540                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2541                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" global_required='true'/>
2542                         </actions>
2543                 </permacrud>
2544         </class>
2545         
2546         <class id="bram" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource_attr_map" oils_persist:tablename="booking.resource_attr_map" reporter:label="Resource Attribute Map">
2547                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
2548                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
2549                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
2550                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
2551                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
2552                 </fields>
2553                 <links>
2554                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
2555                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
2556                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
2557                 </links>
2558                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2559                         <actions>
2560                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2561                                 <retrieve />
2562                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2563                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP" global_required='true'/>
2564                         </actions>
2565                 </permacrud>
2566         </class>
2567         
2568         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
2569                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
2570                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
2571                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2572                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
2573                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
2574                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
2575                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
2576                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
2577                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
2578                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
2579                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
2580                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2581                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
2582                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
2583                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
2584                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
2585                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
2586                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
2587                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
2588                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
2589                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
2590                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
2591                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
2592                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
2593                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
2594                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
2595                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
2596                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
2597                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2598                 </fields>
2599                 <links>
2600                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2601                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
2602                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
2603                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
2604                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
2605                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
2606                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
2607                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2608                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
2609                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
2610                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
2611                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
2612                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
2613                 </links>
2614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2615                         <actions>
2616                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2617                                 <retrieve />
2618                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2619                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
2620                         </actions>
2621                 </permacrud>
2622         </class>
2623         
2624         <class id="bravm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation_attr_value_map" oils_persist:tablename="booking.reservation_attr_value_map" reporter:label="Reservation Attribute Value Map">
2625                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
2626                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
2627                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
2628                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
2629                 </fields>
2630                 <links>
2631                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
2632                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
2633                 </links>
2634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2635                         <actions>
2636                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2637                                 <retrieve />
2638                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2639                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
2640                         </actions>
2641                 </permacrud>
2642         </class>
2643
2644         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
2645                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
2646                         <field name="bucket" reporter:datatype="link"/>
2647                         <field name="id" reporter:datatype="id" />
2648                         <field name="target_call_number" reporter:datatype="link" />
2649                         <field name="create_time" reporter:datatype="timestamp" />
2650                         <field name="pos" reporter:datatype="int" />
2651                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2652                 </fields>
2653                 <links>
2654                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
2655                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
2656             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
2657                 </links>
2658         </class>
2659         <class id="ccnbin" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item_note" oils_persist:tablename="container.call_number_bucket_item_note" reporter:label="Call Number Bucket Item Note">
2660                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
2661                         <field name="id" reporter:datatype="id" />
2662                         <field name="item" reporter:datatype="link"/>
2663                         <field name="note" reporter:datatype="text" />
2664                 </fields>
2665                 <links>
2666                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
2667                 </links>
2668         </class>
2669         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
2670                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
2671                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
2672                         <field name="btype" reporter:datatype="text"/>
2673                         <field name="id" reporter:datatype="id" />
2674                         <field name="name" reporter:datatype="text"/>
2675                         <field name="owner" reporter:datatype="link"/>
2676                         <field name="pub" reporter:datatype="bool"/>
2677                         <field name="create_time" reporter:datatype="timestamp" />
2678                 </fields>
2679                 <links>
2680                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
2681                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
2682                 </links>
2683         </class>
2684         <class id="cbrebn" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_note" oils_persist:tablename="container.biblio_record_entry_bucket_note" reporter:label="Bibliographic Record Entry Bucket Note">
2685                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
2686                         <field name="id" reporter:datatype="id" />
2687                         <field name="bucket" reporter:datatype="link"/>
2688                         <field name="note" reporter:datatype="text" />
2689                 </fields>
2690                 <links>
2691                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
2692                 </links>
2693         </class>
2694         <class id="ahcm" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_copy_map" oils_persist:tablename="action.hold_copy_map" reporter:label="Hold Copy Map">
2695                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
2696                         <field name="hold" reporter:datatype="link"/>
2697                         <field name="id" reporter:datatype="id" />
2698                         <field name="target_copy" reporter:datatype="link"/>
2699                 </fields>
2700                 <links>
2701                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2702                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2703                 </links>
2704         </class>
2705         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
2706                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
2707                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
2708                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
2709                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
2710                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
2711                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
2712                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
2713                 </fields>
2714                 <links>
2715                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
2716                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
2717                 </links>
2718         </class>
2719         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location">
2720                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
2721                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
2722                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
2723                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
2724                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2725                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2726                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
2727                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
2728                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
2729                 </fields>
2730                 <links>
2731                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2732                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
2733                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
2734                 </links>
2735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2736             <actions>
2737                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
2738                 <retrieve/>
2739                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
2740                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
2741             </actions>
2742         </permacrud>
2743         </class>
2744
2745     <class id="acplo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_order" oils_persist:tablename="asset.copy_location_order" reporter:label="Copy/Shelving Location Order">
2746         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
2747             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
2748             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
2749             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
2750             <field reporter:label="Position" name="position" reporter:datatype="int"/>
2751         </fields>
2752         <links>
2753             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
2754             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
2755         </links>
2756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2757             <actions>
2758                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2759                 <retrieve/>
2760                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2761                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
2762             </actions>
2763         </permacrud>
2764     </class>
2765
2766         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
2767                 <fields>
2768                         <field name="id" oils_persist:virtual="true" />
2769                         <field name="location" oils_persist:virtual="true" />
2770                         <field name="owning_lib" oils_persist:virtual="true" />
2771                         <field name="holdings" oils_persist:virtual="true" />
2772                         <field name="current_holdings" oils_persist:virtual="true" />
2773                         <field name="supplements" oils_persist:virtual="true" />
2774                         <field name="current_supplements" oils_persist:virtual="true" />
2775                         <field name="indexes" oils_persist:virtual="true" />
2776                         <field name="current_indexes" oils_persist:virtual="true" />
2777                         <field name="online" oils_persist:virtual="true" />
2778                         <field name="missing" oils_persist:virtual="true" />
2779                         <field name="incomplete" oils_persist:virtual="true" />
2780                 </fields>
2781         </class>
2782         <class id="sre" controller="open-ils.pcrud open-ils.cstore" oils_obj:fieldmapper="serial::record_entry" oils_persist:tablename="serial.record_entry" reporter:label="Serial Record Entry">
2783                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
2784                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2785                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2786                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
2787                         <field reporter:label="Creator" name="creator" />
2788                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2789                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
2790                         <field reporter:label="Editor" name="editor" />
2791                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2792                         <field reporter:label="Last Transaction ID" name="last_xact_id" />
2793                         <field reporter:label="MARC" name="marc" />
2794                         <field reporter:label="Source" name="source" />
2795                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
2796                 </fields>
2797                 <links>
2798                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2799                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2800                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2801                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2802                 </links>
2803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2804                         <actions>
2805                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
2806                                 <retrieve/>
2807                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
2808                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
2809                         </actions>
2810                 </permacrud>
2811         </class>
2812         <class id="ssub" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
2813                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
2814                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2815                         <field reporter:label="Call Number" name="call_number" reporter:datatype="link"/>
2816                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
2817                         <field reporter:label="Start date" name="start_date" reporter:datatype="timestamp"/>
2818                         <field reporter:label="End date" name="end_date" reporter:datatype="timestamp"/>
2819                 </fields>
2820                 <links>
2821                         <link field="call_number" reltype="might_have" key="id" map="" class="acn"/>
2822                         <link field="uri" reltype="might_have" key="id" map="" class="auri"/>
2823                 </links>
2824         </class>
2825         <class id="sbu" controller="open-ils.cstore" oils_obj:fieldmapper="serial::binding_unit" oils_persist:tablename="serial.binding_unit" reporter:label="Binding Unit">
2826                 <fields oils_persist:primary="id" oils_persist:sequence="serial.binding_unit_id_seq">
2827                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
2828                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
2829                         <field reporter:label="Label" name="label" />
2830                 </fields>
2831                 <links>
2832                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2833                 </links>
2834         </class>
2835         <class id="siss" controller="open-ils.cstore" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
2836                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
2837                         <field name="id" reporter:datatype="id" />
2838                         <field name="subscription" reporter:datatype="link"/>
2839                         <field name="target_copy" reporter:datatype="link"/>
2840                         <field name="location" reporter:datatype="link"/>
2841                         <field name="binding_unit" reporter:datatype="link"/>
2842                         <field name="label" />
2843                 </fields>
2844                 <links>
2845                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2846                         <link field="target_copy" reltype="might_have" key="id" map="" class="acp"/>
2847                         <link field="location" reltype="might_have" key="id" map="" class="acpl"/>
2848                         <link field="binding_unit" reltype="might_have" key="id" map="" class="sbu"/>
2849                 </links>
2850         </class>
2851         <class id="sbsum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::bib_summary" oils_persist:tablename="serial.bib_summary" reporter:label="Bib Summary">
2852                 <fields oils_persist:primary="id" oils_persist:sequence="serial.bib_summary_id_seq">
2853                         <field name="id" reporter:datatype="id" />
2854                         <field name="subscription" reporter:datatype="link"/>
2855                         <field name="generated_coverage" reporter:datatype="text"/>
2856                         <field name="textual_holdings" reporter:datatype="text"/>
2857                 </fields>
2858                 <links>
2859                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2860                 </links>
2861         </class>
2862         <class id="sssum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::sup_summary" oils_persist:tablename="serial.sup_summary" reporter:label="Supplemental Issue Summary">
2863                 <fields oils_persist:primary="id" oils_persist:sequence="serial.sup_summary_id_seq">
2864                         <field name="id" reporter:datatype="id" />
2865                         <field name="subscription" reporter:datatype="link"/>
2866                         <field name="generated_coverage" reporter:datatype="text"/>
2867                         <field name="textual_holdings" reporter:datatype="text"/>
2868                 </fields>
2869                 <links>
2870                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2871                 </links>
2872         </class>
2873         <class id="sisum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Summary">
2874                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
2875                         <field name="id" reporter:datatype="id" />
2876                         <field name="subscription" reporter:datatype="link"/>
2877                         <field name="generated_coverage" reporter:datatype="text"/>
2878                         <field name="textual_holdings" reporter:datatype="text"/>
2879                 </fields>
2880                 <links>
2881                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
2882                 </links>
2883         </class>
2884
2885         <class id="ascecm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
2886                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
2887                         <field name="id" reporter:datatype="id" />
2888                         <field name="owning_copy" reporter:datatype="link"/>
2889                         <field name="stat_cat" reporter:datatype="link"/>
2890                         <field name="stat_cat_entry" reporter:datatype="link"/>
2891                 </fields>
2892                 <links>
2893                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2894                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
2895                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
2896                 </links>
2897         </class>
2898         <class id="citm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_type_map" oils_persist:tablename="config.item_type_map" reporter:label="Item Type Map" oils_persist:field_safe="true">
2899                 <fields oils_persist:primary="code">
2900                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2901                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2902                 </fields>
2903                 <links/>
2904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2905             <actions>
2906                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2907                 <retrieve/>
2908                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2909                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2910             </actions>
2911         </permacrud>
2912         </class>
2913         <class id="cblvl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_level_map" oils_persist:tablename="config.bib_level_map" reporter:label="Bib Level Map" oils_persist:field_safe="true">
2914                 <fields oils_persist:primary="code">
2915                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
2916                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2917                 </fields>
2918                 <links/>
2919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2920             <actions>
2921                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2922                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
2923                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2924                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2925             </actions>
2926         </permacrud>
2927         </class>
2928         <class id="sra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="search::relevance_adjustment" oils_persist:tablename="search.relevance_adjustment" reporter:label="Relevance Adjustment">
2929                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
2930                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
2931                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
2932                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
2933                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
2934                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
2935                 </fields>
2936                 <links>
2937             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2938         </links>
2939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2940             <actions>
2941                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2942                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2943                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2944                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
2945             </actions>
2946         </permacrud>
2947         </class>
2948         <class id="lasso" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso" oils_persist:tablename="actor.org_lasso" reporter:label="Org Lasso">
2949                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
2950                         <field name="id" reporter:datatype="id" />
2951                         <field name="name" reporter:datatype="text"/>
2952                 </fields>
2953                 <links/>
2954         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2955             <actions>
2956                 <create permission="CREATE_LASSO" global_required="true"/>
2957                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
2958                 <update permission="UPDATE_LASSO" global_required="true"/>
2959                 <delete permission="DELETE_LASSO" global_required="true"/>
2960             </actions>
2961         </permacrud>
2962         </class>
2963         <class id="lmap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_lasso_map" oils_persist:tablename="actor.org_lasso_map" reporter:label="Org Lasso Map">
2964                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
2965                         <field name="id" reporter:datatype="id" />
2966                         <field name="lasso" reporter:datatype="link"/>
2967                         <field name="org_unit" reporter:datatype="org_unit"/>
2968                 </fields>
2969                 <links>
2970                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
2971                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2972                 </links>
2973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2974             <actions>
2975                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
2976                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
2977                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
2978                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
2979             </actions>
2980         </permacrud>
2981         </class>
2982         <class id="aoup" controller="open-ils.cstore" oils_obj:fieldmapper="actor::org_unit_proximity" oils_persist:tablename="actor.org_unit_proximity" reporter:label="Org Unit Proximity">
2983                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2984                         <field name="id" reporter:datatype="id" />
2985                         <field name="from_org" reporter:datatype="org_unit"/>
2986                         <field name="to_org" reporter:datatype="org_unit"/>
2987                         <field name="prox" reporter:datatype="int" />
2988                 </fields>
2989                 <links>
2990                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
2991                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
2992                 </links>
2993         </class>
2994         <class id="ssr" controller="open-ils.cstore" oils_obj:fieldmapper="search::search_result" oils_persist:tablename="search.search_result" oils_persist:readonly="true" reporter:label="Search Result">
2995                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
2996                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2997                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
2998                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
2999                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
3000                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
3001                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
3002                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
3003                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
3004                 </fields>
3005                 <links/>
3006         </class>
3007         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
3008                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
3009                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
3010                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3011                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
3012                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
3013                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
3014                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3015                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
3016                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3017                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
3018                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
3019                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
3020                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
3021                 </fields>
3022                 <links>
3023                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3024                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
3025                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
3026                 </links>
3027         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3028             <actions>
3029                 <create permission="ADMIN_SURVEY" context_field="owner"/>
3030                 <retrieve/>
3031                 <update permission="ADMIN_SURVEY" context_field="owner"/>
3032                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
3033             </actions>
3034         </permacrud>
3035         </class>
3036         <class id="aoa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_address" oils_persist:tablename="actor.org_address" reporter:label="Org Address">
3037                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
3038                         <field name="address_type"  reporter:datatype="text"/>
3039                         <field name="city"  reporter:datatype="text"/>
3040                         <field name="country"  reporter:datatype="text"/>
3041                         <field name="county"  reporter:datatype="text"/>
3042                         <field name="id" reporter:datatype="id" />
3043                         <field name="org_unit" reporter:datatype="org_unit"/>
3044                         <field name="post_code"  reporter:datatype="text"/>
3045                         <field name="state"  reporter:datatype="text"/>
3046                         <field name="street1"  reporter:datatype="text"/>
3047                         <field name="street2"  reporter:datatype="text"/>
3048                         <field name="valid" reporter:datatype="bool"/>
3049                 </fields>
3050                 <links>
3051                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3052                 </links>
3053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3054             <actions>
3055                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
3056                 <retrieve/>
3057                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
3058                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
3059             </actions>
3060         </permacrud>
3061         </class>
3062         <class id="ahr" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
3063                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
3064                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
3065                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
3066                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
3067                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
3068                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3069                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
3070                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
3071                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
3072                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
3073                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
3074                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
3075                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
3076                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
3077                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
3078                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
3079                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
3080                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
3081                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
3082                         <field reporter:label="Item Selection Depth" name="selection_depth" />
3083                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
3084                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
3085                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
3086                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
3087                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
3088                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
3089                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
3090                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
3091                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
3092                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
3093                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
3094                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
3095                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
3096                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
3097                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
3098                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
3099                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
3100                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
3101                 </fields>
3102                 <links>
3103                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
3104                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
3105                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
3106                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
3107                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
3108                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3109                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3110                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3111                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
3112                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
3113                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
3114                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
3115                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
3116                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
3117                 </links>
3118         </class>
3119         <class id="ahrn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_note" oils_persist:tablename="action.hold_request_note" reporter:label="Hold Request Note">
3120                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
3121                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3122                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
3123                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3124                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
3125                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
3126                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
3127                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
3128                 </fields>
3129                 <links>
3130                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3131                 </links>
3132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3133                         <actions>
3134                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
3135                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
3136                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
3137                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
3138                         </actions>
3139                 </permacrud>
3140         </class>
3141         <class id="aou" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit" oils_persist:tablename="actor.org_unit" reporter:label="Organizational Unit" oils_persist:field_safe="true">
3142                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
3143                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3144                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
3145                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
3146                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
3147                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
3148                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3149                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3150                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
3151                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
3152                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text"/>
3153                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
3154                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
3155                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3156                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
3157                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
3158                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
3159                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3160                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3161                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3162                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3163                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
3164                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3165                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
3166                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
3167                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3168                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
3169                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3170                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3171                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3172                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
3173                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
3174                 </fields>
3175                 <links>
3176                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
3177                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
3178                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
3179                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
3180                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
3181                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
3182                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
3183                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
3184                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
3185                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
3186                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
3187                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
3188                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
3189                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
3190                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
3191                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
3192                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
3193                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
3194                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
3195                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
3196                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
3197                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
3198                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
3199                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
3200                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
3201                 </links>
3202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3203             <actions>
3204                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
3205                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
3206                     <context field="id"/>
3207                     <context field="parent_ou"/>
3208                                 </retrieve>
3209                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
3210                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
3211             </actions>
3212         </permacrud>
3213         </class>
3214         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
3216                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field name="btype" reporter:datatype="text"/>
3218                         <field name="id" reporter:datatype="id" />
3219                         <field name="name"  reporter:datatype="text"/>
3220                         <field name="owner" reporter:datatype="link"/>
3221                         <field name="pub" reporter:datatype="bool"/>
3222                         <field name="create_time" reporter:datatype="timestamp" />
3223                 </fields>
3224                 <links>
3225                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3226                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
3227                 </links>
3228         </class>
3229         <class id="ccnbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_note" oils_persist:tablename="container.call_number_bucket_note" reporter:label="Call Number Bucket Note">
3230                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
3231                         <field name="id" reporter:datatype="id" />
3232                         <field name="bucket" reporter:datatype="link"/>
3233                         <field name="note" reporter:datatype="text" />
3234                 </fields>
3235                 <links>
3236                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3237                 </links>
3238         </class>
3239         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
3240                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
3241                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3242                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3243                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3244                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3245                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3246                 </fields>
3247                 <links>
3248                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3249                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
3250                 </links>
3251         </class>
3252         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
3253                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
3254                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
3255                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3256                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
3257                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3258                 </fields>
3259                 <links>
3260                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3261                 </links>
3262         </class>
3263         <class id="actsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat" oils_persist:tablename="actor.stat_cat" reporter:label="User Statistical Category">
3264                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
3265                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
3266                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3267                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3268                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
3269                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3270                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
3271                 </fields>
3272                 <links>
3273                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3274                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
3275                 </links>
3276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3277             <actions>
3278                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
3279                 <retrieve />
3280                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
3281                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
3282             </actions>
3283         </permacrud>
3284         </class>
3285         <class id="msefe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::series_field_entry" oils_persist:tablename="metabib.series_field_entry" reporter:label="Series Field Entry">
3286                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
3287                         <field name="field" reporter:datatype="link"/>
3288                         <field name="id" reporter:datatype="id" />
3289                         <field name="source" reporter:datatype="link"/>
3290                         <field name="value"  reporter:datatype="text"/>
3291                 </fields>
3292                 <links>
3293                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3294                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3295                 </links>
3296         </class>
3297         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
3298                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
3299                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3300                         <field name="btype" reporter:datatype="text"/>
3301                         <field name="id" reporter:datatype="id" />
3302                         <field name="name"  reporter:datatype="text"/>
3303                         <field name="owner" reporter:datatype="link"/>
3304                         <field name="pub" reporter:datatype="bool"/>
3305                         <field name="create_time" reporter:datatype="timestamp" />
3306                 </fields>
3307                 <links>
3308                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3309                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
3310                 </links>
3311         </class>
3312         <class id="cubn" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_note" oils_persist:tablename="container.user_bucket_note" reporter:label="User Bucket Note">
3313                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
3314                         <field name="id" reporter:datatype="id" />
3315                         <field name="bucket" reporter:datatype="link"/>
3316                         <field name="note" reporter:datatype="text" />
3317                 </fields>
3318                 <links>
3319                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3320                 </links>
3321         </class>
3322         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
3323                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3324                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3325                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3326                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3327                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
3328                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
3329                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3330                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
3331                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3332                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3333                 </fields>
3334                 <links>
3335                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3336                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3337                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3338                 </links>
3339         </class>
3340         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
3341                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
3342                         <field name="id" reporter:datatype="id" />
3343                         <field name="ind1" />
3344                         <field name="ind2" />
3345                         <field name="record" />
3346                         <field name="subfield" />
3347                         <field name="tag" />
3348                         <field name="value" />
3349                 </fields>
3350                 <links>
3351                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3352                 </links>
3353         </class>
3354         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
3355                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
3356                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
3357                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3358                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
3359                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3360                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
3361                 </fields>
3362                 <links>
3363                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3364                 </links>
3365         </class>
3366         <class id="aout" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_type" oils_persist:tablename="actor.org_unit_type" reporter:label="Organizational Unit Type">
3367                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
3368                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3369                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
3370                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
3371                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
3372                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3373                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3374                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
3375                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
3376                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
3377                 </fields>
3378                 <links>
3379                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
3380                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
3381                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
3382                 </links>
3383         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3384             <actions>
3385                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
3386                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT" global_required="true"/>
3387                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
3388                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
3389             </actions>
3390         </permacrud>
3391         </class>
3392         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
3393                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
3394                         <field name="create_date" reporter:datatype="timestamp"/>
3395                         <field name="creator" reporter:datatype="link"/>
3396                         <field name="edit_date" reporter:datatype="timestamp"/>
3397                         <field name="editor" reporter:datatype="link"/>
3398                         <field name="id" reporter:datatype="id" />
3399                         <field name="pub" reporter:datatype="bool"/>
3400                         <field name="record" reporter:datatype="link"/>
3401                         <field name="value"  reporter:datatype="text"/>
3402                 </fields>
3403                 <links>
3404                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3405                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3406                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3407                 </links>
3408         </class>
3409         <class id="mucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_circulation_summary" oils_persist:tablename="money.usr_circulation_summary" reporter:label="User Circulation Summary">
3410                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3411                         <field name="balance_owed" reporter:datatype="money" />
3412                         <field name="total_owed" reporter:datatype="money" />
3413                         <field name="total_paid" reporter:datatype="money" />
3414                         <field name="usr" reporter:datatype="link"/>
3415                 </fields>
3416                 <links>
3417                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3418                 </links>
3419         </class>
3420         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
3421                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3422                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
3423                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3424                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
3425                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3426                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
3427                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
3428                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3429                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3430                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3431                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3432                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3433                 </fields>
3434                 <links>
3435                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3436                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3437                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3438                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3439                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3440                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3441                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3442                 </links>
3443         </class>
3444         <class id="cbs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::bib_source" oils_persist:tablename="config.bib_source" reporter:label="Bib Source">
3445                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
3446                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
3447                         <field name="quality" reporter:datatype="int" />
3448                         <field name="source" reporter:datatype="text"/>
3449                         <field name="transcendant" reporter:datatype="bool"/>
3450                 </fields>
3451                 <links/>
3452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3453             <actions>
3454                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
3455                 <retrieve/>
3456                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
3457                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
3458             </actions>
3459         </permacrud>
3460         </class>
3461         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
3462                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3463                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3464                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3465                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3466                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3467                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3468                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3469                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3470                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3471                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3472                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3473                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3474                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3475                 </fields>
3476                 <links>
3477                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3478                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3479                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3480                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3481                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3482                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3483                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3484                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3485                 </links>
3486         </class>
3487         <class id="actsce" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry" oils_persist:tablename="actor.stat_cat_entry" reporter:label="User Stat Cat Entry">
3488                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
3489                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3490                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
3491                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
3492                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
3493                 </fields>
3494                 <links>
3495                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3496                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3497                 </links>
3498         </class>
3499         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
3500                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
3501                         <field name="bucket" reporter:datatype="link"/>
3502                         <field name="id" reporter:datatype="id" />
3503                         <field name="target_user" reporter:datatype="link"/>
3504                         <field name="create_time" reporter:datatype="timestamp" />
3505                         <field name="pos" reporter:datatype="int" />
3506                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3507                 </fields>
3508                 <links>
3509                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
3510                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
3511             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
3512                 </links>
3513         </class>
3514         <class id="cubin" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item_note" oils_persist:tablename="container.user_bucket_item_note" reporter:label="User Bucket Item Note">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
3516                         <field name="id" reporter:datatype="id" />
3517                         <field name="item" reporter:datatype="link"/>
3518                         <field name="note" reporter:datatype="text" />
3519                 </fields>
3520                 <links>
3521                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
3522                 </links>
3523         </class>
3524         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
3525                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3526                         <field name="balance_owed" reporter:datatype="money" />
3527                         <field name="total_owed" reporter:datatype="money" />
3528                         <field name="total_paid" reporter:datatype="money" />
3529                         <field name="usr" reporter:datatype="link"/>
3530                 </fields>
3531                 <links>
3532                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3533                 </links>
3534         </class>
3535         <class id="clfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::lit_form_map" oils_persist:tablename="config.lit_form_map" reporter:label="Literary Form" oils_persist:field_safe="true">
3536                 <fields oils_persist:primary="code" oils_persist:sequence="">
3537                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
3538                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3539                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
3540                 </fields>
3541                 <links/>
3542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3543             <actions>
3544                 <create permission="CREATE_MARC_CODE" global_required="true"/>
3545                 <retrieve permission="CREATE_MARC_CODE UPDATE_MARC_CODE DELETE_MARC_CODE" global_required="true"/>
3546                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
3547                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
3548             </actions>
3549         </permacrud>
3550         </class>
3551         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
3552                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3553                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3554                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3555                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3556                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3557                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3558                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3559                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3560                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3561                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3562                 </fields>
3563                 <links>
3564                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3565                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3566                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3567                 </links>
3568         </class>
3569         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
3570                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3571                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3572                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3573                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3574                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3575                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3576                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3577                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
3578                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3579                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3580                 </fields>
3581                 <links>
3582                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3583                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3584                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3585                 </links>
3586         </class>
3587         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
3588                 <fields oils_persist:primary="id" oils_persist:sequence="">
3589                         <field name="checkin_lib" reporter:datatype="link"/>
3590                         <field name="checkin_staff" reporter:datatype="link"/>
3591                         <field name="checkin_time" reporter:datatype="timestamp"/>
3592                         <field name="circ_lib"  reporter:datatype="org_unit"/>
3593                         <field name="circ_staff" reporter:datatype="link"/>
3594                         <field name="desk_renewal" reporter:datatype="bool"/>
3595                         <field name="due_date" reporter:datatype="timestamp"/>
3596                         <field name="duration" reporter:datatype="interval"/>
3597                         <field name="duration_rule" reporter:datatype="link"/>
3598                         <field name="fine_interval" reporter:datatype="interval"/>
3599                         <field name="id" reporter:datatype="id" />
3600                         <field name="max_fine" reporter:datatype="money" />
3601                         <field name="max_fine_rule" reporter:datatype="link"/>
3602                         <field name="opac_renewal" reporter:datatype="bool"/>
3603                         <field name="phone_renewal" reporter:datatype="bool"/>
3604                         <field name="recurring_fine" reporter:datatype="money" />
3605                         <field name="recurring_fine_rule" reporter:datatype="link"/>
3606                         <field name="renewal_remaining" reporter:datatype="int" />
3607                         <field name="stop_fines" reporter:datatype="text"/>
3608                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
3609                         <field name="target_copy" reporter:datatype="link"/>
3610                         <field name="usr" reporter:datatype="link"/>
3611                         <field name="xact_finish" reporter:datatype="timestamp" />
3612                         <field name="xact_start" reporter:datatype="timestamp" />
3613                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3614                 </fields>
3615                 <links>
3616                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3617                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3618                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3619                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3620                 </links>
3621         </class>
3622         <class id="msfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::subject_field_entry" oils_persist:tablename="metabib.subject_field_entry" reporter:label="Subject Field Entry">
3623                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
3624                         <field name="field" reporter:datatype="link"/>
3625                         <field name="id" reporter:datatype="id" />
3626                         <field name="source" reporter:datatype="link"/>
3627                         <field name="value" reporter:datatype="text"/>
3628                 </fields>
3629                 <links>
3630                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3631                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3632                 </links>
3633         </class>
3634         <class id="crrf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::recurring_fine" oils_persist:tablename="config.rule_recurring_fine" reporter:label="Recurring Fine Rule">
3635                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
3636                         <field name="high" reporter:datatype="money" />
3637                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3638                         <field name="low" reporter:datatype="money" />
3639                         <field name="name" reporter:datatype="text"/>
3640                         <field name="normal" reporter:datatype="money" />
3641                         <field name="recurrence_interval" reporter:datatype="interval"/>
3642                 </fields>
3643                 <links/>
3644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3645             <actions>
3646                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3647                 <retrieve/>
3648                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3649                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
3650             </actions>
3651         </permacrud>
3652         </class>
3653         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
3654                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3655                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
3656                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3657                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
3658                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
3659                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
3660                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3661                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3662                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
3663                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
3664                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3665                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
3666                 </fields>
3667                 <links>
3668                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3669                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3670                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3671                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3672                 </links>
3673         </class>
3674         <class id="acp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy" oils_persist:tablename="asset.copy" reporter:core="true" reporter:label="Item">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
3676                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3677                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
3678                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
3679                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3680                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
3681                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
3682                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3683                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
3684                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
3685                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
3686                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3687                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
3688                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3689                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
3690                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3691                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
3692                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
3693                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
3694                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
3695                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
3696                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
3697                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
3698                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
3699                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
3700                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
3701                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
3702                         <field reporter:label="Price" name="price" reporter:datatype="money" />
3703                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
3704                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
3705                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
3706                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
3707                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
3708                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3709                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3710                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3711                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
3712                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
3713                 </fields>
3714                 <links>
3715                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
3716                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3717                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3718                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3719                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3720                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
3721                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3722                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
3723                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
3724                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
3725                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
3726                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
3727                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
3728                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
3729                 </links>
3730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3731             <actions>
3732                 <create permission="CREATE_COPY">
3733                     <context link="call_number" field="owning_lib"/>
3734                 </create>
3735                 <retrieve/>
3736                 <update permission="UPDATE_COPY">
3737                     <context link="call_number" field="owning_lib"/>
3738                 </update>
3739                 <delete permission="DELETE_COPY">
3740                     <context link="call_number" field="owning_lib"/>
3741                 </delete>
3742             </actions>
3743         </permacrud>
3744         </class>
3745         <class id="crahp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::age_hold_protect" oils_persist:tablename="config.rule_age_hold_protect" reporter:label="Age Hold Protection Rule">
3746                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
3747                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
3748                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3749                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3750                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
3751                 </fields>
3752                 <links/>
3753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3754             <actions>
3755                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3756                 <retrieve/>
3757                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3758                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
3759             </actions>
3760         </permacrud>
3761         </class>
3762         <class id="crmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::rules::max_fine" oils_persist:tablename="config.rule_max_fine" reporter:label="Max Fine Rule">
3763                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
3764                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
3765                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3766                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
3767                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
3768                 </fields>
3769                 <links/>
3770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3771             <actions>
3772                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3773                 <retrieve/>
3774                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3775                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
3776             </actions>
3777         </permacrud>
3778         </class>
3779         <class id="pgt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_tree" oils_persist:tablename="permission.grp_tree" reporter:label="Permission Group">
3780                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
3781                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
3782                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3783                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3784                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
3785                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
3786                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
3787                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
3788                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
3789                 </fields>
3790                 <links>
3791                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
3792                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
3793                 </links>
3794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3795             <actions>
3796                 <create permission="CREATE_PERM" global_required="true"/>
3797                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
3798                 <update permission="UPDATE_PERM" global_required="true"/>
3799                 <delete permission="DELETE_PERM" global_required="true"/>
3800             </actions>
3801         </permacrud>
3802         </class>
3803         <class id="asva" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey_answer" oils_persist:tablename="action.survey_answer" reporter:label="Survey Answer">
3804                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
3805                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
3806                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
3807                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
3808                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
3809                 </fields>
3810                 <links>
3811                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
3812                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
3813                 </links>
3814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3815             <actions>
3816                 <create permission="ADMIN_SURVEY">
3817                     <context link="question" jump="survey" field="owner"/>
3818                 </create>
3819                 <retrieve/>
3820                 <update permission="ADMIN_SURVEY">
3821                     <context link="question" jump="survey" field="owner"/>
3822                 </update>
3823                 <delete permission="ADMIN_SURVEY">
3824                     <context link="question" jump="survey" field="owner"/>
3825                 </delete>
3826             </actions>
3827         </permacrud>
3828         </class>
3829         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
3830                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
3831                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3832                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
3833                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
3834                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
3835                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
3836                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
3837                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
3838                 </fields>
3839                 <links>
3840                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
3841                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3842                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
3843                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3844                 </links>
3845         </class>
3846         <class id="moucs" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_user_circulation_summary" oils_persist:tablename="money.open_usr_circulation_summary" reporter:label="Open User Circulation Summary">
3847                 <fields oils_persist:primary="usr" oils_persist:sequence="">
3848                         <field name="balance_owed" reporter:datatype="money" />
3849                         <field name="total_owed" reporter:datatype="money" />
3850                         <field name="total_paid" reporter:datatype="money" />
3851                         <field name="usr" reporter:datatype="link"/>
3852                 </fields>
3853                 <links>
3854                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3855                 </links>
3856         </class>
3857         <class id="aufh" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_list" oils_persist:tablename="action.unfulfilled_hold_list" reporter:label="Unfulfilled Hold Targets">
3858                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
3859                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
3860                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
3861                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
3862                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3863                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
3864                 </fields>
3865                 <links>
3866                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3867                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
3868                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3869                 </links>
3870         </class>
3871         <class id="mtfe" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::title_field_entry" oils_persist:tablename="metabib.title_field_entry" reporter:label="Title Field Entry">
3872                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
3873                         <field name="field" reporter:datatype="link"/>
3874                         <field name="id" reporter:datatype="id" />
3875                         <field name="source" reporter:datatype="link"/>
3876                         <field name="value" reporter:datatype="text"/>
3877                 </fields>
3878                 <links>
3879                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3880                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3881                 </links>
3882         </class>
3883         <class id="actscecm" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_user_map" oils_persist:tablename="actor.stat_cat_entry_usr_map"  reporter:label="User Statistical Category Entry">
3884                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
3885                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
3886                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
3887                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
3888                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
3889                 </fields>
3890                 <links>
3891                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
3892                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
3893                 </links>
3894         </class>
3895         <class id="pgpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="permission::grp_perm_map" oils_persist:tablename="permission.grp_perm_map" reporter:label="Group Permission Map">
3896                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
3897                         <field name="depth" reporter:datatype="int" />
3898                         <field name="grantable" reporter:datatype="bool"/>
3899                         <field name="grp" reporter:datatype="link"/>
3900                         <field name="id" reporter:datatype="id" />
3901                         <field name="perm" reporter:datatype="link"/>
3902                 </fields>
3903                 <links>
3904                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3905                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3906                 </links>
3907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3908             <actions>
3909                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
3910                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
3911                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
3912                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
3913             </actions>
3914         </permacrud>
3915         </class>
3916         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
3917                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
3918                         <field name="items" oils_persist:virtual="true" />
3919                         <field name="btype" reporter:datatype="text"/>
3920                         <field name="id" reporter:datatype="id" />
3921                         <field name="name" reporter:datatype="text"/>
3922                         <field name="owner" reporter:datatype="link"/>
3923                         <field name="pub" reporter:datatype="bool"/>
3924                         <field name="create_time" reporter:datatype="timestamp" />
3925                 </fields>
3926                 <links>
3927                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3928                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
3929                 </links>
3930         </class>
3931         <class id="ccbn" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_note" oils_persist:tablename="container.copy_bucket_note" reporter:label="Copy Bucket Note">
3932                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
3933                         <field name="id" reporter:datatype="id" />
3934                         <field name="bucket" reporter:datatype="link"/>
3935                         <field name="note" reporter:datatype="text" />
3936                 </fields>
3937                 <links>
3938                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
3939                 </links>
3940         </class>
3941         <class id="puwoum" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_work_ou_map" oils_persist:tablename="permission.usr_work_ou_map" reporter:label="User Work Org Unit Map">
3942                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
3943                         <field name="id" reporter:datatype="int" />
3944                         <field name="usr" reporter:datatype="link"/>
3945                         <field name="work_ou" reporter:datatype="link"/>
3946                 </fields>
3947                 <links>
3948                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3949                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
3950                 </links>
3951         </class>
3952         <class id="pupm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_perm_map" oils_persist:tablename="permission.usr_perm_map" reporter:label="User Permission Map">
3953                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
3954                         <field name="depth" reporter:datatype="int"/>
3955                         <field name="grantable" reporter:datatype="bool"/>
3956                         <field name="id" reporter:datatype="id" />
3957                         <field name="perm" reporter:datatype="link"/>
3958                         <field name="usr" reporter:datatype="link"/>
3959                 </fields>
3960                 <links>
3961                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3962                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3963                 </links>
3964         </class>
3965         <class id="puopm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_object_perm_map" oils_persist:tablename="permission.usr_object_perm_map" reporter:label="User Object Permission Map">
3966                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
3967                         <field name="object_id" reporter:datatype="text"/>
3968                         <field name="grantable" reporter:datatype="bool"/>
3969                         <field name="id" reporter:datatype="id" />
3970                         <field name="perm" reporter:datatype="link"/>
3971                         <field name="usr" reporter:datatype="link"/>
3972                         <field name="object_type" reporter:datatype="text"/>
3973                 </fields>
3974                 <links>
3975                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3976                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
3977                 </links>
3978         </class>
3979         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
3980                 <fields oils_persist:primary="id" oils_persist:sequence="">
3981                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
3982                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
3983                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
3984                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
3985                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
3986                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
3987                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
3988                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3989                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3990                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3991                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3992                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3993                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3994                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
3995                 </fields>
3996                 <links>
3997                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
3998                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
3999                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4000                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4001                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4002                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4003                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4004                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4005                 </links>
4006         </class>
4007         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
4008                 <fields oils_persist:primary="id" oils_persist:sequence="">
4009                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4010                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4011                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4012                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4013                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4014                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4015                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4016                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4017                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4018                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4019                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4020                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4021                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4022                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4023                 </fields>
4024                 <links>
4025                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4026                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4027                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4028                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4029                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4030                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4031                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4032                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4033                 </links>
4034         </class>
4035         <class id="mndp" controller="open-ils.reporter" oils_obj:fieldmapper="money::non_drawer_payment" oils_persist:tablename="money.non_drawer_payment_view" reporter:core="true" reporter:label="Payments: Non-drawer Staff">
4036                 <fields oils_persist:primary="id" oils_persist:sequence="">
4037                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4038                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4039                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4040                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4041                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4042                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4043                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4044                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4045                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4046                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4047                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4048                 </fields>
4049                 <links>
4050                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
4051                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
4052                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
4053                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
4054                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4055                 </links>
4056         </class>
4057         <class id="mdp" controller="open-ils.cstore" oils_obj:fieldmapper="money::desk_payment" oils_persist:tablename="money.desk_payment_view" reporter:core="true" reporter:label="Payments: Desk">
4058                 <fields oils_persist:primary="id" oils_persist:sequence="">
4059                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4060                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
4061                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4062                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
4063                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
4064                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
4065                         <field reporter:label="Accepting User" name="accepting_usr" />
4066                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
4067                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4068                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4069                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4070                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
4071                 </fields>
4072                 <links>
4073                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
4074                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
4075                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
4076                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4077                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4078                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
4079                 </links>
4080         </class>
4081         <class id="cbrebi" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
4082                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
4083                         <field name="bucket" reporter:datatype="link"/>
4084                         <field name="id" reporter:datatype="id" />
4085                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
4086                         <field name="create_time" reporter:datatype="timestamp" />
4087                         <field name="pos" reporter:datatype="int" />
4088                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4089                 </fields>
4090                 <links>
4091                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
4092                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4093             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
4094                 </links>
4095         </class>
4096         <class id="cbrebin" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item_note" oils_persist:tablename="container.biblio_record_entry_bucket_item_note" reporter:label="Biblio Record Entry Bucket Item Note">
4097                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
4098                         <field name="id" reporter:datatype="id" />
4099                         <field name="item" reporter:datatype="link"/>
4100                         <field name="note" reporter:datatype="text" />
4101                 </fields>
4102                 <links>
4103                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
4104                 </links>
4105         </class>
4106         <class id="asce" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
4107                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
4108                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
4109                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
4110                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
4111                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
4112                 </fields>
4113                 <links>
4114                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4115                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4116                 </links>
4117         </class>
4118
4119         <class id="ahrcc" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="action::hold_request_cancel_cause" oils_persist:tablename="action.hold_request_cancel_cause" oils_persist:restrict_primary="100" reporter:label="Hold Request Cancel Cause">
4120                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
4121                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
4122                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4123                 </fields>
4124                 <links/>
4125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4126             <actions>
4127                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4128                 <retrieve/>
4129                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4130                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
4131             </actions>
4132         </permacrud>
4133         </class>
4134
4135
4136         <class id="artc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::reservation_transit_copy" oils_persist:tablename="action.reservation_transit_copy" reporter:core="true" reporter:label="Reservation Transit">
4137                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4138                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4139                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4140                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4141                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
4142                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4143                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4144                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4145                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4146                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4147                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4148                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4149                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4150                 </fields>
4151                 <links>
4152                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4153                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
4154                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4155                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4156                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4157                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4158                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4159                 </links>
4160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4161             <actions>
4162                 <create permission="TRANSIT_COPY">
4163                     <context link="target_copy" field="owner"/>
4164                 </create>
4165                 <retrieve/>
4166                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4167                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4168             </actions>
4169         </permacrud>
4170         </class>
4171         <class id="ahtc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_transit_copy" oils_persist:tablename="action.hold_transit_copy" reporter:core="true" reporter:label="Hold Transit">
4172                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
4173                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
4174                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
4175                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
4176                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
4177                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
4178                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
4179                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
4180                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
4181                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
4182                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
4183                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
4184                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
4185                 </fields>
4186                 <links>
4187                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
4188                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4189                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
4190                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
4191                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
4192                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
4193                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4194                 </links>
4195         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4196             <actions>
4197                 <create permission="TRANSIT_COPY" context_field="owner">
4198                     <context link="target_copy" field="circ_lib"/>
4199                 </create>
4200                 <retrieve/>
4201                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
4202                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
4203             </actions>
4204         </permacrud>
4205         </class>
4206         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
4207                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
4208                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4209                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
4210                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
4211                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
4212                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4213                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
4214                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
4215                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
4216                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4217                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
4218                 </fields>
4219                 <links>
4220                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4221                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
4222                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
4223                 </links>
4224         </class>
4225         <class id="pugm" controller="open-ils.cstore" oils_obj:fieldmapper="permission::usr_grp_map" oils_persist:tablename="permission.usr_grp_map" reporter:label="User Group Map">
4226                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
4227                         <field name="grp" />
4228                         <field name="id" reporter:datatype="id" />
4229                         <field name="usr" />
4230                 </fields>
4231                 <links>
4232                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
4233                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4234                 </links>
4235         </class>
4236         <class id="i18n" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_core" oils_persist:tablename="config.i18n_core" oils_persist:field_safe="true" reporter:label="i18n Core">
4237                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
4238                         <field name="id" reporter:datatype="id" />
4239                         <field name="fq_field" reporter:datatype="text"/>
4240                         <field name="identity_value" reporter:datatype="text"/>
4241                         <field name="translation" reporter:datatype="text"/>
4242                         <field name="string" reporter:datatype="text"/>
4243                 </fields>
4244                 <links>
4245                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
4246                 </links>
4247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4248             <actions>
4249                 <create permission="CREATE_TRANSLATION" global_required="true"/>
4250                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
4251                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
4252                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
4253             </actions>
4254         </permacrud>
4255         </class>
4256         <class id="fdoc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::idl_field_doc" oils_persist:tablename="config.idl_field_doc" oils_persist:field_safe="true" reporter:label="IDL Field Doc">
4257                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
4258                         <field name="id" reporter:datatype="id" />
4259                         <field name="fm_class" reporter:datatype="text"/>
4260                         <field name="field" reporter:datatype="text"/>
4261                         <field name="owner" reporter:datatype="org_unit"/>
4262                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
4263                 </fields>
4264                 <links>
4265                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4266                 </links>
4267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4268             <actions>
4269                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4270                 <retrieve/>
4271                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4272                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
4273             </actions>
4274         </permacrud>
4275         </class>
4276         <class id="i18n_l" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::i18n_locale" oils_persist:tablename="config.i18n_locale" oils_persist:field_safe="true" reporter:label="Locale">
4277                 <fields oils_persist:primary="code">
4278                         <field name="code" reporter:datatype="id" />
4279                         <field name="marc_code" reporter:datatype="text"/>
4280                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4281                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
4282                 </fields>
4283                 <links/>
4284         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4285             <actions>
4286                 <create permission="CREATE_LOCALE" global_required="true"/>
4287                 <retrieve permission="CREATE_LOCALE UPDATE_LOCALE DELETE_LOCALE" global_required="true"/>
4288                 <update permission="UPDATE_LOCALE" global_required="true"/>
4289                 <delete permission="DELETE_LOCALE" global_required="true"/>
4290             </actions>
4291         </permacrud>
4292         </class>
4293         <class id="cbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::billing_type" oils_persist:tablename="config.billing_type" oils_persist:restrict_primary="100" reporter:label="Billing Type">
4294                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
4295                         <field name="id" reporter:datatype="id" reporter:label="ID" />
4296                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
4297                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
4298             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
4299                 </fields>
4300                 <links>
4301                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4302                 </links>
4303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4304             <actions>
4305                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
4306                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
4307                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
4308                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
4309             </actions>
4310         </permacrud>
4311         </class>
4312         <class id="acqct" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::currency_type" oils_persist:tablename="acq.currency_type" reporter:label="Currency Type">
4313                 <fields oils_persist:primary="code">
4314                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
4315                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
4316                 </fields>
4317                 <links/>
4318         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4319             <actions>
4320                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4321                 <retrieve/>
4322                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4323                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4324             </actions>
4325         </permacrud>
4326         </class>
4327
4328         <class id="acqexr" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::exchange_rate" oils_persist:tablename="acq.exchange_rate" reporter:label="Exchange Rate">
4329                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
4330                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
4331                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
4332                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
4333                         <field reporter:label="Ratio" name="ratio" />
4334                 </fields>
4335                 <links>
4336                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
4337                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
4338                 </links>
4339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4340                         <actions>
4341                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4342                                 <retrieve/>
4343                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4344                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
4345                         </actions>
4346                 </permacrud>
4347         </class>
4348
4349         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
4350                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
4351                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4352                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4353                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4354                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4355                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4356                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
4357                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
4358                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
4359                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
4360                 </fields>
4361                 <links>
4362                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4363                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4364             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
4365             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
4366                 </links>
4367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4368             <actions>
4369                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
4370                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
4371                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
4372                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
4373             </actions>
4374         </permacrud>
4375         </class>
4376
4377         <class id="acqpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_address" oils_persist:tablename="acq.provider_address" reporter:label="Provider Address">
4378                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
4379                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
4380                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4381                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4382                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4383                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4384                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4385                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
4386                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4387                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
4388                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
4389                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
4390                 </fields>
4391                 <links>
4392                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4393                 </links>
4394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4395             <actions>
4396                 <create permission="ADMIN_PROVIDER">
4397                     <context link="provider" field="owner"/>
4398                 </create>
4399                 <retrieve permission="ADMIN_PROVIDER">
4400                     <context link="provider" field="owner"/>
4401                 </retrieve>
4402                 <update permission="ADMIN_PROVIDER">
4403                     <context link="provider" field="owner"/>
4404                 </update>
4405                 <delete permission="ADMIN_PROVIDER">
4406                     <context link="provider" field="owner"/>
4407                 </delete>
4408             </actions>
4409         </permacrud>
4410         </class>
4411
4412         <class id="acqpc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact" oils_persist:tablename="acq.provider_contact" reporter:label="Provider Contact">
4413                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
4414                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4415                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4416                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4417                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
4418                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
4419                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
4420         </fields>
4421                 <links>
4422                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4423                 </links>
4424         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4425             <actions>
4426                 <create permission="ADMIN_PROVIDER">
4427                     <context link="provider" field="owner"/>
4428                 </create>
4429                 <retrieve permission="ADMIN_PROVIDER">
4430                     <context link="provider" field="owner"/>
4431                 </retrieve>
4432                 <update permission="ADMIN_PROVIDER">
4433                     <context link="provider" field="owner"/>
4434                 </update>
4435                 <delete permission="ADMIN_PROVIDER">
4436                     <context link="provider" field="owner"/>
4437                 </delete>
4438             </actions>
4439         </permacrud>
4440     </class>
4441         <class id="acqpca" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_contact_address" oils_persist:tablename="acq.provider_contact_address" reporter:label="Provider Contact Address">
4442                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
4443                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
4444                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
4445                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
4446                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
4447                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
4448                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
4449                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
4450                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
4451                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
4452                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
4453                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
4454                 </fields>
4455                 <links>
4456                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
4457                 </links>
4458         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4459             <actions>
4460                 <create permission="ADMIN_PROVIDER">
4461                     <context link="contact" jump='provider' field="owner"/>
4462                 </create>
4463                 <retrieve permission="ADMIN_PROVIDER">
4464                     <context link="contact" jump='provider' field="owner"/>
4465                 </retrieve>
4466                 <update permission="ADMIN_PROVIDER">
4467                     <context link="contact" jump='provider' field="owner"/>
4468                 </update>
4469                 <delete permission="ADMIN_PROVIDER">
4470                     <context link="contact" jump='provider' field="owner"/>
4471                 </delete>
4472             </actions>
4473         </permacrud>
4474         </class>
4475
4476         <class id="acqftr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
4477                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
4478                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
4479                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
4480                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
4481                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
4482                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
4483                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
4484                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
4485                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4486                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
4487                 </fields>
4488                 <links>
4489                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
4490                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
4491                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
4492                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
4493                 </links>
4494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4495                 </permacrud>
4496         </class>
4497
4498         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
4499                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
4500                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4501                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
4502                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
4503                 </fields>
4504                 <links>
4505             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
4506                 </links>
4507                 <!--
4508                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4509                         But here's what it should look like if we ever do use pcrud.
4510                 -->
4511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4512                         <actions>
4513                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4514                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4515                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4516                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4517                         </actions>
4518                 </permacrud>
4519         </class>
4520
4521         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
4522                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
4523                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='id'/>
4524                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
4525                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
4526                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
4527                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
4528                 </fields>
4529                 <links>
4530                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4531                 </links>
4532                 <!--
4533                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
4534                         But here's what it should look like if we ever do use pcrud.
4535                 -->
4536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4537                         <actions>
4538                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4539                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4540                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4541                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
4542                         </actions>
4543                 </permacrud>
4544         </class>
4545
4546         <class id="acqfs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source" oils_persist:tablename="acq.funding_source" reporter:label="Funding Source">
4547                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
4548                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4549                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4550                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
4551                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
4552                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4553                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4554                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4555                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
4556                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4557                 </fields>
4558                 <links>
4559                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4560                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4561             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
4562             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
4563                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
4564                 </links>
4565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4566             <actions>
4567                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4568                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
4569                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4570                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
4571             </actions>
4572         </permacrud>
4573         </class>
4574
4575         <class id="acqfscred" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
4576                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
4577                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
4578                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
4579                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4580                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4581                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
4582                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
4583                 </fields>
4584                 <links>
4585                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4586                 </links>
4587         </class>
4588
4589         <class id="acqofscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
4590                 <fields oils_persist:primary="id">
4591                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
4592                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
4593                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
4594                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
4595                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
4596                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4597                 </fields>
4598                 <links>
4599                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4600                 </links>
4601                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4602                 </permacrud>
4603         </class>
4604
4605         <class id="acqfdeb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
4606                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
4607                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
4608                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4609                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
4610                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
4611                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4612                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="text" />
4613                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
4614                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4615                 </fields>
4616                 <links>
4617                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4618                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4619                 </links>
4620         </class>
4621
4622         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
4623                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
4624                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
4625                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4626                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4627                         <field reporter:label="Year" name="year" reporter:datatype="int" />
4628                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
4629                         <field reporter:label="Code" name="code" reporter:datatype="text" />
4630                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
4631                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
4632                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
4633                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
4634                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
4635                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
4636                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
4637                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
4638                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
4639                 </fields>
4640                 <links>
4641                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4642                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
4643             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
4644             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
4645             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
4646                 </links>
4647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4648             <actions>
4649                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
4650                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
4651                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
4652                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
4653             </actions>
4654         </permacrud>
4655         </class>
4656
4657         <class id="acqfat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_allocation_total" reporter:label="Fund Allocation Total">
4658                 <fields oils_persist:primary="fund">
4659                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4660                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
4661                 </fields>
4662                 <links>
4663                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4664                 </links>
4665         </class>
4666
4667         <class id="acqfdt" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_debit_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_debit_total" reporter:label="Total Debit from Fund">
4668                 <fields oils_persist:primary="fund">
4669                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4670                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
4671                 </fields>
4672                 <links>
4673                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4674                 </links>
4675         </class>
4676
4677         <class id="acqfet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_encumbrance_total" reporter:label="Total Fund Encumbrance">
4678                 <fields oils_persist:primary="fund">
4679                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4680                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
4681                 </fields>
4682                 <links>
4683                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4684                 </links>
4685         </class>
4686
4687         <class id="acqfst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_total" reporter:label="Total Spent from Fund">
4688                 <fields oils_persist:primary="fund">
4689                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4690                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
4691                 </fields>
4692                 <links>
4693                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4694                 </links>
4695         </class>
4696
4697         <class id="acqfcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_combined_balance" reporter:label="Fund Combined Balance">
4698                 <fields oils_persist:primary="fund">
4699                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4700                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
4701                 </fields>
4702                 <links>
4703                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4704                 </links>
4705         </class>
4706
4707         <class id="acqfsrcct" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_credit_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_credit_total" reporter:label="Total Credit to Funding Source">
4708                 <fields oils_persist:primary="funding_source">
4709                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4710                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
4711                 </fields>
4712                 <links>
4713                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4714                 </links>
4715         </class>
4716
4717         <class id="acqfsrcat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_allocation_total" reporter:label="Total Allocation to Funding Source">
4718                 <fields oils_persist:primary="funding_source">
4719                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4720                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
4721                 </fields>
4722                 <links>
4723                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4724                 </links>
4725         </class>
4726
4727         <class id="acqfsrcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::funding_source_balance" oils_persist:readonly="true" oils_persist:tablename="acq.funding_source_balance" reporter:label="Funding Source Balance">
4728                 <fields oils_persist:primary="funding_source">
4729                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4730                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
4731                 </fields>
4732                 <links>
4733                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4734                 </links>
4735         </class>
4736
4737         <class id="acqfsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.fund_spent_balance" reporter:label="Fund Spent Balance">
4738                 <fields oils_persist:primary="fund">
4739                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
4740                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
4741                 </fields>
4742                 <links>
4743                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4744                 </links>
4745         </class>
4746
4747         <class id="acqfa" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
4748                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
4749                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
4750                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
4751                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4752                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4753                         <field reporter:label="Percent" name="percent" reporter:datatype="float" />
4754                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
4755                         <field reporter:label="Note" name="note" reporter:datatype="text" />
4756                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4757                 </fields>
4758                 <links>
4759                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
4760                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
4761                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4762                 </links>
4763         </class>
4764
4765     <class id="acqfap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation_percent" oils_persist:tablename="acq.fund_allocation_percent" reporter:label="Fund Allocation Percent">
4766         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
4767             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
4768             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
4769             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
4770             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
4771             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
4772             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
4773             <field reporter:label="Note" name="note" reporter:datatype="text" />
4774             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
4775         </fields>
4776         <links>
4777             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
4778             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4779             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
4780         </links>
4781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4782                         <actions>
4783                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4784                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4785                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4786                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
4787                         </actions>
4788                 </permacrud>
4789     </class>
4790
4791         <class id="acqpl" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Pick List">
4792                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
4793                         <field reporter:label="Picklist ID" name="id" reporter:datatype="id" />
4794                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4795                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link" />
4796                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
4797                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4798                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4799                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
4800                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
4801                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4802                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4803                 </fields>
4804                 <links>
4805                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4806                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4807                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4808                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4809                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
4810                 </links>
4811         </class>
4812
4813         <class id="acqpo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::purchase_order" oils_persist:tablename="acq.purchase_order" reporter:label="Purchase Order">
4814                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
4815                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" />
4816                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
4817                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4818                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4819                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4820                         <field reporter:label="State" name="state" reporter:datatype="text" />
4821                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
4822                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4823                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4824                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
4825                         <field reporter:label="Name" name="name" reporter:datatype="text" />
4826                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
4827                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="link" />
4828                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
4829                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
4830                 </fields>
4831                 <links>
4832                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4833                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4834                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4835                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
4836                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4837                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
4838                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
4839                 </links>
4840                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4841                         <actions>
4842                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4843                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
4844                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4845                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
4846                         </actions>
4847                 </permacrud>
4848         </class>
4849
4850         <class id="acqpoh" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_purchase_order_history" oils_persist:tablename="acq.acq_purchase_order_history" reporter:label="Purchase Order History">
4851                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
4852                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
4853                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
4854                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
4855                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
4856                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
4857                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4858                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4859                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
4860                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
4861                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
4862                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4863                         <field reporter:label="State" name="state" reporter:datatype="text"/>
4864                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
4865                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4866                 </fields>
4867                 <links>
4868                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
4869                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4870                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4871                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4872                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
4873                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4874                 </links>
4875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4876                 </permacrud>
4877         </class>
4878
4879         <class id="acqpon" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
4880                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
4881                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
4882                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4883                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4884                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4885                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4886                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4887                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4888                 </fields>
4889                 <links>
4890                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4891                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4892                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4893                 </links>
4894         </class>
4895
4896         <class id="jub" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
4897                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
4898                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
4899                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
4900                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link" />
4901                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
4902                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
4903                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4904                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4905                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
4906                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
4907                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
4908                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
4909                         <field reporter:label="State" name="state" reporter:datatype="text" />
4910                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4911                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4912                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
4913                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
4914                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
4915                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
4916                 </fields>
4917                 <links>
4918                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
4919                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4920                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4921                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4922                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4923                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
4924                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
4925                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
4926                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
4927                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
4928                 </links>
4929         </class>
4930
4931         <class id="acqlih" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::acq_lineitem_history" oils_persist:tablename="acq.acq_lineitem_history" reporter:label="Line Item History">
4932                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
4933                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
4934                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
4935                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
4936                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
4937                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4938                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4939                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
4940                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
4941                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
4942                         <field reporter:label="Picklist" name="picklist" reporter:datatype="link"/>
4943                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
4944                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
4945                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
4946                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4947                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
4948                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
4949                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
4950                         <field reporter:label="State" name="state" reporter:datatype="text"/>
4951                 </fields>
4952                 <links>
4953                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
4954                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4955                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4956                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
4957                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
4958                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
4959                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
4960                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
4961                 </links>
4962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4963                 </permacrud>
4964         </class>
4965
4966         <class id="acqlin" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_note" oils_persist:tablename="acq.lineitem_note" reporter:label="Line Item Note">
4967                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
4968                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
4969                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
4970                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
4971                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
4972                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
4973                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
4974                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
4975                 </fields>
4976                 <links>
4977                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4978                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4979                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4980                 </links>
4981         </class>
4982
4983         <class id="acqlia" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr" oils_persist:tablename="acq.lineitem_attr" reporter:label="Line Item Attribute">
4984                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
4985                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
4986                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
4987                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
4988                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
4989                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
4990                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
4991                 </fields>
4992                 <links>
4993                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
4994                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
4995                 </links>
4996         </class>
4997
4998         <class id="acqlid" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_detail" oils_persist:tablename="acq.lineitem_detail" reporter:label="Line Item Detail">
4999                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
5000                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
5001                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5002                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
5003                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
5004                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
5005                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
5006                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
5007                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
5008                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
5009                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
5010                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
5011                         <field reporter:label="Note" name="note" reporter:datatype="text" />
5012                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
5013                 </fields>
5014                 <links>
5015                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5016                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
5017                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
5018                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5019                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5020                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5021                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5022                 </links>
5023         </class>
5024
5025         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
5026                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5027                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5028                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5029                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5030                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5031                 </fields>
5032                 <links/>
5033         </class>
5034
5035         <class id="acqlimad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
5036                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5037                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5038                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5039                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5040                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5041                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5042                 </fields>
5043                 <links/>
5044         </class>
5045
5046         <class id="acqligad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_generated_attr_definition" oils_persist:tablename="acq.lineitem_generated_attr_definition" reporter:label="Line Item Generated Attribute Definition">
5047                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5048                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5049                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5050                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5051                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5052                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5053                 </fields>
5054                 <links/>
5055         </class>
5056         <class id="acqliuad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_usr_attr_definition" oils_persist:tablename="acq.lineitem_usr_attr_definition" reporter:label="Line Item User Attribute Definition">
5057                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5058                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5059                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5060                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5061                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5062                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5063                 </fields>
5064                 <links>
5065                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5066                 </links>
5067         </class>
5068
5069         <class id="acqlipad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_provider_attr_definition" oils_persist:tablename="acq.lineitem_provider_attr_definition" reporter:label="Line Item Provider Attribute Definition">
5070             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5071                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5072                 <field reporter:label="Code" name="code" reporter:datatype="text" />
5073                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5074                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
5075                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5076                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5077         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
5078
5079             </fields>
5080             <links>
5081                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5082             </links>
5083             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5084                 <actions>
5085                     <create permission="ADMIN_PROVIDER">
5086                         <context link="provider" field="owner"/>
5087                     </create>
5088                     <retrieve permission="ADMIN_PROVIDER">
5089                         <context link="provider" field="owner"/>
5090                     </retrieve>
5091                     <update permission="ADMIN_PROVIDER">
5092                         <context link="provider" field="owner"/>
5093                     </update>
5094                     <delete permission="ADMIN_PROVIDER">
5095                         <context link="provider" field="owner"/>
5096                     </delete>
5097                 </actions>
5098             </permacrud>
5099         </class>
5100         
5101         <class id="acqphsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider_holding_subfield_map" oils_persist:tablename="acq.provider_holding_subfield_map" reporter:label="Provider Holding Subfield Map">
5102             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
5103                 <field reporter:label="ID" name="id" reporter:datatype="id" />
5104                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
5105                 <field reporter:label="Name" name="name" reporter:datatype="text" />
5106                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
5107             </fields>
5108             <links>
5109                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5110             </links>
5111             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5112                 <actions>
5113                     <create permission="ADMIN_PROVIDER">
5114                         <context link="provider" field="owner"/>
5115                     </create>
5116                     <retrieve permission="ADMIN_PROVIDER">
5117                         <context link="provider" field="owner"/>
5118                     </retrieve>
5119                     <update permission="ADMIN_PROVIDER">
5120                         <context link="provider" field="owner"/>
5121                     </update>
5122                     <delete permission="ADMIN_PROVIDER">
5123                         <context link="provider" field="owner"/>
5124                     </delete>
5125                 </actions>
5126             </permacrud>
5127         </class>
5128         
5129         <class id="acqlilad" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::lineitem_local_attr_definition" oils_persist:tablename="acq.lineitem_local_attr_definition" reporter:label="Line Item Local Attribute Definition">
5130             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
5131                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
5132                         <field reporter:label="Code" name="code" reporter:datatype="text" />
5133                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
5134                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
5135                 </fields>
5136                 <links/>
5137         </class>
5138
5139         <class id="acqedi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_account" oils_persist:tablename="acq.edi_account" reporter:label="EDI Account">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
5141                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID"/>
5142                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
5143                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
5144                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
5145                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
5146                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
5147                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
5148                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
5149                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
5150                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
5151                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
5152                 </fields>
5153                 <links>
5154                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
5155                 </links>
5156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5157             <actions>
5158                 <create permission="ADMIN_PROVIDER">
5159                     <context link="provider" field="owner"/>
5160                 </create>
5161                 <retrieve permission="ADMIN_PROVIDER">
5162                     <context link="provider" field="owner"/>
5163                 </retrieve>
5164                 <update permission="ADMIN_PROVIDER">
5165                     <context link="provider" field="owner"/>
5166                 </update>
5167                 <delete permission="ADMIN_PROVIDER">
5168                     <context link="provider" field="owner"/>
5169                 </delete>
5170             </actions>
5171         </permacrud>
5172         </class>
5173
5174         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
5175                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
5176                         <field name="id" reporter:datatype="id" />
5177                         <field name="parent" reporter:datatype="link"/>
5178                         <field name="owner" reporter:datatype="link"/>
5179                         <field name="create_time" reporter:datatype="timestamp"/>
5180                         <field name="name" reporter:datatype="text"/>
5181                         <field name="shared" reporter:datatype="bool"/>
5182                         <field name="share_with" reporter:datatype="link"/>
5183                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5184                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
5185                 </fields>
5186                 <links>
5187                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5188                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
5189                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
5190                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5191                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
5192                 </links>
5193         </class>
5194         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
5195                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
5196                         <field name="id" reporter:datatype="id" />
5197                         <field name="parent" reporter:datatype="link"/>
5198                         <field name="owner" reporter:datatype="link"/>
5199                         <field name="create_time" reporter:datatype="timestamp"/>
5200                         <field name="name" reporter:datatype="text"/>
5201                         <field name="shared" reporter:datatype="bool"/>
5202                         <field name="share_with" reporter:datatype="link"/>
5203                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5204                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
5205                 </fields>
5206                 <links>
5207                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5208                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
5209                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
5210                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5211                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
5212                 </links>
5213         </class>
5214         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
5215                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
5216                         <field name="id" reporter:datatype="id" />
5217                         <field name="parent" reporter:datatype="link"/>
5218                         <field name="owner" reporter:datatype="link"/>
5219                         <field name="create_time" reporter:datatype="timestamp"/>
5220                         <field name="name" reporter:datatype="text"/>
5221                         <field name="shared" reporter:datatype="bool"/>
5222                         <field name="share_with" reporter:datatype="link"/>
5223                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5224                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5225                 </fields>
5226                 <links>
5227                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5228                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
5229                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
5230                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
5231                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
5232                 </links>
5233         </class>
5234         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
5235                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
5236                         <field name="id" reporter:datatype="id" />
5237                         <field name="owner" reporter:datatype="link"/>
5238                         <field name="create_time" reporter:datatype="timestamp"/>
5239                         <field name="name" reporter:datatype="text"/>
5240                         <field name="data" reporter:datatype="text"/>
5241                         <field name="folder" reporter:datatype="link"/>
5242                         <field name="description" reporter:datatype="text"/>
5243                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
5244                 </fields>
5245                 <links>
5246                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5247                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
5248                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
5249                 </links>
5250         </class>
5251         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
5252                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
5253                         <field name="id" reporter:datatype="id" />
5254                         <field name="owner" reporter:datatype="link"/>
5255                         <field name="create_time" reporter:datatype="timestamp"/>
5256                         <field name="template" reporter:datatype="link"/>
5257                         <field name="data" reporter:datatype="link"/>
5258                         <field name="folder" reporter:datatype="link"/>
5259                         <field name="recur" reporter:datatype="bool"/>
5260                         <field name="recurrence" reporter:datatype="interval"/>
5261                         <field name="name" reporter:datatype="text"/>
5262                         <field name="description" reporter:datatype="text"/>
5263                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
5264                 </fields>
5265                 <links>
5266                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5267                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
5268                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
5269                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
5270                 </links>
5271         </class>
5272         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
5273                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
5274                         <field name="id" reporter:datatype="id" />
5275                         <field name="runner" reporter:datatype="link"/>
5276                         <field name="start_time" reporter:datatype="timestamp"/>
5277                         <field name="complete_time" reporter:datatype="timestamp"/>
5278                         <field name="run_time" reporter:datatype="timestamp"/>
5279                         <field name="email" reporter:datatype="text"/>
5280                         <field name="excel_format" reporter:datatype="bool"/>
5281                         <field name="csv_format" reporter:datatype="bool"/>
5282                         <field name="html_format" reporter:datatype="bool"/>
5283                         <field name="error_code" reporter:datatype="int"/>
5284                         <field name="error_text" reporter:datatype="text"/>
5285                         <field name="report" reporter:datatype="link"/>
5286                         <field name="folder" reporter:datatype="link"/>
5287                         <field name="chart_pie" reporter:datatype="bool"/>
5288                         <field name="chart_bar" reporter:datatype="bool"/>
5289                         <field name="chart_line" reporter:datatype="bool"/>
5290                 </fields>
5291                 <links>
5292                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
5293                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
5294                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
5295                 </links>
5296         </class>
5297         <class id="rmsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
5298                 <fields oils_persist:primary="id">
5299                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5300                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5301                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5302                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5303                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5304                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5305                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5306                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5307                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5308                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5309                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5310                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5311                 </fields>
5312                 <links>
5313                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5314                 </links>
5315         </class>
5316         <class id="rssr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::super_simple_record" oils_persist:tablename="reporter.super_simple_record" reporter:label="Simple Record Extracts">
5317                 <fields oils_persist:primary="id">
5318                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5319                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
5320                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5321                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5322                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5323                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5324                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5325                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5326                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5327                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5328                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5329                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5330                 </fields>
5331                 <links>
5332                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5333                 </links>
5334         </class>
5335         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
5336                 <fields oils_persist:primary="id">
5337                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5338                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
5339                         <field reporter:label="Fingerprint" name="fingerprint" />
5340                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
5341                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
5342                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
5343                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
5344                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
5345                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
5346                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
5347                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
5348                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
5349                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
5350                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
5351                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
5352                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
5353                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
5354                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
5355                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
5356                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
5357                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
5358                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
5359                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
5360                 </fields>
5361                 <links>
5362                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
5363                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
5364                 </links>
5365         </class>
5366         <class id="rud" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::user_demographic" oils_persist:tablename="reporter.demographic" reporter:label="User Demographics">
5367                 <fields oils_persist:primary="id">
5368                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
5369                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
5370                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
5371                 </fields>
5372                 <links>
5373                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
5374                 </links>
5375         </class>
5376         <class id="rcirct" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::circulation_type" oils_persist:tablename="reporter.circ_type" reporter:label="Circulation Type">
5377                 <fields oils_persist:primary="id">
5378                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
5379                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
5380                 </fields>
5381                 <links>
5382                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
5383                 </links>
5384         </class>
5385         <class id="rhrr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::hold_request_record" oils_persist:tablename="reporter.hold_request_record" reporter:label="Hold Request Record">
5386                 <fields oils_persist:primary="id">
5387                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5388                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
5389                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
5390                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
5391                 </fields>
5392                 <links>
5393                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
5394                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
5395                 </links>
5396         </class>
5397         <class id="rxbt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_billing_totals" oils_persist:tablename="reporter.xact_billing_totals" reporter:label="Transaction Billing Totals">
5398                 <fields oils_persist:primary="xact">
5399                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5400                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
5401                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
5402                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
5403                 </fields>
5404                 <links>
5405                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5406                 </links>
5407         </class>
5408         <class id="rxpt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::xact_paid_totals" oils_persist:tablename="reporter.xact_paid_totals" reporter:label="Transaction Paid Totals">
5409                 <fields oils_persist:primary="xact">
5410                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
5411                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
5412                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
5413                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
5414                 </fields>
5415                 <links>
5416                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
5417                 </links>
5418         </class>
5419         <class id="ergbhu" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::global_bibs_by_holding_update" oils_persist:tablename="extend_reporter.global_bibs_by_holding_update" reporter:label="Bib IDs by Holding Add/Delete Time (OCLC batch update)">
5420                 <fields oils_persist:primary="id">
5421                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
5422                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
5423                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
5424                 </fields>
5425                 <links>
5426                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
5427                 </links>
5428         </class>
5429         <class id="erfcc" controller="open-ils.reporter-store" oils_obj:fieldmapper="extend_reporter::full_circ_count" oils_persist:tablename="extend_reporter.full_circ_count" reporter:label="Total Circulation Count, Including Legacy">
5430                 <fields oils_persist:primary="id">
5431                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
5432                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
5433                 </fields>
5434                 <links>
5435                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
5436                 </links>
5437         </class>
5438         <class id="acqdf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula" oils_persist:tablename="acq.distribution_formula" reporter:label="Distribution Formula">
5439                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
5440                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
5441                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
5442                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
5443                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
5444                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5445                 </fields>
5446                 <links>
5447                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5448                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
5449                 </links>
5450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5451                         <actions>
5452                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5453                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5454                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5455                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
5456                         </actions>
5457                 </permacrud>
5458         </class>
5459         <class id="acqdfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_entry" oils_persist:tablename="acq.distribution_formula_entry" reporter:label="Distribution Formula Entry">
5460                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
5461                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
5462                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
5463                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
5464                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
5465                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
5466                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5467                 </fields>
5468                 <links>
5469                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
5470                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5471                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5472                 </links>
5473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5474                         <actions>
5475                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
5476                                         <context link="formula" field="owner"/>
5477                                 </create>
5478                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
5479                                         <context link="formula" field="owner"/>
5480                                 </retrieve>
5481                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
5482                                         <context link="formula" field="owner"/>
5483                                 </update>
5484                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
5485                                         <context link="formula" field="owner"/>
5486                                 </delete>
5487                         </actions>
5488                 </permacrud>
5489         </class>
5490
5491         <class id="acqda" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
5492                 <fields oils_persist:primary="id">
5493                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
5494                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
5495                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
5496                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
5497                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
5498                 </fields>
5499                 <links>
5500                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
5501                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
5502                 </links>
5503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5504                 </permacrud>
5505         </class>
5506
5507     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
5508         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
5509             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5510             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5511             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5512             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
5513             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5514             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
5515             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
5516             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
5517             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
5518             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
5519             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
5520             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
5521             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
5522             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
5523             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5524         </fields>
5525     </class>
5526
5527     <class id="stgc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::card_stage" oils_persist:tablename="staging.card_stage" reporter:label="Card Stage">
5528         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
5529             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5530             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5531             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5532             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5533             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5534         </fields>
5535     </class>
5536
5537     <class id="stgma" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::mailing_address_stage" oils_persist:tablename="staging.mailing_address_stage" reporter:label="Mailing Address Stage">
5538         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
5539             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5540             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5541             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5542             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5543             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5544             <field reporter:label="City" name="city" reporter:datatype="text"/>
5545             <field reporter:label="State" name="state" reporter:datatype="text"/>
5546             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5547             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5548             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5549         </fields>
5550     </class>
5551
5552     <class id="stgba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::billing_address_stage" oils_persist:tablename="staging.billing_address_stage" reporter:label="Billing Address Stage">
5553         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
5554             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5555             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5556             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5557             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
5558             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
5559             <field reporter:label="City" name="city" reporter:datatype="text"/>
5560             <field reporter:label="State" name="state" reporter:datatype="text"/>
5561             <field reporter:label="Country" name="country" reporter:datatype="text"/>
5562             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
5563             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5564         </fields>
5565     </class>
5566
5567     <class id="stgsc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="staging::statcat_stage" oils_persist:tablename="staging.statcat_stage" reporter:label="Statistical Category Stage">
5568         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
5569             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
5570             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
5571             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
5572             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
5573             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
5574             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
5575         </fields>
5576     </class>
5577
5578     <class id="aufhl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_loops" oils_persist:tablename="action.unfulfilled_hold_loops" oils_persist:readonly="true">
5579                 <oils_persist:source_definition>
5580
5581             SELECT  u.hold,
5582                     c.circ_lib,
5583                     count(*)
5584               FROM  action.unfulfilled_hold_list u
5585                     JOIN asset.copy c ON (c.id = u.current_copy)
5586               GROUP BY 1,2
5587
5588                 </oils_persist:source_definition>
5589         <fields>
5590             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5591             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5592             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5593         </fields>
5594                 <links>
5595                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5596                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5597                 </links>
5598     </class>
5599
5600     <class id="aufhml" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_min_loop" oils_persist:tablename="action.unfulfilled_hold_min_loop" oils_persist:readonly="true">
5601                 <oils_persist:source_definition>
5602
5603             SELECT  hold,
5604                     min(count)
5605               FROM  action.unfulfilled_hold_loops
5606               GROUP BY 1
5607
5608                 </oils_persist:source_definition>
5609         <fields>
5610             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5611             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
5612         </fields>
5613                 <links>
5614                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5615                 </links>
5616     </class>
5617
5618     <class id="aufhil" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_innermost_loop" oils_persist:tablename="action.unfulfilled_hold_innermost_loop" oils_persist:readonly="true">
5619                 <oils_persist:source_definition>
5620
5621             SELECT  DISTINCT l.*
5622               FROM  action.unfulfilled_hold_loops l
5623                     JOIN action.unfulfilled_hold_min_loop m USING (hold)
5624               WHERE l.count = m.min
5625
5626                 </oils_persist:source_definition>
5627         <fields>
5628             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5629             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5630             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5631         </fields>
5632                 <links>
5633                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5634                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5635                 </links>
5636     </class>
5637
5638     <class id="aufhmxl" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_max_loop" oils_persist:tablename="action.unfulfilled_hold_max_loop" oils_persist:readonly="true">
5639                 <oils_persist:source_definition>
5640
5641             SELECT  hold,
5642                     max(count)
5643               FROM  action.unfulfilled_hold_loops
5644               GROUP BY 1
5645
5646                 </oils_persist:source_definition>
5647         <fields>
5648             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5649             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
5650         </fields>
5651                 <links>
5652                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5653                 </links>
5654     </class>
5655
5656     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:tablename="action.unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
5657                 <oils_persist:source_definition>
5658
5659             SELECT  DISTINCT l.*
5660               FROM  action.unfulfilled_hold_loops l
5661                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
5662               WHERE l.count = m.max
5663
5664                 </oils_persist:source_definition>
5665         <fields>
5666             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5667             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
5668             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
5669         </fields>
5670                 <links>
5671                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5672                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5673                 </links>
5674     </class>
5675
5676         <class id="qsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
5677                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
5678                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
5679                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
5680                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
5681                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
5682                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="int"/>
5683                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="int"/>
5684                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="int"/>
5685                 </fields>
5686                 <links>
5687                 </links>
5688                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5689                 </permacrud>
5690         </class>
5691
5692         <class id="qseq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
5693                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
5694                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
5695                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
5696                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5697                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
5698                 </fields>
5699                 <links>
5700                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
5701                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
5702                 </links>
5703                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5704                 </permacrud>
5705         </class>
5706
5707         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
5708                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
5709                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
5710                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
5711                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
5712                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
5713                 </fields>
5714                 <links>
5715                 </links>
5716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5717                 </permacrud>
5718         </class>
5719
5720         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
5721                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
5722                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
5723                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
5724                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5725                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
5726                 </fields>
5727                 <links>
5728                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
5729                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
5730                 </links>
5731                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5732                 </permacrud>
5733         </class>
5734         
5735         <class id="qfs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
5736                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
5737                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
5738                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
5739                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
5740                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
5741                 </fields>
5742                 <links>
5743                         <link field="return_type" reltype="might_have" key="id" map="" class="qdt"/>
5744                 </links>
5745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5746                 </permacrud>
5747         </class>
5748         
5749         <class id="qfpd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
5750                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
5751                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
5752                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
5753                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5754                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
5755                 </fields>
5756                 <links>
5757                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
5758                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
5759                 </links>
5760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5761                 </permacrud>
5762         </class>
5763
5764         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
5765                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5766                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5767                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
5768                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5769                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5770                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5771                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5772                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
5773                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5774                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5775                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
5776                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
5777                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
5778                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5779                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
5780                 </fields>
5781                 <links>
5782                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5783                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5784                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
5785                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
5786                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5787                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
5788                 </links>
5789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5790                 </permacrud>
5791         </class>
5792
5793         <class id="qcb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
5794                 <fields oils_persist:primary="id" oils_persist:sequence="case_branch_id_seq">
5795                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
5796                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5797                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5798                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
5799                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
5800                 </fields>
5801                 <links>
5802                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
5803                         <link field="condition" reltype="might_have" key="id" map="" class="qxp"/>
5804                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
5805                 </links>
5806                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5807                 </permacrud>
5808         </class>
5809
5810         <class id="qfr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
5811                 <fields oils_persist:primary="id" oils_persist:sequence="from_relation_id_seq">
5812                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
5813                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
5814                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
5815                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
5816                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
5817                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
5818                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
5819                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
5820                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5821                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
5822                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
5823                 </fields>
5824                 <links>
5825                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5826                         <link field="function_call" reltype="might_have" key="id" map="" class="qxp"/>
5827                         <link field="parent_relation" reltype="might_have" key="id" map="" class="qfr"/>
5828                         <link field="on_clause" reltype="might_have" key="id" map="" class="qxp"/>
5829                 </links>
5830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5831                 </permacrud>
5832         </class>
5833
5834         <class id="qrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
5835                 <fields oils_persist:primary="id" oils_persist:sequence="record_column_id_seq">
5836                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
5837                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
5838                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5839                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5840                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
5841                 </fields>
5842                 <links>
5843                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
5844                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
5845                 </links>
5846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5847                 </permacrud>
5848         </class>
5849
5850         <class id="qsi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
5851                 <fields oils_persist:primary="id" oils_persist:sequence="select_item_id_seq">
5852                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
5853                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
5854                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5855                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
5856                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
5857                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
5858                 </fields>
5859                 <links>
5860                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
5861                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
5862                 </links>
5863                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5864                 </permacrud>
5865         </class>
5866
5867         <class id="qobi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
5868                 <fields oils_persist:primary="id" oils_persist:sequence="order_by_item_id_seq">
5869                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
5870                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
5871                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5872                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
5873                 </fields>
5874                 <links>
5875                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
5876                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
5877                 </links>
5878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5879                 </permacrud>
5880         </class>
5881
5882         <class id="xbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
5883                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5884                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5885                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5886                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5887                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5888                 </fields>
5889                 <links>
5890                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5891                 </links>
5892                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5893                 </permacrud>
5894         </class>
5895
5896         <class id="xbool" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
5897                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5898                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5899                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5900                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5901                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5902                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
5903                 </fields>
5904                 <links>
5905                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5906                 </links>
5907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5908                 </permacrud>
5909         </class>
5910
5911         <class id="xcase" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
5912                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5913                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5914                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5915                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5916                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5917                 </fields>
5918                 <links>
5919                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5920                 </links>
5921                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5922                 </permacrud>
5923         </class>
5924
5925         <class id="xcast" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
5926                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5927                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5928                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5929                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5930                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5931                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5932                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
5933                 </fields>
5934                 <links>
5935                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5936                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5937                         <link field="cast_type" reltype="might_have" key="id" map="" class="qdt"/>
5938                 </links>
5939                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5940                 </permacrud>
5941         </class>
5942
5943         <class id="xcol" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
5944                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5945                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5946                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5947                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5948                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5949                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
5950                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5951                 </fields>
5952                 <links>
5953                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5954                 </links>
5955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5956                 </permacrud>
5957         </class>
5958
5959         <class id="xex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
5960                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5961                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5962                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5963                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5964                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5965                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
5966                 </fields>
5967                 <links>
5968                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5969                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
5970                 </links>
5971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5972                 </permacrud>
5973         </class>
5974
5975         <class id="xfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfld" oils_persist:tablename="query.expr_xfld" reporter:label="Field Expression">
5976                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5977                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5978                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5979                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5980                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5981                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
5982                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
5983                 </fields>
5984                 <links>
5985                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
5986                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
5987                 </links>
5988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5989                 </permacrud>
5990         </class>
5991
5992         <class id="xfunc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
5993                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
5994                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
5995                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
5996                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
5997                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
5998                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
5999                 </fields>
6000                 <links>
6001                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6002                         <link field="function_id" reltype="might_have" key="id" map="" class="qfs"/>
6003                 </links>
6004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6005                 </permacrud>
6006         </class>
6007
6008         <class id="xin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
6009                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6010                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6011                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6012                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6013                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6014                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6015                 </fields>
6016                 <links>
6017                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6018                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6019                 </links>
6020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6021                 </permacrud>
6022         </class>
6023
6024         <class id="xnbet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnbet" oils_persist:tablename="query.expr_xnbet" reporter:label="Not Between Expression">
6025                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6026                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6027                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6028                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6029                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6030                 </fields>
6031                 <links>
6032                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6033                 </links>
6034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6035                 </permacrud>
6036         </class>
6037
6038         <class id="xnex" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnex" oils_persist:tablename="query.expr_xnex" reporter:label="Not Exists Expression">
6039                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6040                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6041                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6042                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6043                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6044                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6045                 </fields>
6046                 <links>
6047                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6048                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6049                 </links>
6050                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6051                 </permacrud>
6052         </class>
6053
6054         <class id="xnin" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnin" oils_persist:tablename="query.expr_xnin" reporter:label="Not In Expression">
6055                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6056                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6057                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6058                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6059                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6060                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6061                 </fields>
6062                 <links>
6063                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6064                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6065                 </links>
6066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6067                 </permacrud>
6068         </class>
6069
6070         <class id="xnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
6071                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6072                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6073                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6074                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6075                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6076                 </fields>
6077                 <links>
6078                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6079                 </links>
6080                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6081                 </permacrud>
6082         </class>
6083
6084         <class id="xnum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
6085                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6086                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6087                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6088                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6089                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6090                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6091                 </fields>
6092                 <links>
6093                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6094                 </links>
6095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6096                 </permacrud>
6097         </class>
6098
6099         <class id="xop" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
6100                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6101                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6102                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6103                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6104                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6105                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
6106                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
6107                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
6108                 </fields>
6109                 <links>
6110                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6111                         <link field="left_operand" reltype="might_have" key="id" map="" class="qxp"/>
6112                         <link field="right_operand" reltype="might_have" key="id" map="" class="qxp"/>
6113                 </links>
6114                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6115                 </permacrud>
6116         </class>
6117
6118         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_string" oils_persist:tablename="query.expr_string" reporter:label="String Expression">
6119                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6120                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6121                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6122                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6123                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6124                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
6125                 </fields>
6126                 <links>
6127                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6128                 </links>
6129                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6130                 </permacrud>
6131         </class>
6132
6133         <class id="xsubq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
6134                 <fields oils_persist:primary="id" oils_persist:sequence="expression_id_seq">
6135                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
6136                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
6137                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
6138                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
6139                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
6140                 </fields>
6141                 <links>
6142                         <link field="parent_expr" reltype="might_have" key="id" map="" class="qxp"/>
6143                         <link field="subquery" reltype="might_have" key="id" map="" class="qsq"/>
6144                 </links>
6145                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6146                 </permacrud>
6147         </class>
6148
6149         <class id="bmpc" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::marc21_physical_characteristics" oils_persist:tablename="biblio.marc21_physical_characteristics" reporter:label="MARC21 Physical Characteristics" oils_persist:field_safe="true" oils_persist:readonly="true">
6150                 <fields oils_persist:primary="id">
6151                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
6152                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
6153                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
6154                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
6155                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
6156                 </fields>
6157                 <links>
6158                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
6159                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6160                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
6161                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6162                 </links>
6163         </class>
6164
6165         <class id="cmfpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_ff_pos_map" oils_persist:tablename="config.marc21_ff_pos_map" reporter:label="MARC21 Fixed Field Map" oils_persist:field_safe="true">
6166                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
6167                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6168                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
6169                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
6170                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
6171                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6172                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6173                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
6174                 </fields>
6175                 <links/>
6176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6177                         <actions>
6178                                 <retrieve/>
6179                         </actions>
6180                 </permacrud>
6181         </class>
6182
6183         <class id="cmpctm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_type_map" oils_persist:tablename="config.marc21_physical_characteristic_type_map" reporter:label="MARC21 Physical Characteristic Type Map" oils_persist:field_safe="true">
6184                 <fields oils_persist:primary="ptype_key">
6185                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
6186                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6187                 </fields>
6188                 <links/>
6189                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6190                         <actions>
6191                                 <retrieve/>
6192                         </actions>
6193                 </permacrud>
6194         </class>
6195
6196         <class id="cmpcsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_subfield_map" oils_persist:tablename="config.marc21_physical_characteristic_subfield_map" reporter:label="MARC21 Physical Characteristic Subfield Map" oils_persist:field_safe="true">
6197                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
6198                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6199                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
6200                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
6201                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
6202                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
6203                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6204                 </fields>
6205                 <links>
6206                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
6207                 </links>
6208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6209                         <actions>
6210                                 <retrieve/>
6211                         </actions>
6212                 </permacrud>
6213         </class>
6214
6215         <class id="cmpcvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_physical_characteristic_value_map" oils_persist:tablename="config.marc21_physical_characteristic_value_map" reporter:label="MARC21 Physical Characteristic Value Map" oils_persist:field_safe="true">
6216                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
6217                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6218                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
6219                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
6220                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6221                 </fields>
6222                 <links>
6223                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
6224                 </links>
6225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6226                         <actions>
6227                                 <retrieve/>
6228                         </actions>
6229                 </permacrud>
6230         </class>
6231
6232         <class id="cmrtm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc21_rec_type_map" oils_persist:tablename="config.marc21_rec_type_map" reporter:label="MARC21 Record Type Map" oils_persist:field_safe="true">
6233                 <fields oils_persist:primary="code">
6234                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
6235                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
6236                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
6237                 </fields>
6238                 <links/>
6239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6240                         <actions>
6241                                 <retrieve/>
6242                         </actions>
6243                 </permacrud>
6244         </class>
6245
6246         <!-- ********************************************************************************************************************* -->
6247         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
6248         <!-- ********************************************************************************************************************* -->
6249         <class id="rccc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_circ" oils_persist:tablename="reporter.classic_current_circ" reporter:core="true" reporter:label="Classic Circulation View">
6250                 <fields oils_persist:primary="id">
6251                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
6252                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
6253                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
6254                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6255                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
6256                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
6257                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6258                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
6259                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
6260                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
6261                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
6262                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
6263                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
6264                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
6265                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6266                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
6267                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
6268                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
6269                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
6270                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
6271                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
6272                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
6273                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
6274                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
6275                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
6276                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
6277                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
6278                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
6279                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
6280                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6281                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6282                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6283                 </fields>
6284                 <links>
6285                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6286                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
6287                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
6288                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
6289                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6290                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
6291                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
6292                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
6293                 </links>
6294         </class>
6295
6296         <class id="rsce1" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat1" oils_persist:tablename="reporter.legacy_cat1" reporter:label="CAT1 Entry">
6297                 <fields oils_persist:primary="id">
6298                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
6299                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6300                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6301                 </fields>
6302                 <links>
6303                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6304                 </links>
6305         </class>
6306
6307         <class id="rsce2" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::legacy_cat2" oils_persist:tablename="reporter.legacy_cat2" reporter:label="CAT2 Entry">
6308                 <fields oils_persist:primary="id">
6309                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
6310                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6311                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6312                 </fields>
6313                 <links>
6314                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6315                 </links>
6316         </class>
6317
6318         <class id="rccbs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_current_billing_summary" oils_persist:tablename="reporter.classic_current_billing_summary" reporter:core="true" reporter:label="Classic Open Transaction Summary">
6319                 <fields oils_persist:primary="id">
6320                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6321
6322                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
6323                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
6324                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
6325
6326                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
6327                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
6328                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
6329
6330                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
6331                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
6332
6333                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6334                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6335                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
6336
6337                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
6338                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
6339
6340                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
6341                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
6342                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
6343
6344                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
6345                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
6346                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
6347
6348                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
6349                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
6350                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
6351                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
6352
6353                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
6354                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
6355
6356                 </fields>
6357                 <links>
6358                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
6359                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6360                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6361                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
6362                 </links>
6363         </class>
6364
6365         <class id="iatc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::intersystem_transit_copy" oils_persist:readonly="true" reporter:core="true" reporter:label="Inter-system Copy Transit">
6366                 <oils_persist:source_definition>
6367
6368                         SELECT  t.*
6369                           FROM  action.transit_copy t
6370                                 JOIN actor.org_unit AS s ON (t.source = s.id)
6371                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
6372                           WHERE s.parent_ou &lt;&gt; d.parent_ou
6373
6374                 </oils_persist:source_definition>
6375                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6376                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
6377                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
6378                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6379                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
6380                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
6381                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
6382                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
6383                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6384                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6385                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6386                 </fields>
6387                 <links>
6388                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
6389                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6390                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6391                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6392                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6393                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
6394                 </links>
6395         </class>
6396
6397     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
6398                 <oils_persist:source_definition>
6399
6400         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
6401                 SELECT
6402                         cp.id as copy,
6403                         COUNT(circ.id),
6404                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6405                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6406                 FROM
6407                         asset.copy cp
6408                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
6409                 GROUP BY 1, 3, 4
6410                 UNION
6411                 SELECT
6412                         cp.id as copy,
6413                         COUNT(circ.id),
6414                         EXTRACT(YEAR FROM circ.xact_start) AS year,
6415                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
6416                 FROM
6417                         asset.copy cp
6418                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
6419                 GROUP BY 1, 3, 4
6420                 UNION
6421                 SELECT
6422                         id as copy,
6423                         circ_count,
6424                         -1 AS year,
6425                         false as is_renewal
6426                 FROM
6427                         extend_reporter.legacy_circ_count
6428         )x GROUP BY 1, 3, 4
6429
6430                 </oils_persist:source_definition>
6431         <fields>
6432             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
6433             <field reporter:label="Count" name="count" reporter:datatype="int"/>
6434             <field reporter:label="Year" name="year" reporter:datatype="int"/>
6435             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
6436         </fields>
6437                 <links>
6438                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
6439                 </links>
6440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6441                         <actions>
6442                                 <retrieve/>
6443                         </actions>
6444                 </permacrud>
6445     </class>
6446
6447         <class id="rodcirc" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::overdue_circs" oils_persist:tablename="reporter.overdue_circs" reporter:core="true" reporter:label="Overdue Circulation">
6448                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6449                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
6450                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
6451                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
6452                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6453                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
6454                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
6455                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
6456                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
6457                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
6458                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
6459                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
6460                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
6461                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
6462                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
6463                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
6464                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
6465                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
6466                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
6467                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
6468                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
6469                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
6470                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
6471                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
6472                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
6473                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6474                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6475                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6476                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
6477                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
6478                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
6479                 </fields>
6480                 <links>
6481                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6482                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
6483                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
6484                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6485                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
6486                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6487                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6488                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6489                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6490                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6491                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6492                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6493                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
6494                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6495                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6496                 </links>
6497         </class>
6498
6499     <class id="rocit" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::classic_item_list" oils_persist:tablename="reporter.classic_item_list" reporter:core="true" reporter:label="Classic Item List">
6500         <fields oils_persist:primary="id">
6501             <field reporter:label="Title" name="title" reporter:datatype="text"/>
6502             <field reporter:label="Author" name="author" reporter:datatype="text"/>
6503             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
6504             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6505             <field reporter:label="Price" name="price" reporter:datatype="money"/>
6506             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6507             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
6508             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
6509             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
6510             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
6511             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
6512             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
6513             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
6514             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
6515             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
6516             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
6517             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6518             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6519             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
6520             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
6521             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6522             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6523             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6524             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
6525             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6526             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
6527             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
6528             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
6529             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
6530             <field reporter:label="Status" name="status" reporter:datatype="link"/>
6531             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
6532             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
6533             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
6534             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
6535         </fields>
6536         <links>
6537             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6538             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6539             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6540             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6541             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6542         </links>
6543     </class>
6544
6545     <class id="rmocbbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_owning_lib" oils_persist:tablename="money.open_circ_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Owning Library">
6546         <fields oils_persist:primary="id">
6547             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6548             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6549             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6550             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6551         </fields>
6552         <links>
6553             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6554             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6555         </links>
6556     </class>
6557
6558     <class id="rmobbol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_owning_lib" oils_persist:tablename="money.open_balance_by_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Owning Library">
6559         <fields oils_persist:primary="owning_lib">
6560             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6561             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6562             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6563         </fields>
6564         <links>
6565             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6566         </links>
6567     </class>
6568
6569     <class id="rmocbbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by Circulating Library and Owning Library">
6570         <fields oils_persist:primary="id">
6571             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6572             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
6573             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6574             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6575             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6576         </fields>
6577         <links>
6578             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6579             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6580             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6581         </links>
6582     </class>
6583
6584     <class id="rmobbcol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_circ_and_owning_lib" oils_persist:tablename="money.open_balance_by_circ_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by Circulating Library and Owning Library">
6585         <fields oils_persist:primary="circ_lib">
6586             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
6587             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6588             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6589             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6590         </fields>
6591         <links>
6592             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6593             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6594         </links>
6595     </class>
6596
6597     <class id="rmocbbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_circ_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_circ_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Billing by User Home Library and Owning Library">
6598         <fields oils_persist:primary="id">
6599             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
6600             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
6601             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6602             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
6603             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
6604         </fields>
6605         <links>
6606             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
6607             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6608             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
6609         </links>
6610     </class>
6611
6612     <class id="rmobbhol" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::money::open_balance_by_usr_home_and_owning_lib" oils_persist:tablename="money.open_balance_by_usr_home_and_owning_lib" reporter:core="true" reporter:label="Open Circulation Balance by User Home Library and Owning Library">
6613         <fields oils_persist:primary="home_ou">
6614             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
6615             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
6616             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
6617             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
6618         </fields>
6619         <links>
6620             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6621             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
6622         </links>
6623     </class>
6624         <class id="acqft" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag" oils_persist:tablename="acq.fund_tag" reporter:label="Fund Tag">
6625                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
6626                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
6627                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
6628                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
6629                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6630                 </fields>
6631                 <links>
6632                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6633                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
6634                 </links>
6635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6636                         <actions>
6637                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
6638                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
6639                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
6640                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
6641                         </actions>
6642                 </permacrud>
6643         </class>
6644         <class id="acqftm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_tag_map" oils_persist:tablename="acq.fund_tag_map" reporter:label="Fund Tag Map">
6645                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
6646                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
6647                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
6648                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
6649                 </fields>
6650                 <links>
6651                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6652                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
6653                         </links>
6654                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6655                 <actions>
6656                                 <create permission="ADMIN_ACQ_FUND_TAG">
6657                                         <context link="tag" field="owner"/>
6658                                 </create>
6659                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
6660                                         <context link="tag" field="owner"/>
6661                                 </retrieve>
6662                                 <update permission="ADMIN_ACQ_FUND_TAG">
6663                                         <context link="tag" field="owner"/>
6664                                 </update>
6665                                 <delete permission="ADMIN_ACQ_FUND_TAG">
6666                                         <context link="tag" field="owner"/>
6667                                 </delete>
6668                         </actions>
6669                 </permacrud>
6670         </class>
6671
6672         <!-- ********************************************************************************************************************* -->
6673
6674 </IDL>
6675
6676 <!--
6677     vim:noet:ts=4:sw=4:
6678 -->