]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Use hold current shelf lib to determine availability : opac sorting
[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                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
88                 </fields>
89         </class>
90
91         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
92                 <fields>
93                         <field name="err_msg" oils_persist:virtual="true" />
94                         <field name="type" oils_persist:virtual="true" />
95                 </fields>
96         </class>
97
98         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
99                 <fields>
100                         <field name="err_msg" oils_persist:virtual="true" />
101                         <field name="type" oils_persist:virtual="true" />
102                 </fields>
103         </class>
104
105         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
106                 <fields oils_persist:primary="matchpoint">
107                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
108                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
109                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
110                 </fields>
111                 <links>
112                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
113                 </links>
114         </class>
115
116         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
117         <!-- when the time is right, turn me into a view.  -->
118                 <fields>
119             <field reporter:label="Total Circs" name="num_circs" datatype="int"/>
120             <field reporter:label="Start Time" name="start_time" datatype="timestamp"/>
121             <field reporter:label="Checkout Workstation" name="checkout_workstation" datatype="text"/>
122             <field reporter:label="Last Renewal Time" name="last_renewal_time" datatype="timestamp"/>
123             <field reporter:label="Last Stop Fines" name="last_stop_fines" datatype="text"/>
124             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" datatype="timestamp"/>
125             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" datatype="text"/>
126             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" datatype="text"/>
127             <field reporter:label="Last Checkin Time" name="last_checkin_time" datatype="timestamp"/>
128             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" datatype="timestamp"/>
129                 </fields>
130         </class>
131
132         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
133                 <fields>
134                         <field name="public_name" oils_persist:virtual="true" />
135                         <field name="target_url" oils_persist:virtual="true" />
136                         <field name="target_coverage" oils_persist:virtual="true" />
137                         <field name="target_embargo" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <!-- Actually in the DB -->
142         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
143                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
144                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
145                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
146                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
147                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
148                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
149                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
150                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
151                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
152                 </fields>
153                 <links>
154                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
155                 </links>
156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
157                         <actions>
158                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
159                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
160                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
161                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
162                         </actions>
163                 </permacrud>
164         </class>
165
166         <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">
167                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
168                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
169                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
170                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
171                 </fields>
172                 <links>
173                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
174                 </links>
175                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
176                         <actions>
177                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
178                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
179                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
180                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
181                         </actions>
182                 </permacrud>
183         </class>
184
185         <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">
186                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
187                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
188                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
189                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
190                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
191                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
192                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
193                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
194                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
195                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
196                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
197                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
198                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
199                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
200                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
201                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
202                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
203                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
204                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
205                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
206                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
207                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
208                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
209                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
210                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
211                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
212                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
213                 </fields>
214                 <links>
215                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
216                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
217                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
218                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
219                 </links>
220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
221                         <actions>
222                                 <create permission="CREATE_IMPORT_ITEM">
223                     <context link="definition" field="owner"/>
224                                 </create>
225                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
226                     <context link="definition" field="owner"/>
227                                 </retrieve>
228                                 <update permission="UPDATE_IMPORT_ITEM">
229                     <context link="definition" field="owner"/>
230                                 </update>
231                                 <delete permission="DELETE_IMPORT_ITEM">
232                     <context link="definition" field="owner"/>
233                                 </delete>
234                         </actions>
235                 </permacrud>
236         </class>
237
238         <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">
239                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
240                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
241                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
242                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
243                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
244                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
245                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
246                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
247                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
263                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
264                 </fields>
265                 <links>
266                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
267                 </links>
268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
269                         <actions>
270                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
271                                 <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
272                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
273                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
274                         </actions>
275                 </permacrud>
276         </class>
277
278         <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">
279                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
280                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
281                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
282                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
283                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
284                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
285                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
286                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
287                 </fields>
288                 <links>
289                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
290                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
291                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
292                 </links>
293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
294                         <actions>
295                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
296                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
297                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
298                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
299                         </actions>
300                 </permacrud>
301         </class>
302
303         <class id="vie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_error" oils_persist:tablename="vandelay.import_error" reporter:label="Import/Overlay Error Definitions">
304                 <fields oils_persist:primary="code">
305                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
306                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
307                 </fields>
308                 <links>
309                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
310                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
311                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
312                 </links>
313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
314                         <actions>
315                                 <retrieve/>
316                         </actions>
317                 </permacrud>
318         </class>
319
320         <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">
321                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
322                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
323                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
324                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
325                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
326                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
327                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
328                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
329                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
330                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
331                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
332                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
333                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
334                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
335                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
336                 </fields>
337                 <links>
338                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
339                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
340                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
341                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
342             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
343             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
344             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
345                 </links>
346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
347                         <actions>
348                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
351                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
352                         </actions>
353                 </permacrud>
354         </class>
355
356         <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">
357                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
358                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
359                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
360                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
361                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
362                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
363                 </fields>
364                 <links/>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
368                 <retrieve/>
369                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
370                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
371                         </actions>
372                 </permacrud>
373         </class>
374
375         <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">
376                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
377                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
378                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
379                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
380                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
381                 </fields>
382                 <links>
383                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
384                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
385                 </links>
386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
387                         <actions>
388                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
389                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
390                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
391                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
392                         </actions>
393                 </permacrud>
394         </class>
395
396         <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">
397                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
398                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
399                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
400                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
401                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
402                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
403                 </fields>
404                 <links>
405                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
406                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
407                 </links>
408                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
409                         <actions>
410                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
411                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
412                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
413                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
414                         </actions>
415                 </permacrud>
416         </class>
417
418         <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">
419                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
420                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
421                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
422                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
423                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
424                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
425                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
426                 </fields>
427                 <links>
428                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
429                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
430                 </links>
431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
432                         <actions>
433                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
434                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
435                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
436                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
437                         </actions>
438                 </permacrud>
439         </class>
440
441         <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">
442                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
443                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
444                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
445                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
446                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
447                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
448                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
449                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
450                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
451                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
452                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
453                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
454                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
455                 </fields>
456                 <links>
457                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
458                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
459                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
460             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
461             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
462                 </links>
463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
464                         <actions>
465                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
466                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
467                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
468                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
469                         </actions>
470                 </permacrud>
471         </class>
472
473         <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">
474                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
476                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
477                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
478                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
479                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
480                 </fields>
481                 <links/>
482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
483                         <actions>
484                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
485                 <retrieve/>
486                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
487                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
488                         </actions>
489                 </permacrud>
490         </class>
491
492         <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">
493                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
494                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
495                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
496                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
497                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
498                 </fields>
499                 <links>
500                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
501                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
502                 </links>
503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
504                         <actions>
505                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
506                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
507                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
508                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
509                         </actions>
510                 </permacrud>
511         </class>
512
513         <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">
514                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
515                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
516                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
517                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
518                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
519                 </fields>
520                 <links>
521                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
522                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
523                 </links>
524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
525                         <actions>
526                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
530                         </actions>
531                 </permacrud>
532         </class>
533
534         <class id="vms" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set" oils_persist:tablename="vandelay.match_set" reporter:label="Record Matching Definition Set">
535                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
536                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id"/>
537                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
538                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
539                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
540                 </fields>
541                 <links>
542                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
543                 </links>
544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
545                         <actions>
546                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
547                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
548                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
549                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
550                         </actions>
551                 </permacrud>
552         </class>
553
554         <class id="vmsp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_point" oils_persist:tablename="vandelay.match_set_point" reporter:label="Record Matching Definition">
555                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
556                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
557                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
558                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
559                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
560                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
561                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
562                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
563             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
564                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
565                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
566                 </fields>
567                 <links>
568                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
569                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
570                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
571                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
572                 </links>
573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
574                         <actions>
575                                 <create permission="ADMIN_IMPORT_MATCH_SET">
576                     <context link="match_set" field="owner"/>
577                                 </create>
578                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
579                     <context link="match_set" field="owner"/>
580                                 </retrieve>
581                                 <update permission="ADMIN_IMPORT_MATCH_SET">
582                     <context link="match_set" field="owner"/>
583                                 </update>
584                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
585                     <context link="match_set" field="owner"/>
586                                 </delete>
587                         </actions>
588                 </permacrud>
589         </class>
590
591         <class id="vmsq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::match_set_quality" oils_persist:tablename="vandelay.match_set_quality" reporter:label="Record Quality Metric">
592                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
593                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
594                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
595                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
596                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
597                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
598                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
599                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
600                 </fields>
601                 <links>
602                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
603                 </links>
604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
605                         <actions>
606                                 <create permission="ADMIN_IMPORT_MATCH_SET">
607                     <context link="match_set" field="owner"/>
608                                 </create>
609                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
610                     <context link="match_set" field="owner"/>
611                                 </retrieve>
612                                 <update permission="ADMIN_IMPORT_MATCH_SET">
613                     <context link="match_set" field="owner"/>
614                                 </update>
615                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
616                     <context link="match_set" field="owner"/>
617                                 </delete>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <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">
623                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
624                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
625                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
626                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
627                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
628                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
629                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
630                 </fields>
631                 <links>
632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
633                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
634                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
635                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
636                 </links>
637         </class>
638
639     <class id="cgf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::global_flag" oils_persist:tablename="config.global_flag" reporter:label="Global Flags and Settings" oils_persist:field_safe="true">
640         <fields oils_persist:primary="name">
641             <field reporter:label="Name" name="name" reporter:datatype="text"/>
642             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
643             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
644             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
645         </fields>
646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
647             <actions>
648                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
649                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
650                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
651                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
652             </actions>
653         </permacrud>
654     </class>
655
656     <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">
657         <fields oils_persist:primary="id">
658             <field reporter:label="ID" name="id" reporter:datatype="id"/>
659             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
660             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
661             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
662             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
663         </fields>
664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665             <actions>
666                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
667                 <retrieve/>
668                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
669                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
670             </actions>
671         </permacrud>
672     </class>
673
674         <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">
675                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
676                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
678                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
679                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
680                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
681                 </fields>
682                 <links>
683                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
684                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
685                 </links>
686         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
687             <actions>
688                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
689                 <retrieve/>
690                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
691                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
692             </actions>
693         </permacrud>
694         </class>
695
696         <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
697                 <fields oils_persist:primary="name">
698                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
699                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
700                         <field reporter:label="Description" name="description" reporter:datatype="text" />
701                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
702                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
703                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
704                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
705                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
706                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
707                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
708                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
709                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
710                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
711                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
712                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
713                 </fields>
714                 <links>
715                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
716                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
717                 </links>
718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
719             <actions>
720                 <create permission="ADMIN_SVF" global_required="true"/>
721                 <retrieve/>
722                 <update permission="ADMIN_SVF" global_required="true"/>
723                 <delete permission="ADMIN_SVF" global_required="true"/>
724             </actions>
725         </permacrud>
726         </class>
727
728         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true">
729                 <fields oils_persist:primary="id">
730                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
731                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
732                 </fields>
733                 <links>
734                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
735                 </links>
736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
737             <actions>
738                 <retrieve/>
739             </actions>
740         </permacrud>
741         </class>
742
743         <class id="crainm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_index_norm_map" oils_persist:tablename="config.record_attr_index_norm_map" reporter:label="SVF Record Attribute to Indexing Normalizer Map" oils_persist:field_safe="true">
744                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
745                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
746                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
747                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
748                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
749                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
750                 </fields>
751                 <links>
752                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
753                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
754                 </links>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758                 <retrieve/>
759                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
760                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
761             </actions>
762         </permacrud>
763         </class>
764
765         <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
766                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
767                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
768                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
769                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
770                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
771                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
772                 </fields>
773                 <links>
774                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
775                 </links>
776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
777             <actions>
778                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
779                 <retrieve/>
780                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
781                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
782             </actions>
783         </permacrud>
784         </class>
785
786         <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">
787                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
788                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
789                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
790                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
791                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
792                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
793                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
794                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
795                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
796                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
797                 </fields>
798                 <links>
799                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
800                 </links>
801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
802             <actions>
803                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
804                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
805                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
806                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
807             </actions>
808         </permacrud>
809         </class>
810
811     <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">
812         <fields oils_persist:primary="name">
813             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
814             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
815             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
816             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
817             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
818             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
819             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
820             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
821             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
822             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
823         </fields>
824         <links>
825             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
826             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
827         </links>
828         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
829             <actions>
830                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
831                 <retrieve/>
832                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
833                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
834             </actions>
835         </permacrud>
836     </class>
837
838     <class id="cza" controller="open-ils.cstore" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
839         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
840             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
841             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
842             <field reporter:label="Name" name="name" reporter:datatype="text"/>
843             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
844             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
845             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
846             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
847         </fields>
848         <links>
849             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
850         </links>
851     </class>
852
853         <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">
854                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
855                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
856                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
857                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
858                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
859                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
860                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
861                 </fields>
862                 <links>
863             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
864             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
865                 </links>
866                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
867                         <actions>
868                                 <retrieve/>
869                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
870                         </actions>
871                 </permacrud>
872         </class>
873
874         <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">
875                 <fields oils_persist:primary="key">
876                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
877                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
878                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
879                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
880                 </fields>
881                 <links/>
882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
883                         <actions>
884                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
885                                 <retrieve/>
886                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
887                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
888                         </actions>
889                 </permacrud>
890         </class>
891
892         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
893                 <fields oils_persist:primary="module">
894                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
895                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
896                 </fields>
897                 <links/>
898         </class>
899
900         <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">
901                 <fields oils_persist:primary="module">
902                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
903                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
904                 </fields>
905                 <links/>
906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
907                         <actions>
908                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
909                                 <retrieve/>
910                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
911                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
912                         </actions>
913                 </permacrud>
914         </class>
915
916         <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">
917                 <fields oils_persist:primary="module">
918                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
919                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
920                 </fields>
921                 <links/>
922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
923                         <actions>
924                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
925                                 <retrieve/>
926                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
927                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
928                         </actions>
929                 </permacrud>
930         </class>
931
932         <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">
933                 <fields oils_persist:primary="module">
934                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
935                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
936                 </fields>
937                 <links/>
938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
939                         <actions>
940                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
941                                 <retrieve/>
942                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
943                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
944                         </actions>
945                 </permacrud>
946         </class>
947
948         <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">
949                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
950                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
951                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
952                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
953                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
954                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
955                 </fields>
956                 <links>
957                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
958                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
959                 </links>
960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
961                         <actions>
962                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
963                     <context link="event_def" field="owner"/>
964                 </create>
965                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
966                     <context link="event_def" field="owner"/>
967                 </retrieve>
968                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
969                     <context link="event_def" field="owner"/>
970                 </update>
971                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
972                     <context link="event_def" field="owner"/>
973                 </delete>
974                         </actions>
975                 </permacrud>
976         </class>
977
978         <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">
979                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
980                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
981                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
982                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
983                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
984                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
985                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
986                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
987                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
988                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
989                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
990                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
991                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
992                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
993                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
994                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
995                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
996                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
997                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
998                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
999                 </fields>
1000                 <links>
1001                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1002                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1003                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1004                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1005                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1006                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1007                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1008                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1009                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1010                 </links>
1011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1012                         <actions>
1013                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1014                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1015                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1016                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1017                         </actions>
1018                 </permacrud>
1019         </class>
1020
1021         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1022                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1023                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1024                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1025                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1026                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1027                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1028                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1029                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1030                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1031                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1032                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1033                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1034                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1035                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1036                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1037                 </fields>
1038                 <links>
1039                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1040                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1041                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1042                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1043                 </links>
1044         </class>
1045
1046         <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">
1047                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1048                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1049                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1050                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1051                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1052                 </fields>
1053                 <links>
1054                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1055                 </links>
1056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1057                         <actions>
1058                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1059                     <context link="event_def" field="owner"/>
1060                 </create>
1061                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1062                     <context link="event_def" field="owner"/>
1063                 </retrieve>
1064                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1065                     <context link="event_def" field="owner"/>
1066                 </update>
1067                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1068                     <context link="event_def" field="owner"/>
1069                 </delete>
1070                         </actions>
1071                 </permacrud>
1072         </class>
1073
1074         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1075                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1076                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1077                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1078                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1079                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1080                 </fields>
1081                 <links>
1082                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1083                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1084                 </links>
1085         </class>
1086
1087         <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">
1088                 <fields oils_persist:primary="code">
1089                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1090                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1091                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1092                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1093                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1094                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1095                 </fields>
1096                 <links/>
1097         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1098             <actions>
1099                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1100                 <retrieve/>
1101                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1102                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1103             </actions>
1104         </permacrud>
1105         </class>
1106
1107         <class id="aiit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item_type" oils_persist:tablename="acq.invoice_item_type" reporter:label="Non-bibliographic Invoice Item Type" oils_persist:field_safe="true">
1108                 <fields oils_persist:primary="code">
1109                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1110                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1111                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1112                 </fields>
1113                 <links/>
1114         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1115             <actions>
1116                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1117                 <retrieve/>
1118                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1119                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1120             </actions>
1121         </permacrud>
1122         </class>
1123
1124         <class id="acqim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_method" oils_persist:tablename="acq.invoice_method" reporter:label="Invoice Method used by Vendor" oils_persist:field_safe="true">
1125                 <fields oils_persist:primary="code">
1126                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1127                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1128                 </fields>
1129                 <links/>
1130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1131             <actions>
1132                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1133                 <retrieve/>
1134                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1135                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1136             </actions>
1137         </permacrud>
1138         </class>
1139
1140         <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">
1141                 <fields oils_persist:primary="code">
1142                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1143                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1144                 </fields>
1145                 <links/>
1146         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1147             <actions>
1148                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1149                 <retrieve/>
1150                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1151                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1152             </actions>
1153         </permacrud>
1154         </class>
1155
1156         <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">
1157                 <fields oils_persist:primary="code">
1158                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1159                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1160                 </fields>
1161                 <links/>
1162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1163             <actions>
1164                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1165                 <retrieve/>
1166                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1167                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1168             </actions>
1169         </permacrud>
1170         </class>
1171
1172         <class id="bpt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_type" oils_persist:tablename="biblio.peer_type" reporter:label="Bibliographic Record Peer Type" oils_persist:field_safe="true">
1173                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1174                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1175                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1176                 </fields>
1177                 <links/>
1178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1179             <actions>
1180                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1181                 <retrieve/>
1182                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1183                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1184             </actions>
1185         </permacrud>
1186         </class>
1187
1188         <class id="bpbcm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::peer_bib_copy_map" oils_persist:tablename="biblio.peer_bib_copy_map" reporter:label="Bibliographic Record Peer Copy Map">
1189                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1190                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1191                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1192                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1193                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1194                 </fields>
1195         <links>
1196             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1197             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1198             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1199         </links>
1200         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1201             <actions>
1202                 <create permission="UPDATE_COPY">
1203                     <context link="target_copy" field="circ_lib"/>
1204                 </create>
1205                 <retrieve/>
1206                 <update permission="UPDATE_COPY">
1207                     <context link="target_copy" field="circ_lib"/>
1208                 </update>
1209                 <delete permission="UPDATE_COPY">
1210                     <context link="target_copy" field="circ_lib"/>
1211                 </delete>
1212             </actions>
1213         </permacrud>
1214         </class>
1215
1216         <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">
1217                 <fields oils_persist:primary="code">
1218                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1219                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1220                 </fields>
1221                 <links/>
1222         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1223             <actions>
1224                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1225                 <retrieve/>
1226                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1227                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1228             </actions>
1229         </permacrud>
1230         </class>
1231
1232         <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">
1233                 <fields oils_persist:primary="code">
1234                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1235                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1236                 </fields>
1237                 <links/>
1238         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1239             <actions>
1240                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1241                 <retrieve/>
1242                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1243                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1244             </actions>
1245         </permacrud>
1246         </class>
1247
1248         <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">
1249                 <fields oils_persist:primary="code">
1250                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1251                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1252                 </fields>
1253                 <links/>
1254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1255             <actions>
1256                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1257                 <retrieve/>
1258                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1259                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1260             </actions>
1261         </permacrud>
1262         </class>
1263
1264     <class id="chmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hold_matrix_weights" oils_persist:tablename="config.hold_matrix_weights" reporter:label="Hold Matrix Weights">
1265         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1266             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1267             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1268             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1269             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1270             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1271             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1272             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1273             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1274             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1275             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1276             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1277             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1278             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1279             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1280             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1281         </fields>
1282         <links/>
1283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1284             <actions>
1285                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1286                 <retrieve/>
1287                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1288                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1289             </actions>
1290         </permacrud>
1291     </class>
1292
1293     <class id="ccmw" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_weights" oils_persist:tablename="config.circ_matrix_weights" reporter:label="Circ Matrix Weights">
1294         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1295             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1296             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1297             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1298             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1299             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1300             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1301             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1302             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1303             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1304             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1305             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1306             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1307             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1308             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1309             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1310         </fields>
1311         <links/>
1312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1313             <actions>
1314                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1315                 <retrieve/>
1316                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1317                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1318             </actions>
1319         </permacrud>
1320     </class>
1321
1322     <class id="cwa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::weight_assoc" oils_persist:tablename="config.weight_assoc" reporter:label="Matrix Weight Association">
1323         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1324             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1325             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1326             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1327             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1328             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1329         </fields>
1330         <links>
1331             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1332             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1333             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1334         </links>
1335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1336             <actions>
1337                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1338                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1339                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1340                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1341             </actions>
1342         </permacrud>
1343     </class>
1344
1345         <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">
1346                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1347                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1348                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1349                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1350                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1351                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1352                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1353                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1354                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1355                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1356                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1357                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1358                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1359                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1360                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1361                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1362                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1363             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1364                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1365                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1366                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1367                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1368                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1369                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1370                 </fields>
1371                 <links>
1372                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1373                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1374                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1375                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1376                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1377                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1378                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1379                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1380                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1381                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1382                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1383                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1384                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1385             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1386                 </links>
1387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388             <actions>
1389                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1390                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1391                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1392                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1393             </actions>
1394         </permacrud>
1395         </class>
1396
1397         <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">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1399                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1400                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1401                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1402                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1403                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1404                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1405                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1406                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1407                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1408                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1409                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1410                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1411                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1412                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1413             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1414                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1415                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1416             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1417                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1418                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1419                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1420                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1421             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1422             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1423             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1424                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1425                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1426                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1427                 </fields>
1428                 <links>
1429                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1430                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1431                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1432                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1433                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1434                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1435                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1436                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1437                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1438                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1439                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1440                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1441                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1442             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1443                 </links>
1444         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1445             <actions>
1446                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1447                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1448                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1449                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1450             </actions>
1451         </permacrud>
1452         </class>
1453
1454         <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">
1455                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_id_seq">
1456                         <field reporter:label="Test ID" name="id" reporter:datatype="id"/>
1457                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="link"/>
1458                         <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1459                 </fields>
1460                 <links>
1461                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1462                 </links>
1463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1464             <actions>
1465                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1466                     <context link="matchpoint" field="org_unit"/>
1467                 </create>
1468                 <retrieve/>
1469                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1470                     <context link="matchpoint" field="org_unit"/>
1471                 </update>
1472                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1473                     <context link="matchpoint" field="org_unit"/>
1474                 </delete>
1475             </actions>
1476         </permacrud>
1477         </class>
1478
1479         <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">
1480                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_circ_mod_test_map_id_seq">
1481                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
1482                         <field reporter:label="Circulation Modifier Subtest ID" name="circ_mod_test" reporter:datatype="link"/>
1483                         <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1484                 </fields>
1485                 <links>
1486                         <link field="circ_mod_test" reltype="has_a" key="id" map="" class="ccmcmt"/>
1487                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1488                 </links>
1489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1490             <actions>
1491                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1492                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1493                 </create>
1494                 <retrieve/>
1495                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1496                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1497                 </update>
1498                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1499                     <context link="circ_mod_test" jump="matchpoint" field="org_unit"/>
1500                 </delete>
1501             </actions>
1502         </permacrud>
1503         </class>
1504
1505         <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">
1506                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1507                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1508                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1509                 </fields>
1510                 <links/>
1511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512             <actions>
1513                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1514                 <retrieve/>
1515                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1516                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1517             </actions>
1518         </permacrud>
1519         </class>
1520
1521         <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">
1522                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1523                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1524                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1525                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1526                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1527                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1528                 </fields>
1529                 <links>
1530                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1531                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1532                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1533                 </links>
1534         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1535             <actions>
1536                 <create permission="ADMIN_SURVEY">
1537                     <context link="survey" field="owner"/>
1538                 </create>
1539                 <retrieve/>
1540                 <update permission="ADMIN_SURVEY">
1541                     <context link="survey" field="owner"/>
1542                 </update>
1543                 <delete permission="ADMIN_SURVEY">
1544                     <context link="survey" field="owner"/>
1545                 </delete>
1546             </actions>
1547         </permacrud>
1548         </class>
1549         <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">
1550                 <fields oils_persist:primary="id" oils_persist:sequence="">
1551                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1552                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1553                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1554                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1555                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1556                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1557                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1558                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1559                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1560                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1561                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1562                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1563                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1564                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1565                 </fields>
1566                 <links>
1567                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1568                 </links>
1569         </class>
1570         <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">
1571                 <fields oils_persist:primary="id" oils_persist:sequence="">
1572                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1573                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1574                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1575                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1576                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1577                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1578                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1579                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1580                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1581                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1582                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1583                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1584                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1585                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1586                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1587                 </fields>
1588                 <links>
1589                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1590                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1591                 </links>
1592         </class>
1593         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1594                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1595                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1596                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1597                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1598                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1599                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1600                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1601                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1602                 </fields>
1603                 <links>
1604                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1605                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1606                 </links>
1607         </class>
1608         <class id="aupr" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_password_reset" oils_persist:tablename="actor.usr_password_reset" reporter:label="User password reset requests">
1609                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1610                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1611                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1612                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1613                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1614                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1615                 </fields>
1616                 <links>
1617                         <link field="usr" reltype="has_a" key="id" class="au"/>
1618                 </links>
1619         </class>
1620         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1621                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1622                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1623                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1624                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1625                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1626                 </fields>
1627                 <links>
1628                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1629                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1630                 </links>
1631         </class>
1632         <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">
1633                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1634                         <field name="field" reporter:datatype="link"/>
1635                         <field name="id" reporter:datatype="id" />
1636                         <field name="source" reporter:datatype="link"/>
1637                         <field name="value" reporter:datatype="text"/>
1638                 </fields>
1639                 <links>
1640                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1641                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1642                 </links>
1643         </class>
1644         <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">
1645                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1646                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1647                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1648                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1649                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1650                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1651                 </fields>
1652                 <links>
1653                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1654                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1655                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1656                 </links>
1657         </class>
1658         <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">
1659                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1660                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1661                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1662                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1663                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1664                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1665                 </fields>
1666                 <links>
1667                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1668                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1669                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1670                 </links>
1671         </class>
1672         <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">
1673                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1674                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1675                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1676                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1677                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1678                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1679                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1680                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1681                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1682                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1683                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1684                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1685                 </fields>
1686                 <links>
1687                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1688                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1689                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1690                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1691                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1692                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1693                 </links>
1694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1695             <actions>
1696                 <create permission="TRANSIT_COPY" context_field="owner">
1697                     <context link="target_copy" field="circ_lib"/>
1698                 </create>
1699                 <retrieve/>
1700                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1701                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1702             </actions>
1703         </permacrud>
1704         </class>
1705         <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">
1706                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1707                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1708                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1709                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1710                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1711                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1712                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1713                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1714                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1715                 </fields>
1716                 <links>
1717                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1718                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1719                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1720                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1721                 </links>
1722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1723             <actions>
1724                 <create permission="ADMIN_SURVEY">
1725                     <context link="survey" field="owner"/>
1726                 </create>
1727                 <retrieve/>
1728                 <update permission="ADMIN_SURVEY">
1729                     <context link="survey" field="owner"/>
1730                 </update>
1731                 <delete permission="ADMIN_SURVEY">
1732                     <context link="survey" field="owner"/>
1733                 </delete>
1734             </actions>
1735         </permacrud>
1736         </class>
1737         <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">
1738                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
1739                         <field name="bucket" />
1740                         <field name="id" reporter:datatype="id" />
1741                         <field name="target_copy" reporter:datatype="link"/>
1742                         <field name="create_time" reporter:datatype="timestamp" />
1743                         <field name="pos" reporter:datatype="int" />
1744                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
1745                 </fields>
1746                 <links>
1747                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1748                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
1749             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
1750                 </links>
1751         </class>
1752         <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">
1753                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
1754                         <field name="id" reporter:datatype="id" />
1755                         <field name="item" reporter:datatype="link"/>
1756                         <field name="note" reporter:datatype="text" />
1757                 </fields>
1758                 <links>
1759                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
1760                 </links>
1761         </class>
1762
1763         <class id="acs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set" oils_persist:tablename="authority.control_set" reporter:label="Authority Control Set" oils_persist:field_safe="true">
1764                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
1765                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1766                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1767                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1768                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1769                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1770                 </fields>
1771                 <links>
1772                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
1773                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1774                 </links>
1775                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1776                         <actions>
1777                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1778                                 <retrieve/>
1779                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1780                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
1781                         </actions>
1782                 </permacrud>
1783         </class>
1784
1785         <class id="acsaf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_authority_field" oils_persist:tablename="authority.control_set_authority_field" reporter:label="Authority Control Set Authority Field" oils_persist:field_safe="true">
1786                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
1787                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1788                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
1789                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1790                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1791                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
1792                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
1793                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1794                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1795                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
1796                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
1797                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
1798                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
1799                 </fields>
1800                 <links>
1801                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
1802                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1803                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
1804                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
1805                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
1806                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
1807                 </links>
1808                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1809                         <actions>
1810                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1811                                 <retrieve/>
1812                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1813                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1814                         </actions>
1815                 </permacrud>
1816         </class>
1817
1818         <class id="acsbf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field" oils_persist:tablename="authority.control_set_bib_field" reporter:label="Authority Control Set Bib Field" oils_persist:field_safe="true">
1819                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
1820                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1821                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
1822                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
1823                 </fields>
1824                 <links>
1825                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
1826                 </links>
1827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1828                         <actions>
1829                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1830                                 <retrieve/>
1831                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1832                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1833                         </actions>
1834                 </permacrud>
1835         </class>
1836
1837         <class id="at" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::thesaurus" oils_persist:tablename="authority.thesaurus" reporter:label="Authority Thesaurus" oils_persist:field_safe="true">
1838                 <fields oils_persist:primary="code">
1839                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
1840                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1841                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
1842                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
1843                 </fields>
1844                 <links>
1845                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1846                 </links>
1847                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1848                         <actions>
1849                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1850                                 <retrieve/>
1851                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1852                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1853                         </actions>
1854                 </permacrud>
1855         </class>
1856
1857         <class id="aba" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis" oils_persist:tablename="authority.browse_axis" reporter:label="Authority Browse Axis" oils_persist:field_safe="true">
1858                 <fields oils_persist:primary="code">
1859                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
1860                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
1861                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
1862                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
1863                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
1864                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
1865                 </fields>
1866                 <links>
1867                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
1868                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
1869                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
1870                 </links>
1871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1872                         <actions>
1873                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1874                                 <retrieve/>
1875                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1876                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1877                         </actions>
1878                 </permacrud>
1879         </class>
1880
1881     <class id="abaafm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::browse_axis_authority_field_map" oils_persist:tablename="authority.browse_axis_authority_field_map" reporter:label="Authority Browse Axis Field Map" oils_persist:field_safe="true">
1882         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
1883             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
1884             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
1885             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
1886         </fields>
1887         <links>
1888             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
1889             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
1890         </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1894                 <retrieve/>
1895                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1896                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
1897             </actions>
1898         </permacrud>
1899     </class>
1900
1901         <class id="are" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::record_entry" oils_persist:tablename="authority.record_entry" reporter:label="Authority Record Entry">
1902                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
1903                         <field name="active" reporter:datatype="bool"/>
1904                         <field name="create_date" reporter:datatype="timestamp"/>
1905                         <field name="creator" />
1906                         <field name="deleted" reporter:datatype="bool"/>
1907                         <field name="edit_date" reporter:datatype="timestamp"/>
1908                         <field name="editor" />
1909                         <field name="id" reporter:datatype="id" />
1910                         <field name="last_xact_id" />
1911                         <field name="marc" />
1912                         <field name="source" />
1913                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
1914                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
1915                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
1916                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
1917                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
1918                 </fields>
1919                 <links>
1920                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
1921                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1922                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
1923                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1924                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
1925                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
1926                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
1927                 </links>
1928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1929                         <actions>
1930                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
1931                                 <retrieve/>
1932                                 <update permission="UPDATE_MARC" global_required="true"/>
1933                                 <delete permission="UPDATE_MARC" global_required="true"/>
1934                         </actions>
1935                 </permacrud>
1936         </class>
1937         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
1939                         <field name="char_encoding" />
1940                         <field name="id" />
1941                         <field name="record" />
1942                         <field name="record_status" />
1943                         <field name="thesaurus" />
1944                 </fields>
1945                 <links>
1946                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
1947                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
1948                 </links>
1949         </class>
1950         <class id="abl" controller="open-ils.cstore" oils_obj:fieldmapper="authority::bib_linking" oils_persist:tablename="authority.bib_linking" reporter:label="Authority-Bibliographic Record Link">
1951                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
1952                         <field name="id" reporter:datatype="id" />
1953                         <field name="bib" reporter:datatype="link" />
1954                         <field name="authority" reporter:datatype="link" />
1955                 </fields>
1956                 <links>
1957                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
1958                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
1959                 </links>
1960         </class>
1961         <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">
1962                 <fields oils_persist:primary="code" oils_persist:sequence="">
1963                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
1964                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1965                 </fields>
1966                 <links/>
1967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1968             <actions>
1969                 <create permission="CREATE_MARC_CODE" global_required="true"/>
1970                 <retrieve/>
1971                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
1972                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
1973             </actions>
1974         </permacrud>
1975         </class>
1976         <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">
1977                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
1978                         <field name="accepting_usr" />
1979                         <field name="amount" reporter:datatype="money" />
1980                         <field name="amount_collected" reporter:datatype="money" />
1981                         <field name="approval_code" reporter:datatype="text"/>
1982                         <field name="cash_drawer" reporter:datatype="link"/>
1983                         <field name="cc_first_name" reporter:datatype="text"/>
1984                         <field name="cc_last_name" reporter:datatype="text"/>
1985                         <field name="cc_number" reporter:datatype="text"/>
1986                         <field name="cc_order_number" reporter:datatype="text"/>
1987                         <field name="cc_type" reporter:datatype="text"/>
1988                         <field name="cc_processor" reporter:datatype="text"/>
1989                         <field name="expire_month" reporter:datatype="int" />
1990                         <field name="expire_year" reporter:datatype="int" />
1991                         <field name="id" reporter:datatype="id" />
1992                         <field name="note" reporter:datatype="text"/>
1993                         <field name="payment_ts" reporter:datatype="timestamp"/>
1994                         <field name="xact" reporter:datatype="link"/>
1995                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
1996                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
1997                 </fields>
1998                 <links>
1999                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2000                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2001                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2002                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2003                 </links>
2004         </class>
2005         <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">
2006                 <fields oils_persist:primary="name">
2007                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2008                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2009                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2010                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2011                 </fields>
2012                 <links/>
2013         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2014             <actions>
2015                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2016                 <retrieve/>
2017                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2018                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2019             </actions>
2020         </permacrud>
2021         </class>
2022
2023         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2024                 <fields oils_persist:primary="alias">
2025                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2026                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2027                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2028                 </fields>
2029                 <links>
2030                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2031                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2032                 </links>
2033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2034             <actions>
2035                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2036                 <retrieve/>
2037                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2038                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2039             </actions>
2040         </permacrud>
2041         </class>
2042
2043         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2044                 <fields oils_persist:primary="name">
2045                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2046                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2047                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2048                 </fields>
2049                 <links>
2050                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2051                 </links>
2052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2053             <actions>
2054                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2055                 <retrieve/>
2056                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2057                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2058             </actions>
2059         </permacrud>
2060         </class>
2061
2062         <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" oils_persist:field_safe="true">
2063                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2064                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2065                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2066                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2067                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2068                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2069                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2070                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2071                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2072                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2073                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2074                 </fields>
2075                 <links>
2076                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2077                 </links>
2078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2079             <actions>
2080                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2081                 <retrieve/>
2082                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2083                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2084             </actions>
2085         </permacrud>
2086         </class>
2087         <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">
2088                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2089                         <field name="id" reporter:datatype="id" />
2090                         <field name="name" reporter:datatype="text"/>
2091                         <field name="xpath" reporter:datatype="text"/>
2092                         <field name="format" reporter:datatype="link"/>
2093                         <field name="first_word" reporter:datatype="bool" />
2094                 </fields>
2095                 <links/>
2096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2097             <actions>
2098                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2099                 <retrieve/>
2100                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2101                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2102             </actions>
2103         </permacrud>
2104         </class>
2105         <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">
2106                 <fields oils_persist:primary="code" oils_persist:sequence="">
2107                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2108                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2109                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2110                 </fields>
2111                 <links/>
2112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2113             <actions>
2114                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2115                 <retrieve/>
2116                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2117                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2118             </actions>
2119         </permacrud>
2120         </class>
2121         <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">
2122                 <fields oils_persist:primary="code" oils_persist:sequence="">
2123                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2124                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2125                 </fields>
2126                 <links/>
2127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2128             <actions>
2129                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2130                 <retrieve/>
2131                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2132                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2133             </actions>
2134         </permacrud>
2135         </class>
2136     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2137         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2138             <field reporter:label="Call number class ID" name="id" reporter_datatype="id"/>
2139             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2140             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2141             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2142         </fields>
2143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2144             <actions>
2145                 <retrieve/>
2146             </actions>
2147         </permacrud>
2148     </class>
2149         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2150                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2151                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2152                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2153                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2154                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2155                 </fields>
2156                 <links>
2157                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2158                 </links>
2159         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2160             <actions>
2161                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2162                 <retrieve/>
2163                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2164                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2165             </actions>
2166         </permacrud>
2167         </class>
2168         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2169                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2170                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2171                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2172                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2173                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2174                 </fields>
2175                 <links>
2176                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2177                 </links>
2178         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2179             <actions>
2180                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2181                 <retrieve/>
2182                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2183                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2184             </actions>
2185         </permacrud>
2186         </class>
2187         <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">
2188                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2189                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2190                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2191                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2192                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2193                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2194                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2195                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2196                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2197                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2198                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2199                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2200                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2201                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2202                         <field reporter:label="Sort Key" name="label_sortkey" reporter:datatype="text"/>
2203                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2204                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2205                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2206                 </fields>
2207                 <links>
2208                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2209                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2210                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2211                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2212                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2213                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2214                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2215                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2216                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2217                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2218                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2219                 </links>
2220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2221             <actions>
2222                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2223                 <retrieve/>
2224                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2225                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2226             </actions>
2227         </permacrud>
2228         </class>
2229         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2230                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2231                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2232                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2233                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2234                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2235                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2236                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2237                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2238                 </fields>
2239                 <links>
2240                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2241                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2242         </links>
2243         </class>
2244         <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">
2245                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2246                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2247                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2248                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2249                 </fields>
2250                 <links>
2251                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2252                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2253                 </links>
2254         </class>
2255         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2256                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2257                         <field name="id" reporter:datatype="id" />
2258                         <field name="value" oils_persist:i18n="true" />
2259                 </fields>
2260                 <links/>
2261         </class>
2262         <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">
2263                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2264                         <field name="balance_owed" reporter:datatype="money" />
2265                         <field name="total_owed" reporter:datatype="money" />
2266                         <field name="total_paid" reporter:datatype="money" />
2267                         <field name="usr" reporter:datatype="link"/>
2268                 </fields>
2269                 <links>
2270                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2271         </links>
2272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2273             <actions>
2274                 <retrieve permission="VIEW_USER">
2275                     <context link="usr" field="home_ou"/>
2276                 </retrieve>
2277             </actions>
2278         </permacrud>
2279         </class>
2280         <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">
2281                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2282                         <field name="collector" />
2283                         <field name="enter_time" reporter:datatype="timestamp"/>
2284                         <field name="id" reporter:datatype="id" />
2285                         <field name="location" reporter:datatype="link"/>
2286                         <field name="usr" reporter:datatype="link"/>
2287                 </fields>
2288                 <links>
2289                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2290                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2291                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2292                 </links>
2293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2294             <actions>
2295                 <create permission="money.collections_tracker.create" context_field="location"/>
2296                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2297                 <delete permission="money.collections_tracker.create" context_field="location"/>
2298             </actions>
2299         </permacrud>
2300         </class>
2301         <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">
2302                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2303                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2304                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2305                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2306                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2307                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2308                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2309                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2310                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2311                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2312                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2313                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2314                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2315                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2316                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2317                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2318                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2319                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2320                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2321                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2322                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2323                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2324                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2325                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2326                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2327                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2328                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2329                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2330                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2331                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2332                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2333                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2334                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2335                 </fields>
2336                 <links>
2337                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2338                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2339                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2340                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2341                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2342                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2343                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2344                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2345                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2346                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2347                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2348                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2349                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2350                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2351                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2352                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2353                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2354                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2355                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2356                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2357                 </links>
2358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2359             <actions>
2360                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2361                 <retrieve/>
2362                 <update permission="UPDATE_MARC" global_required="true"/>
2363             </actions>
2364         </permacrud>
2365         </class>
2366         <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">
2367                 <fields oils_persist:primary="id">
2368                         <field name="dow_0_close" />
2369                         <field name="dow_0_open" />
2370                         <field name="dow_1_close" />
2371                         <field name="dow_1_open" />
2372                         <field name="dow_2_close" />
2373                         <field name="dow_2_open" />
2374                         <field name="dow_3_close" />
2375                         <field name="dow_3_open" />
2376                         <field name="dow_4_close" />
2377                         <field name="dow_4_open" />
2378                         <field name="dow_5_close" />
2379                         <field name="dow_5_open" />
2380                         <field name="dow_6_close" />
2381                         <field name="dow_6_open" />
2382                         <field name="id" reporter:datatype="id" />
2383                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2384                 </fields>
2385                 <links>
2386                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2387                 </links>
2388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2389             <actions>
2390                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2391                 <retrieve/>
2392                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2393                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2394             </actions>
2395         </permacrud>
2396         </class>
2397         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
2398                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2399                         <field name="id" reporter:datatype="id" />
2400                         <field name="record" reporter:datatype="link"/>
2401                         <field name="label" reporter:datatype="text"/>
2402                         <field name="label_sortkey" reporter:datatype="text"/>
2403                 </fields>
2404                 <links>
2405                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2406                 </links>
2407         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2408             <actions>
2409                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2410                 <retrieve/>
2411                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2412                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2413             </actions>
2414         </permacrud>
2415         </class>
2416         <class id="acpm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_part_map" oils_persist:tablename="asset.copy_part_map" reporter:label="Copy Monograph Part Map">
2417                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2418                         <field name="id" reporter:datatype="id" />
2419                         <field name="target_copy" reporter:datatype="link" />
2420                         <field name="part" reporter:datatype="link"/>
2421                 </fields>
2422                 <links>
2423                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2424                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2425                 </links>
2426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2427             <actions>
2428                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2429                 <retrieve/>
2430                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2431                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2432             </actions>
2433         </permacrud>
2434         </class>
2435         <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">
2436                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2437                         <field name="close_end" reporter:datatype="timestamp" />
2438                         <field name="close_start" reporter:datatype="timestamp" />
2439                         <field name="id" reporter:datatype="id" />
2440                         <field name="org_unit" reporter:datatype="org_unit"/>
2441                         <field name="reason" reporter:datatype="text"/>
2442                 </fields>
2443                 <links>
2444                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2445                 </links>
2446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2447             <actions>
2448                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2449                 <retrieve/>
2450                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2451                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2452             </actions>
2453         </permacrud>
2454         </class>
2455         <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">
2456                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2457                         <field name="extended" reporter:datatype="interval"/>
2458                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2459                         <field name="max_renewals" reporter:datatype="int" />
2460                         <field name="name" reporter:datatype="text"/>
2461                         <field name="normal" reporter:datatype="interval"/>
2462                         <field name="shrt" reporter:datatype="interval"/>
2463                 </fields>
2464                 <links>
2465                 </links>
2466         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2467             <actions>
2468                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2469                 <retrieve/>
2470                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2471                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2472             </actions>
2473         </permacrud>
2474         </class>
2475
2476         <class id="chdd" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date" oils_persist:tablename="config.hard_due_date" reporter:label="Hard Due Date">
2477                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2478                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2479                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2480             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2481                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2482             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2483                 </fields>
2484                 <links>
2485             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2486                 </links>
2487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2488             <actions>
2489                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2490                 <retrieve/>
2491                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2492                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2493             </actions>
2494                 </permacrud>
2495         </class>
2496
2497         <class id="chddv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::hard_due_date_values" oils_persist:tablename="config.hard_due_date_values" reporter:label="Hard Due Date Values">
2498                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2499                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2500                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2501                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2502             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2503                 </fields>
2504                 <links>
2505                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2506                 </links>
2507                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2508             <actions>
2509                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2510                 <retrieve/>
2511                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2512                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2513             </actions>
2514                 </permacrud>
2515         </class>
2516
2517         <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">
2518                 <fields oils_persist:primary="id" oils_persist:sequence="">
2519                         <field name="balance_owed" reporter:datatype="money"/>
2520                         <field name="id" reporter:datatype="id" />
2521                         <field name="last_billing_note" reporter:datatype="text"/>
2522                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2523                         <field name="last_billing_type" reporter:datatype="text"/>
2524                         <field name="last_payment_note" reporter:datatype="text"/>
2525                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2526                         <field name="last_payment_type" reporter:datatype="text"/>
2527                         <field name="total_owed" reporter:datatype="money"/>
2528                         <field name="total_paid" reporter:datatype="money"/>
2529                         <field name="usr" reporter:datatype="link"/>
2530                         <field name="xact_finish" reporter:datatype="timestamp" />
2531                         <field name="xact_start" reporter:datatype="timestamp" />
2532                         <field name="xact_type" reporter:datatype="text"/>
2533                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2534                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2535                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2536                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2537                         <field name="billing_location" reporter:datatype="link"/>
2538                 </fields>
2539                 <links>
2540                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2541                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2542                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2543                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2544                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2545                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2546                 </links>
2547         </class>
2548         <class id="au" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
2549                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2550                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2551                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2552                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2553                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2554                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2556                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2557                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2558                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2559                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2560                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2561                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2562                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2563                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2564                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2565                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2566                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2567                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2568                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2569                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2570                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2571                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2572                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2573                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2574                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2575                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2576                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2577                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2578                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2579                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2580                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2581                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2582                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2583                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2584                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2585                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2586                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2587                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2588                         <field reporter:label="Password" name="passwd"  reporter:datatype="text"/>
2589                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2590                         <field reporter:label="Prefix" name="prefix"  reporter:datatype="text"/>
2591                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2592                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2593                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2594                         <field reporter:label="Suffix/Title" name="suffix"  reporter:datatype="text"/>
2595                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2596                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2597                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2598                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2599                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2600                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2601                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2603                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2604                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2605                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2606                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2607                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2608                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2609                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2610                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2611                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2612                 </fields>
2613                 <links>
2614                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2615                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2616                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2617                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2618                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2619                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2620                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2621                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2622                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2623                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2624                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2625                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2626                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2627                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2628                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2629                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2630                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2631                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2632                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2633                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2634                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2635                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2636                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2637                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2638                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2639                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2640                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2641                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2642                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2643                 </links>
2644         </class>
2645
2646         <class id="csg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::settings_group" oils_persist:tablename="config.settings_group" reporter:label="Settings Group">
2647                 <fields oils_persist:primary="name">
2648                         <field name="name" reporter:datatype="text"/>
2649                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2650                 </fields>
2651                 <links/>
2652                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2653                         <actions>
2654                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2655                                 <retrieve/>
2656                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2657                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
2658                         </actions>
2659                 </permacrud>
2660         </class>
2661         <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">
2662                 <fields oils_persist:primary="name">
2663                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
2664                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2665                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
2666                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
2667                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
2668                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
2669                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
2670                 </fields>
2671                 <links>
2672                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
2673                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2674                 </links>
2675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2676                         <actions>
2677                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2678                                 <retrieve/>
2679                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2680                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
2681                         </actions>
2682                 </permacrud>
2683         </class>
2684         <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">
2685                 <fields oils_persist:primary="name">
2686                         <field name="name" reporter:datatype="text"/>
2687                         <field name="label" reporter:datatype="text"/>
2688                         <field name="description" reporter:datatype="text"/>
2689                         <field name="datatype" reporter:datatype="text"/>
2690                         <field name="view_perm" reporter:datatype="link"/>
2691                         <field name="update_perm" reporter:datatype="link"/>
2692                         <field name="fm_class" reporter:datatype="text"/>
2693                         <field name="grp" reporter:datatype="link"/>
2694                 </fields>
2695                 <links>
2696                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
2697                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
2698                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
2699                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
2700                 </links>
2701                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2702                         <actions>
2703                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2704                                 <retrieve/>
2705                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2706                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
2707                         </actions>
2708                 </permacrud>
2709         </class>
2710         <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">
2711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
2712                         <field name="id" />
2713                         <field name="name"  reporter:datatype="text"/>
2714                         <field name="org_unit" reporter:datatype="org_unit"/>
2715                         <field name="value"  reporter:datatype="text"/>
2716                 </fields>
2717                 <links>
2718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2719                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
2720                 </links>
2721         </class>
2722         <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">
2723                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
2724                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2725                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
2726                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2727                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
2728                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2729                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
2730                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
2731                 </fields>
2732                 <links>
2733                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
2734                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2735                 </links>
2736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2737             <actions>
2738                 <create permission="CREATE_COPY_NOTE">
2739                     <context link="owning_copy" field="circ_lib"/>
2740                 </create>
2741                 <retrieve permission="VIEW_COPY_NOTES">
2742                     <context link="owning_copy" field="circ_lib"/>
2743                 </retrieve>
2744                 <update permission="UPDATE_COPY_NOTE">
2745                     <context link="owning_copy" field="circ_lib"/>
2746                 </update>
2747                 <delete permission="DELETE_COPY_NOTE">
2748                     <context link="owning_copy" field="circ_lib"/>
2749                 </delete>
2750             </actions>
2751         </permacrud>
2752         </class>
2753         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
2754                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
2755                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
2756                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
2757                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
2758                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2759                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
2760                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
2761                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
2762                 </fields>
2763                 <links>
2764                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2765                 </links>
2766         </class>
2767         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
2768                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
2769                         <field name="fingerprint"  reporter:datatype="text"/>
2770                         <field name="id" reporter:datatype="id" />
2771                         <field name="master_record" reporter:datatype="link"/>
2772                         <field name="mods"  reporter:datatype="text"/>
2773                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
2774                 </fields>
2775                 <links>
2776                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
2777                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
2778                 </links>
2779         </class>
2780         <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">
2781                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
2782                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2783                         <field name="name"  reporter:datatype="text"/>
2784                 </fields>
2785                 <links/>
2786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2787             <actions>
2788                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
2789                 <retrieve/>
2790                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
2791                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
2792             </actions>
2793         </permacrud>
2794         </class>
2795         <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">
2796                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
2797                         <field name="code"  reporter:datatype="text"/>
2798                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
2799                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
2800                 </fields>
2801                 <links/>
2802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2803             <actions>
2804                 <create permission="CREATE_PERM" global_required="true"/>
2805                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
2806                 <update permission="UPDATE_PERM" global_required="true"/>
2807                 <delete permission="DELETE_PERM" global_required="true"/>
2808             </actions>
2809         </permacrud>
2810         </class>
2811         <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">
2812                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
2813                         <field name="id" reporter:datatype="id" />
2814                         <field name="metarecord" reporter:datatype="link"/>
2815                         <field name="source" reporter:datatype="link"/>
2816                 </fields>
2817                 <links>
2818                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2819                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
2820                 </links>
2821         </class>
2822         <class id="mfae" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::facet_entry" oils_persist:tablename="metabib.facet_entry" reporter:label="Combined Facet Entry" oils_persist:readonly="true">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
2824                         <field name="id" reporter:datatype="id" />
2825                         <field name="field" reporter:datatype="link"/>
2826                         <field name="source" reporter:datatype="link"/>
2827                         <field name="value"  reporter:datatype="text"/>
2828                 </fields>
2829                 <links>
2830                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2831                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2832                 </links>
2833         </class>
2834         <class id="mfe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::field_entry" reporter:label="Combined Field Entry View" oils_persist:readonly="true">
2835                 <oils_persist:source_definition>
2836                         SELECT * FROM metabib.author_field_entry
2837                                                 UNION ALL
2838                         SELECT * FROM metabib.keyword_field_entry
2839                                                 UNION ALL
2840                         SELECT * FROM metabib.identifier_field_entry
2841                                                 UNION ALL
2842                         SELECT * FROM metabib.title_field_entry
2843                                                 UNION ALL
2844                         SELECT * FROM metabib.subject_field_entry
2845                                                 UNION ALL
2846                         SELECT * FROM metabib.series_field_entry
2847                 </oils_persist:source_definition>
2848                 <fields>
2849                         <field name="field" reporter:datatype="link"/>
2850                         <field name="id" reporter:datatype="id" />
2851                         <field name="source" reporter:datatype="link"/>
2852                         <field name="value"  reporter:datatype="text"/>
2853                 </fields>
2854                 <links>
2855                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2856                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2857                 </links>
2858         </class>
2859         <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">
2860                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
2861                         <field name="field" reporter:datatype="link"/>
2862                         <field name="id" reporter:datatype="id" />
2863                         <field name="source" reporter:datatype="link"/>
2864                         <field name="value"  reporter:datatype="text"/>
2865                 </fields>
2866                 <links>
2867                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2868                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2869                 </links>
2870         </class>
2871         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
2872                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2873                         <field name="accepting_usr" reporter:datatype="link"/>
2874                         <field name="amount" reporter:datatype="money" />
2875                         <field name="amount_collected" reporter:datatype="money" />
2876                         <field name="cash_drawer" reporter:datatype="link"/>
2877                         <field name="id" reporter:datatype="id" />
2878                         <field name="note"  reporter:datatype="text"/>
2879                         <field name="payment_ts" reporter:datatype="timestamp"/>
2880                         <field name="xact" reporter:datatype="link"/>
2881                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2882                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2883                 </fields>
2884                 <links>
2885                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2886                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2887                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2888                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2889                 </links>
2890         </class>
2891         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
2892                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2893                         <field name="accepting_usr" reporter:datatype="link"/>
2894                         <field name="amount" reporter:datatype="money" />
2895                         <field name="amount_collected" reporter:datatype="money" />
2896                         <field name="id" reporter:datatype="id" />
2897                         <field name="note"  reporter:datatype="text"/>
2898                         <field name="payment_ts" reporter:datatype="timestamp"/>
2899                         <field name="xact" reporter:datatype="link"/>
2900                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
2901                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2902                 </fields>
2903                 <links>
2904                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2905                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2906                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2907                 </links>
2908         </class>
2909         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
2911                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
2912                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2913                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2914                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
2915                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2916                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
2917                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
2918                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2919                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
2920                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
2921                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
2922                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
2923                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
2924                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
2925                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
2926                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
2927                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
2928                 </fields>
2929                 <links>
2930                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2931                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
2932                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
2933                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
2934                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
2935                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
2936                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
2937                 </links>
2938         </class>
2939
2940         <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">
2941                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
2942                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2943                         <field name="name"  reporter:datatype="text"/>
2944                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
2945                         <field name="block_list" reporter:datatype="text"/>
2946                         <field name="org_depth" reporter:datatype="int"/>
2947                 </fields>
2948                 <links/>
2949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2950             <actions>
2951                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2952                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
2953                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2954                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
2955             </actions>
2956         </permacrud>
2957         </class>
2958         <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">
2959                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
2960                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
2961                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
2962                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
2963                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
2964                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
2965                 </fields>
2966                 <links>
2967                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
2968                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
2969                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2970         </links>
2971         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2972             <actions>
2973                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2974                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2975                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2976                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
2977             </actions>
2978         </permacrud>
2979         </class>
2980         <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" oils_persist:field_safe="true">
2981                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
2982                         <field name="holdable" reporter:datatype="bool"/>
2983                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
2984                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
2985                         <field name="opac_visible" reporter:datatype="bool"/>
2986             <field name="copy_active" reporter:datatype="bool"/>
2987                 </fields>
2988                 <links/>
2989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2990             <actions>
2991                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
2992                 <retrieve/>
2993                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
2994                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
2995             </actions>
2996         </permacrud>
2997         </class>
2998         <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">
2999                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3000                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3001                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3002                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3003                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3004                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3005                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3006                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3007                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3008                 </fields>
3009                 <links>
3010                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3011                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3012                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3013                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3014                 </links>
3015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3016                         <actions>
3017                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3018                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3019                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3020                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3021                         </actions>
3022                 </permacrud>
3023         </class>
3024         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3025                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3026                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3027                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3028                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3029                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3030                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3031                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3032                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3033                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3034                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3035                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3036                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3037                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3038                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3039                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3040                 </fields>
3041                 <links>
3042                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3043                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3044                 </links>
3045         </class>
3046         <class id="aal" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::address_alert" oils_persist:tablename="actor.address_alert" reporter:label="Address Alert">
3047                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3048                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3049                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3050                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3051                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3052                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3053                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3054                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3055                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3056                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3057                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3058                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3059                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3060                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3061                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3062                 </fields>
3063                 <links>
3064                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3065                 </links>
3066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3067                         <actions>
3068                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3069                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3070                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3071                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3072                         </actions>
3073                 </permacrud>
3074         </class>
3075
3076
3077         <class id="auss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_saved_search" oils_persist:tablename="actor.usr_saved_search" reporter:label="User Saved Search">
3078                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3079                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3080                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3081                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3082                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3083                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3084                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3085                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3086                 </fields>
3087                 <links>
3088                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3089                 </links>
3090         </class>
3091
3092         <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">
3093                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3094                         <field name="call_number" />
3095                         <field name="create_date" reporter:datatype="timestamp"/>
3096                         <field name="creator" reporter:datatype="link"/>
3097                         <field name="id" reporter:datatype="id" />
3098                         <field name="pub" reporter:datatype="bool"/>
3099                         <field name="title"  reporter:datatype="text"/>
3100                         <field name="value"  reporter:datatype="text"/>
3101                 </fields>
3102                 <links>
3103                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3104                 </links>
3105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3106             <actions>
3107                 <create permission="CREATE_VOLUME_NOTE">
3108                     <context link="call_number" field="owning_lib"/>
3109                 </create>
3110                 <retrieve permission="VIEW_VOLUME_NOTES">
3111                     <context link="call_number" field="owning_lib"/>
3112                 </retrieve>
3113                 <update permission="UPDATE_VOLUME_NOTE">
3114                     <context link="call_number" field="owning_lib"/>
3115                 </update>
3116                 <delete permission="DELETE_VOLUME_NOTE">
3117                     <context link="call_number" field="owning_lib"/>
3118                 </delete>
3119             </actions>
3120         </permacrud>
3121         </class>
3122         <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">
3123                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3124                         <field name="create_date" reporter:datatype="timestamp"/>
3125                         <field name="creator" reporter:datatype="link"/>
3126                         <field name="edit_date" reporter:datatype="timestamp"/>
3127                         <field name="editor" reporter:datatype="link"/>
3128                         <field name="id" reporter:datatype="id" />
3129                         <field name="record" reporter:datatype="link"/>
3130                         <field name="value" reporter:datatype="text"/>
3131                 </fields>
3132                 <links>
3133                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3134                 </links>
3135         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3136             <actions>
3137                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3138                 <retrieve/>
3139                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3140                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3141             </actions>
3142         </permacrud>
3143         </class>
3144         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3145         <oils_persist:source_definition>
3146 SELECT  usr,
3147         SUM(
3148             CASE
3149                 WHEN (
3150                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3151                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3152                 ) THEN 1
3153                 ELSE 0
3154             END
3155         ) AS out,
3156
3157         SUM(
3158             CASE
3159                 WHEN (
3160                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3161                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3162                 ) THEN 1
3163                 ELSE 0
3164             END
3165         ) AS overdue,
3166
3167         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3168         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3169         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3170   FROM  action.circulation
3171   WHERE checkin_time IS NULL
3172   GROUP BY 1
3173         </oils_persist:source_definition>
3174         <fields oils_persist:primary="usr">
3175             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3176             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3177             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3178             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3179             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3180             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3181         </fields>
3182         <links>
3183             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3184         </links>
3185         </class>
3186         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3187         <oils_persist:source_definition>
3188 SELECT  usr,
3189         ARRAY_TO_STRING(ARRAY_ACCUM(
3190             CASE
3191                 WHEN (
3192                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3193                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3194                 ) THEN id
3195                 ELSE 0
3196             END
3197         ),',') AS out,
3198
3199         ARRAY_TO_STRING(ARRAY_ACCUM(
3200             CASE
3201                 WHEN (
3202                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3203                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3204                 ) THEN id
3205                 ELSE 0
3206             END
3207         ),',') AS overdue,
3208
3209         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3210         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3211         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3212   FROM  action.circulation
3213   WHERE checkin_time IS NULL
3214   GROUP BY 1
3215         </oils_persist:source_definition>
3216         <fields oils_persist:primary="usr">
3217             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3218             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3219             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3220             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3221             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3222             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3223         </fields>
3224         <links>
3225             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3226         </links>
3227         </class>
3228         <class id="circ" controller="open-ils.cstore" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
3229                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3230                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3231                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3232                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3233                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3234                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3235                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3236                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3237                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3238                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3239                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3240                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3241                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3242                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3243                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3244                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3245                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3246                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3247                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3248                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3249                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3250                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3251                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3252                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3253                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3254                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3255                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3256                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3257                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3258                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3259                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3260                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3261                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3262                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3263                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3264                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3265                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3266                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3267                 </fields>
3268                 <links>
3269                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3270                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3271                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3272                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3273                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3274                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3275                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3276                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3277                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3278                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3279                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3280                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3281                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3282                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3283                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3284                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3285                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3286                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3287                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3288                 </links>
3289         </class>
3290         <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">
3291                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3292                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3293                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3294                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3295                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3296                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3297                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3298                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3299                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3300                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3301                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3302                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3303                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3304                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3305                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3306                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3307                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3308                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3309                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3310                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3311                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3312                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3313                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3314                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3315                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3316                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3317                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3318                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3319                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3320                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3321                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3322                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3323                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3324                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3325                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3326                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3327                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3328                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3329                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3330                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3331                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3332                 </fields>
3333                 <links>
3334                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3335                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3336                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3337                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3338                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3339                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3340                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3341                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3342                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3343                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3344                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3345                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3346                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3347                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3348                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3349                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3350                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3351                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3352                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3353                 </links>
3354         </class>
3355         <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">
3356                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3357                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3358                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3359                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3360                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3361                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3362                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3363                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3364                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3365                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3366                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3367                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3368                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3369                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3370                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3371                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3372                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3373                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3374                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3375                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3376                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3377                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3378                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3379                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3380                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3381                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3382                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3383                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3384                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3385                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3386                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3387                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3388                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3389                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3390                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3391                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3392                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3393                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3394                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3395                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3396                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3397                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3398                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3399                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3400                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3401                 </fields>
3402                 <links>
3403                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3404                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3405                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3406                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3407                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3408                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3409                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3410                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3411                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3412                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3413                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3414                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3415                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3416                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3417                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3418                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3419                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3420                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3421                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3422                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3423                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3424                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3425                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3426                 </links>
3427         </class>
3428
3429         <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">
3430                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3431                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3432                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3433                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3434                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3435                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3436                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3437                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3438                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3439                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3440                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3441                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3442                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3443                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3444                 </fields>
3445                 <links>
3446                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3447                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3448                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3449                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3450                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3451                 </links>
3452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3453                         <actions>
3454                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3455                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3456                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3457                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3458                         </actions>
3459                 </permacrud>
3460         </class>
3461
3462         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3463                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3464                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3465                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3466                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3467                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3468                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3469                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3470                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3471                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3472                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3473                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3474                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3475                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3476                 </fields>
3477                 <links>
3478                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3479                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3480                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3481                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3482                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3483                 </links>
3484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3485                         <actions>
3486                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3487                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3488                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3489                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3490                         </actions>
3491                 </permacrud>
3492         </class>
3493         
3494         <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">
3495                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3496                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3497                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3498                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3499                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3500                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3501                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3502                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3503                 </fields>
3504                 <links>
3505                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3506                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3507                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3508                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3509                 </links>
3510                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3511                         <actions>
3512                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3513                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3514                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3515                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3516                         </actions>
3517                 </permacrud>
3518         </class>
3519         
3520         <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">
3521                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3522                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3523                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3524                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3525                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3526                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3527                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3528                 </fields>
3529                 <links>
3530                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3531                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3532                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3533                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3534                 </links>
3535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3536                         <actions>
3537                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3538                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3539                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3540                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3541                         </actions>
3542                 </permacrud>
3543         </class>
3544         
3545         <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">
3546                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3547                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3548                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3549                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3550                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3551                 </fields>
3552                 <links>
3553                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3554                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3555                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3556                 </links>
3557                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3558                         <actions>
3559                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3560                     <context link="resource" field="owner" />
3561                 </create>
3562                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3563                     <context link="resource" field="owner" />
3564                 </retrieve>
3565                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3566                     <context link="resource" field="owner" />
3567                 </update>
3568                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3569                     <context link="resource" field="owner" />
3570                 </delete>
3571                         </actions>
3572                 </permacrud>
3573         </class>
3574         
3575         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3576                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3577                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3578                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3579                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3580                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3581                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3582                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3583                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3584                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3585                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3586                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3587                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3588                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3589                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3590                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3591                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3592                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3593                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3594                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3595                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3596                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3597                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3598                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3599                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3600                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3601                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
3602                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
3603                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
3604                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
3605                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3606                 </fields>
3607                 <links>
3608                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3609                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3610                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3611                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3612                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3613                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
3614                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
3615                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3616                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
3617                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
3618                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
3619                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
3620                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
3621                 </links>
3622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3623                         <actions>
3624                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3625                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3626                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3627                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
3628                         </actions>
3629                 </permacrud>
3630         </class>
3631         
3632         <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">
3633                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
3634                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
3635                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
3636                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
3637                 </fields>
3638                 <links>
3639                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
3640                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
3641                 </links>
3642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3643                         <actions>
3644                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3645                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
3646                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3647                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
3648                         </actions>
3649                 </permacrud>
3650         </class>
3651
3652         <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">
3653                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
3654                         <field name="bucket" reporter:datatype="link"/>
3655                         <field name="id" reporter:datatype="id" />
3656                         <field name="target_call_number" reporter:datatype="link" />
3657                         <field name="create_time" reporter:datatype="timestamp" />
3658                         <field name="pos" reporter:datatype="int" />
3659                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
3660                 </fields>
3661                 <links>
3662                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
3663                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
3664             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
3665                 </links>
3666         </class>
3667         <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">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
3669                         <field name="id" reporter:datatype="id" />
3670                         <field name="item" reporter:datatype="link"/>
3671                         <field name="note" reporter:datatype="text" />
3672                 </fields>
3673                 <links>
3674                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
3675                 </links>
3676         </class>
3677         <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">
3678                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
3679                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
3680                         <field name="btype" reporter:datatype="text"/>
3681                         <field name="id" reporter:datatype="id" />
3682                         <field name="name" reporter:datatype="text"/>
3683                         <field name="description" reporter:datatype="text"/>
3684                         <field name="owner" reporter:datatype="link"/>
3685                         <field name="pub" reporter:datatype="bool"/>
3686                         <field name="create_time" reporter:datatype="timestamp" />
3687                 </fields>
3688                 <links>
3689                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3690                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
3691                 </links>
3692         </class>
3693         <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">
3694                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
3695                         <field name="id" reporter:datatype="id" />
3696                         <field name="bucket" reporter:datatype="link"/>
3697                         <field name="note" reporter:datatype="text" />
3698                 </fields>
3699                 <links>
3700                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
3701                 </links>
3702         </class>
3703         <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">
3704                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
3705                         <field name="hold" reporter:datatype="link"/>
3706                         <field name="id" reporter:datatype="id" />
3707                         <field name="target_copy" reporter:datatype="link"/>
3708                 </fields>
3709                 <links>
3710                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3711                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3712                 </links>
3713         </class>
3714         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
3715                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
3716                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
3717                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
3718                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
3719                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
3720                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
3721                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
3722                 </fields>
3723                 <links>
3724                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
3725                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
3726                 </links>
3727         </class>
3728         <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">
3729                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
3730                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
3731                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
3732                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
3733                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
3734                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3735                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
3736                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
3737                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
3738                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
3739                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
3740                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
3741                 </fields>
3742                 <links>
3743                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3744                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
3745                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
3746                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
3747                 </links>
3748         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3749             <actions>
3750                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
3751                 <retrieve/>
3752                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
3753                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
3754             </actions>
3755         </permacrud>
3756         </class>
3757
3758     <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">
3759         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
3760             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
3761             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
3762             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
3763             <field reporter:label="Position" name="position" reporter:datatype="int"/>
3764         </fields>
3765         <links>
3766             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
3767             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
3768         </links>
3769         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3770             <actions>
3771                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3772                 <retrieve/>
3773                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3774                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
3775             </actions>
3776         </permacrud>
3777     </class>
3778
3779         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
3780                 <fields>
3781                         <field name="sre_id" oils_persist:virtual="true" />
3782                         <field name="location" oils_persist:virtual="true" />
3783                         <field name="owning_lib" oils_persist:virtual="true" />
3784                         <field name="basic_holdings" oils_persist:virtual="true" />
3785                         <field name="basic_holdings_add" oils_persist:virtual="true" />
3786                         <field name="supplement_holdings" oils_persist:virtual="true" />
3787                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
3788                         <field name="index_holdings" oils_persist:virtual="true" />
3789                         <field name="index_holdings_add" oils_persist:virtual="true" />
3790                         <field name="online" oils_persist:virtual="true" />
3791                         <field name="missing" oils_persist:virtual="true" />
3792                         <field name="incomplete" oils_persist:virtual="true" />
3793                 </fields>
3794         </class>
3795
3796         <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">
3797                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
3798                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
3799                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
3800                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3801                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3802                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3803                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
3804                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
3805                         <field reporter:label="ID" name="id" reporter:datatype="id" />
3806                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3807                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
3808                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
3809                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
3810                 </fields>
3811                 <links>
3812                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3813                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
3814                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3815                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3816                 </links>
3817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3818                         <actions>
3819                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
3820                                 <retrieve/>
3821                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
3822                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
3823                         </actions>
3824                 </permacrud>
3825         </class>
3826
3827         <class id="scap" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::caption_and_pattern" oils_persist:tablename="serial.caption_and_pattern" reporter:label="Caption and Pattern">
3828                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
3829                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3830                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3831                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
3832                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3833                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3834                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3835                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
3836                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
3837                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
3838                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
3839                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
3840                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
3841                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
3842                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
3843                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
3844                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
3845                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
3846                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
3847                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
3848                 </fields>
3849                 <links>
3850                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3851                 </links>
3852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3853                         <actions>
3854                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
3855                                         <context link="subscription" field="owning_lib" />
3856                                 </create>
3857                                 <retrieve />
3858                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
3859                                         <context link="subscription" field="owning_lib" />
3860                                 </update>
3861                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
3862                                         <context link="subscription" field="owning_lib" />
3863                                 </delete>
3864                         </actions>
3865                 </permacrud>
3866         </class>
3867
3868         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
3869                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
3870                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3871                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
3872                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
3873                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
3874                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
3875                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
3876                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
3877                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
3878                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
3879                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3880                 </fields>
3881                 <links>
3882                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3883                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
3884                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
3885                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
3886                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
3887                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
3888                 </links>
3889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3890                         <actions>
3891                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3892                                 <retrieve />
3893                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3894                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
3895                         </actions>
3896                 </permacrud>
3897         </class>
3898
3899         <class id="ssubn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
3900                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
3901                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3902                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3903                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3904                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3905                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3906                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3907                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3908                 </fields>
3909                 <links>
3910                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3911                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3912                 </links>
3913                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3914                 </permacrud>
3915         </class>
3916
3917         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
3918                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
3919                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3920                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
3921                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
3922                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
3923                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
3924                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
3925                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
3926                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
3927                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
3928                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
3929                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
3930                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
3931                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3934                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3935                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3936                 </fields>
3937                 <links>
3938                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
3939                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
3940                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
3941                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
3942                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
3943                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
3944                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
3945                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
3946                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
3947                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
3948                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
3949                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
3950                 </links>
3951                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3952                         <actions>
3953                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3954                                 <retrieve />
3955                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3956                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
3957                         </actions>
3958                 </permacrud>
3959         </class>
3960
3961         <class id="sdistn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution_note" oils_persist:tablename="serial.distribution_note" reporter:label="Distribution Note">
3962                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
3963                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3964                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3965                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
3966                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3967                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
3968                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
3969                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
3970                 </fields>
3971                 <links>
3972                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
3973                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3974                 </links>
3975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3976                         <actions>
3977                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
3978                                         <context link="distribution" field="holding_lib" />
3979                                 </create>
3980                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
3981                                         <context link="distribution" field="holding_lib" />
3982                                 </retrieve>
3983                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
3984                                         <context link="distribution" field="holding_lib" />
3985                                 </update>
3986                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
3987                                         <context link="distribution" field="holding_lib" />
3988                                 </delete>
3989                         </actions>
3990                 </permacrud>
3991         </class>
3992
3993         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
3994                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
3995                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3996                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
3997                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
3998                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
3999                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4000                 </fields>
4001                 <links>
4002                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4003                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4004                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4005                 </links>
4006                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4007                         <actions>
4008                                 <create permission="ADMIN_SERIAL_STREAM">
4009                                         <context link="distribution" field="holding_lib" />
4010                                 </create>
4011                                 <retrieve />
4012                                 <update permission="ADMIN_SERIAL_STREAM">
4013                                         <context link="distribution" field="holding_lib" />
4014                                 </update>
4015                                 <delete permission="ADMIN_SERIAL_STREAM">
4016                                         <context link="distribution" field="holding_lib" />
4017                                 </delete>
4018                         </actions>
4019                 </permacrud>
4020         </class>
4021
4022         <class id="srlu" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::routing_list_user" oils_persist:tablename="serial.routing_list_user" reporter:label="Routing List User">
4023                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4024                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4025                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4026                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4027                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4028                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4029                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4030                 </fields>
4031                 <links>
4032                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4033                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4034                 </links>
4035                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4036                         <actions>
4037                                 <create permission="ADMIN_SERIAL_STREAM">
4038                                         <context link="stream" jump="distribution" field="holding_lib" />
4039                                 </create>
4040                                 <retrieve permission="RECEIVE_SERIAL">
4041                                         <context link="stream" jump="distribution" field="holding_lib" />
4042                                 </retrieve>
4043                                 <update permission="ADMIN_SERIAL_STREAM">
4044                                         <context link="stream" jump="distribution" field="holding_lib" />
4045                                 </update>
4046                                 <delete permission="ADMIN_SERIAL_STREAM">
4047                                         <context link="stream" jump="distribution" field="holding_lib" />
4048                                 </delete>
4049                         </actions>
4050                 </permacrud>
4051         </class>
4052
4053         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4054                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4055                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4056                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4057                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4058                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4059                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4060                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4061                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4062                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4063                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4064                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4065                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4066                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4067                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4068                 </fields>
4069                 <links>
4070                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4071                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4072                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4073                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4074                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4075                 </links>
4076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4077                         <actions>
4078                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4079                                         <context link="subscription" field="owning_lib" />
4080                                 </create>
4081                                 <retrieve/>
4082                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4083                                         <context link="subscription" field="owning_lib" />
4084                                 </update>
4085                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4086                                         <context link="subscription" field="owning_lib" />
4087                                 </delete>
4088                         </actions>
4089                 </permacrud>
4090         </class>
4091
4092         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4093                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4094                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4095                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4096                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4097                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4098                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4099                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4100                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4101                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4102                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4103                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4104                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4105                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4106                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4107                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4108                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4109                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4110                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4111                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4112                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4113                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4114                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4115                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4116                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4117                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4118                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4119                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4120                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4121                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4122                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4123                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4124                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4125                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4126                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4127                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4128                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4129                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4130                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4131                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4132                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4133                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4134                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4135                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4136                 </fields>
4137                 <links>
4138                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4139                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4140                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4141                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4142                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4143                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4144                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4145                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4146                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4147                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4148                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4149                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4150                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4151                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4152                 </links>
4153                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4154                         <actions>
4155                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4156                                 <retrieve/>
4157                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4158                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4159                         </actions>
4160                 </permacrud>
4161         </class>
4162
4163         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4164                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4165                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4166                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4167                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4168                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4169                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4170                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4171                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4172                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4173                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4174                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4175                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4176                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4177                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4178                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4179                 </fields>
4180                 <links>
4181                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4182                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4183                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4184                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4185                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4186                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4187                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4188                 </links>
4189                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4190                         <actions>
4191                                 <create permission="ADMIN_SERIAL_ITEM">
4192                                         <context link="stream" jump="distribution" field="holding_lib" />
4193                                 </create>
4194                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4195                                         <context link="stream" jump="distribution" field="holding_lib" />
4196                                 </retrieve>
4197                                 <update permission="ADMIN_SERIAL_ITEM">
4198                                         <context link="stream" jump="distribution" field="holding_lib" />
4199                                 </update>
4200                                 <delete permission="ADMIN_SERIAL_ITEM">
4201                                         <context link="stream" jump="distribution" field="holding_lib" />
4202                                 </delete>
4203                         </actions>
4204                 </permacrud>
4205         </class>
4206
4207         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4208                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4209                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4210                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4211                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4212                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4213                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4214                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4215                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4216                 </fields>
4217                 <links>
4218                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4219                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4220                 </links>
4221                 <!-- Not available via PCRUD at this time -->
4222         </class>
4223
4224         <class id="sbsum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::basic_summary" oils_persist:tablename="serial.basic_summary" reporter:label="Basic Issue Summary">
4225                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4226                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4227                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4228                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4229                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4230                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4231                 </fields>
4232                 <links>
4233                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4234                 </links>
4235                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4236                         <actions>
4237                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4238                                         <context link="distribution" field="holding_lib" />
4239                                 </create>
4240                                 <retrieve/>
4241                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4242                                         <context link="distribution" field="holding_lib" />
4243                                 </update>
4244                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4245                                         <context link="distribution" field="holding_lib" />
4246                                 </create>
4247                         </actions>
4248                 </permacrud>
4249         </class>
4250
4251         <class id="sssum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::supplement_summary" oils_persist:tablename="serial.supplement_summary" reporter:label="Supplemental Issue Summary">
4252                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4253                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4254                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4255                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4256                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4257                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4258                 </fields>
4259                 <links>
4260                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4261                 </links>
4262                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4263                         <actions>
4264                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4265                                         <context link="distribution" field="holding_lib" />
4266                                 </create>
4267                                 <retrieve/>
4268                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4269                                         <context link="distribution" field="holding_lib" />
4270                                 </update>
4271                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4272                                         <context link="distribution" field="holding_lib" />
4273                                 </create>
4274                         </actions>
4275                 </permacrud>
4276         </class>
4277
4278         <class id="sisum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::index_summary" oils_persist:tablename="serial.index_summary" reporter:label="Index Issue Summary">
4279                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4280                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4281                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4282                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4283                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4284                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4285                 </fields>
4286                 <links>
4287                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4288                 </links>
4289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4290                         <actions>
4291                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4292                                         <context link="distribution" field="holding_lib" />
4293                                 </create>
4294                                 <retrieve/>
4295                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4296                                         <context link="distribution" field="holding_lib" />
4297                                 </update>
4298                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4299                                         <context link="distribution" field="holding_lib" />
4300                                 </create>
4301                         </actions>
4302                 </permacrud>
4303         </class>
4304
4305         <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">
4306                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4307                         <field name="id" reporter:datatype="id" />
4308                         <field name="owning_copy" reporter:datatype="link"/>
4309                         <field name="stat_cat" reporter:datatype="link"/>
4310                         <field name="stat_cat_entry" reporter:datatype="link"/>
4311                 </fields>
4312                 <links>
4313                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4314                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4315                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4316                 </links>
4317         </class>
4318         <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">
4319                 <fields oils_persist:primary="code">
4320                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4321                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4322                 </fields>
4323                 <links/>
4324         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4325             <actions>
4326                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4327                 <retrieve/>
4328                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4329                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4330             </actions>
4331         </permacrud>
4332         </class>
4333         <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">
4334                 <fields oils_persist:primary="code">
4335                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4336                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4337                 </fields>
4338                 <links/>
4339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4340             <actions>
4341                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4342                 <retrieve/>
4343                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4344                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4345             </actions>
4346         </permacrud>
4347         </class>
4348         <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">
4349                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4350                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4351                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4352                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4353                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4354                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4355                 </fields>
4356                 <links>
4357             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4358         </links>
4359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4360             <actions>
4361                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4362                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4363                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4364                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4365             </actions>
4366         </permacrud>
4367         </class>
4368         <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">
4369                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4370                         <field name="id" reporter:datatype="id" />
4371                         <field name="name" reporter:datatype="text"/>
4372                 </fields>
4373                 <links/>
4374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4375             <actions>
4376                 <create permission="CREATE_LASSO" global_required="true"/>
4377                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4378                 <update permission="UPDATE_LASSO" global_required="true"/>
4379                 <delete permission="DELETE_LASSO" global_required="true"/>
4380             </actions>
4381         </permacrud>
4382         </class>
4383         <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">
4384                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4385                         <field name="id" reporter:datatype="id" />
4386                         <field name="lasso" reporter:datatype="link"/>
4387                         <field name="org_unit" reporter:datatype="org_unit"/>
4388                 </fields>
4389                 <links>
4390                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4391                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4392                 </links>
4393         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4394             <actions>
4395                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4396                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4397                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4398                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4399             </actions>
4400         </permacrud>
4401         </class>
4402         <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">
4403                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4404                         <field name="id" reporter:datatype="id" />
4405                         <field name="from_org" reporter:datatype="org_unit"/>
4406                         <field name="to_org" reporter:datatype="org_unit"/>
4407                         <field name="prox" reporter:datatype="int" />
4408                 </fields>
4409                 <links>
4410                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4411                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4412                 </links>
4413         </class>
4414         <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">
4415                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4416                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4417                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4418                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4419                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4420                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4421                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4422                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4423                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4424                 </fields>
4425                 <links/>
4426         </class>
4427         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4428                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4429                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4430                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4431                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4432                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4433                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4434                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4435                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4436                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4437                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4438                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4439                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4440                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4441                 </fields>
4442                 <links>
4443                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4444                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4445                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4446                 </links>
4447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4448             <actions>
4449                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4450                 <retrieve/>
4451                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4452                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4453             </actions>
4454         </permacrud>
4455         </class>
4456         <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">
4457                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4458                         <field name="address_type"  reporter:datatype="text"/>
4459                         <field name="city"  reporter:datatype="text"/>
4460                         <field name="country"  reporter:datatype="text"/>
4461                         <field name="county"  reporter:datatype="text"/>
4462                         <field name="id" reporter:datatype="id" />
4463                         <field name="org_unit" reporter:datatype="org_unit"/>
4464                         <field name="post_code"  reporter:datatype="text"/>
4465                         <field name="state"  reporter:datatype="text"/>
4466                         <field name="street1"  reporter:datatype="text"/>
4467                         <field name="street2"  reporter:datatype="text"/>
4468                         <field name="valid" reporter:datatype="bool"/>
4469                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4470                 </fields>
4471                 <links>
4472                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4473                 </links>
4474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4475             <actions>
4476                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4477                 <retrieve/>
4478                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4479                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4480             </actions>
4481         </permacrud>
4482         </class>
4483         <!-- A note: Please update alhr when updating ahr -->
4484         <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">
4485                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
4486                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4487                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4488                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4489                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4490                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4491                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4492                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4493                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4494                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4495                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4496                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4497                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4498                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4499                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4500                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4501                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4502                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4503                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4504                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4505                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4506                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4507                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4508                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4509                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4510                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4511                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4512                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4513                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4514                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4515                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4516                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4517                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4518                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4519                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4520                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4521                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4522                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4523                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4524                 </fields>
4525                 <links>
4526                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4527                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4528                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4529                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4530                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4531                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4532                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4533                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4534                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4535                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4536                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4537                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4538                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4539                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4540                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4541                 </links>
4542         </class>
4543         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
4544                 <oils_persist:source_definition>
4545                         SELECT ahr.* FROM action.hold_request ahr JOIN (SELECT current_copy, MAX(capture_time) AS capture_time FROM action.hold_request WHERE capture_time IS NOT NULL GROUP BY current_copy)x USING (current_copy, capture_time)
4546                 </oils_persist:source_definition>
4547                 <fields oils_persist:primary="id">
4548                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
4549                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
4550                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
4551                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
4552                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4553                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
4554                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
4555                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
4556                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
4557                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
4558                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
4559                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
4560                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
4561                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
4562                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
4563                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
4564                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
4565                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
4566                         <field reporter:label="Item Selection Depth" name="selection_depth" />
4567                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
4568                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
4569                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
4570                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
4571                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
4572                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
4573                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
4574                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
4575                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
4576                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
4577                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
4578                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
4579                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
4580                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
4581                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
4582                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
4583                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
4584                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
4585                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
4586                 </fields>
4587                 <links>
4588                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
4589                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
4590                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4591                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
4592                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
4593                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
4594                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4595                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4596                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
4597                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
4598                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
4599                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
4600                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
4601                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
4602                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
4603                 </links>
4604         </class>
4605
4606         <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">
4607                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
4608                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4609                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
4610                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4611                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
4612                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
4613                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
4614                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
4615                 </fields>
4616                 <links>
4617                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4618                 </links>
4619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4620                         <actions>
4621                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
4622                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
4623                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
4624                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
4625                         </actions>
4626                 </permacrud>
4627         </class>
4628         <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">
4629                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
4630                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
4631                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
4632                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
4633                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
4634                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
4635                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
4636                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4637                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
4638                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
4639                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
4640                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
4641                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
4642                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4643                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
4644                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
4645                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
4646                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4647                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
4648                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
4649                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
4650                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
4651                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
4652                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
4653                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
4654                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
4655                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
4656                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4657                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4658                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4659                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
4660                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
4661                 </fields>
4662                 <links>
4663                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
4664                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
4665                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
4666                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
4667                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
4668                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
4669                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
4670                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
4671                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
4672                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
4673                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
4674                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
4675                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
4676                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
4677                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
4678                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
4679                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
4680                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
4681                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
4682                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
4683                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
4684                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
4685                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
4686                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
4687                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
4688                 </links>
4689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4690             <actions>
4691                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
4692                 <retrieve permission="CREATE_ORG_UNIT UPDATE_ORG_UNIT DELETE_ORG_UNIT">
4693                     <context field="id"/>
4694                     <context field="parent_ou"/>
4695                                 </retrieve>
4696                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
4697                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
4698             </actions>
4699         </permacrud>
4700         </class>
4701         <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">
4702                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
4703                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4704                         <field name="btype" reporter:datatype="text"/>
4705                         <field name="id" reporter:datatype="id" />
4706                         <field name="name"  reporter:datatype="text"/>
4707                         <field name="description" reporter:datatype="text"/>
4708                         <field name="owner" reporter:datatype="link"/>
4709                         <field name="pub" reporter:datatype="bool"/>
4710                         <field name="create_time" reporter:datatype="timestamp" />
4711                 </fields>
4712                 <links>
4713                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4714                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
4715                 </links>
4716         </class>
4717         <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">
4718                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
4719                         <field name="id" reporter:datatype="id" />
4720                         <field name="bucket" reporter:datatype="link"/>
4721                         <field name="note" reporter:datatype="text" />
4722                 </fields>
4723                 <links>
4724                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4725                 </links>
4726         </class>
4727         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
4728                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
4729                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4730                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4731                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4732                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4733                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4734                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4735                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4736                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
4737                 </fields>
4738                 <links>
4739                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4740                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
4741                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
4742                 </links>
4743         </class>
4744         <class id="ac" controller="open-ils.cstore" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
4745                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
4746                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
4747                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4748                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
4749                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4750                 </fields>
4751                 <links>
4752                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4753                 </links>
4754         </class>
4755     <class id="actscsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::stat_cat_sip_fields" oils_persist:tablename="actor.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
4756         <fields oils_persist:primary="field">
4757             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
4758             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
4759             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
4760         </fields>
4761         <links/>
4762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4763             <actions>
4764                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
4765                 <retrieve />
4766                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
4767                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
4768             </actions>
4769         </permacrud>
4770     </class>
4771         <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">
4772                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
4773                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4774                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4775                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
4776                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
4777                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4778                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
4779                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
4780                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
4781                 </fields>
4782                 <links>
4783                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4784                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
4785                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
4786                 </links>
4787         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4788             <actions>
4789                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
4790                 <retrieve />
4791                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
4792                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
4793             </actions>
4794         </permacrud>
4795         </class>
4796         <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">
4797                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
4798                         <field name="field" reporter:datatype="link"/>
4799                         <field name="id" reporter:datatype="id" />
4800                         <field name="source" reporter:datatype="link"/>
4801                         <field name="value"  reporter:datatype="text"/>
4802                 </fields>
4803                 <links>
4804                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
4805                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4806                 </links>
4807         </class>
4808         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
4809                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
4810                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4811                         <field name="btype" reporter:datatype="text"/>
4812                         <field name="id" reporter:datatype="id" />
4813                         <field name="name"  reporter:datatype="text"/>
4814                         <field name="description" reporter:datatype="text"/>
4815                         <field name="owner" reporter:datatype="link"/>
4816                         <field name="pub" reporter:datatype="bool"/>
4817                         <field name="create_time" reporter:datatype="timestamp" />
4818                 </fields>
4819                 <links>
4820                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4821                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
4822                 </links>
4823         </class>
4824         <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">
4825                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
4826                         <field name="id" reporter:datatype="id" />
4827                         <field name="bucket" reporter:datatype="link"/>
4828                         <field name="note" reporter:datatype="text" />
4829                 </fields>
4830                 <links>
4831                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
4832                 </links>
4833         </class>
4834         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
4835                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
4836                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
4837                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
4838                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
4839                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
4840                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
4841                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
4842                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
4843                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
4844                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
4845                 </fields>
4846                 <links>
4847                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
4848                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
4849                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
4850                 </links>
4851         </class>
4852         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
4853                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
4854                         <field name="id" reporter:datatype="id" />
4855                         <field name="ind1" />
4856                         <field name="ind2" />
4857                         <field name="record" />
4858                         <field name="subfield" />
4859                         <field name="tag" />
4860                         <field name="value" />
4861                 </fields>
4862                 <links>
4863                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
4864                 </links>
4865         </class>
4866         <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">
4867                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
4868                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
4869                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4870                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
4871                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4872                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
4873                 </fields>
4874                 <links>
4875                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4876                 </links>
4877         </class>
4878         <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" oils_persist:field_safe="true">
4879                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
4880                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
4881                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
4882                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
4883                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
4884                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4885                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4886                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
4887                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
4888                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
4889                 </fields>
4890                 <links>
4891                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
4892                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
4893                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
4894                 </links>
4895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4896             <actions>
4897                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
4898                 <retrieve/>
4899                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
4900                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
4901             </actions>
4902         </permacrud>
4903         </class>
4904         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
4905                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
4906                         <field name="create_date" reporter:datatype="timestamp"/>
4907                         <field name="creator" reporter:datatype="link"/>
4908                         <field name="edit_date" reporter:datatype="timestamp"/>
4909                         <field name="editor" reporter:datatype="link"/>
4910                         <field name="id" reporter:datatype="id" />
4911                         <field name="pub" reporter:datatype="bool"/>
4912                         <field name="record" reporter:datatype="link"/>
4913                         <field name="value"  reporter:datatype="text"/>
4914                 </fields>
4915                 <links>
4916                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4917                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4918                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4919                 </links>
4920         </class>
4921         <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">
4922                 <fields oils_persist:primary="usr" oils_persist:sequence="">
4923                         <field name="balance_owed" reporter:datatype="money" />
4924                         <field name="total_owed" reporter:datatype="money" />
4925                         <field name="total_paid" reporter:datatype="money" />
4926                         <field name="usr" reporter:datatype="link"/>
4927                 </fields>
4928                 <links>
4929                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4930                 </links>
4931         </class>
4932         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
4933                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4934                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
4935                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4936                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
4937                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4938                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
4939                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
4940                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4941                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4942                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4943                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4944                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4945                 </fields>
4946                 <links>
4947                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4948                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4949                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4950                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4951                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
4952                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4953                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4954                 </links>
4955         </class>
4956         <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">
4957                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
4958                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
4959                         <field name="quality" reporter:datatype="int" />
4960                         <field name="source" reporter:datatype="text"/>
4961                         <field name="transcendant" reporter:datatype="bool"/>
4962                         <field name="can_have_copies" reporter:datatype="bool"/>
4963                 </fields>
4964                 <links/>
4965         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4966             <actions>
4967                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
4968                 <retrieve/>
4969                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
4970                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
4971             </actions>
4972         </permacrud>
4973         </class>
4974         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
4975                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4976                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4977                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4978                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4979                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4980                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4981                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
4982                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
4983                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4984                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4985                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4986                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4987                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4988                 </fields>
4989                 <links>
4990                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
4991                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
4992                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4993                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4994                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4995                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4996                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4997                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4998                 </links>
4999         </class>
5000         <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">
5001                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5002                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5003                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5004                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5005                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5006                 </fields>
5007                 <links>
5008                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5009                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5010                 </links>
5011         </class>
5012         <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">
5013                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5014                         <field name="bucket" reporter:datatype="link"/>
5015                         <field name="id" reporter:datatype="id" />
5016                         <field name="target_user" reporter:datatype="link"/>
5017                         <field name="create_time" reporter:datatype="timestamp" />
5018                         <field name="pos" reporter:datatype="int" />
5019                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5020                 </fields>
5021                 <links>
5022                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5023                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5024             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5025                 </links>
5026         </class>
5027         <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">
5028                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5029                         <field name="id" reporter:datatype="id" />
5030                         <field name="item" reporter:datatype="link"/>
5031                         <field name="note" reporter:datatype="text" />
5032                 </fields>
5033                 <links>
5034                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5035                 </links>
5036         </class>
5037         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5038                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5039                         <field name="balance_owed" reporter:datatype="money" />
5040                         <field name="total_owed" reporter:datatype="money" />
5041                         <field name="total_paid" reporter:datatype="money" />
5042                         <field name="usr" reporter:datatype="link"/>
5043                 </fields>
5044                 <links>
5045                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5046                 </links>
5047         </class>
5048         <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">
5049                 <fields oils_persist:primary="code" oils_persist:sequence="">
5050                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5051                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5052                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5053                 </fields>
5054                 <links/>
5055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5056             <actions>
5057                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5058                 <retrieve/>
5059                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5060                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5061             </actions>
5062         </permacrud>
5063         </class>
5064         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5065                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5066                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5067                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5068                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5069                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5070                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5071                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5072                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5073                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5074                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5075                 </fields>
5076                 <links>
5077                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5078                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5079                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5080                 </links>
5081         </class>
5082         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5083                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5084                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5085                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5086                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5087                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5088                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5089                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5090                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5091                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5092                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5093                 </fields>
5094                 <links>
5095                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5096                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5097                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5098                 </links>
5099         </class>
5100         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5101                 <fields oils_persist:primary="id" oils_persist:sequence="">
5102                         <field name="checkin_lib" reporter:datatype="link"/>
5103                         <field name="checkin_staff" reporter:datatype="link"/>
5104                         <field name="checkin_time" reporter:datatype="timestamp"/>
5105                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5106                         <field name="circ_staff" reporter:datatype="link"/>
5107                         <field name="desk_renewal" reporter:datatype="bool"/>
5108                         <field name="due_date" reporter:datatype="timestamp"/>
5109                         <field name="duration" reporter:datatype="interval"/>
5110                         <field name="duration_rule" reporter:datatype="link"/>
5111                         <field name="fine_interval" reporter:datatype="interval"/>
5112                         <field name="id" reporter:datatype="id" />
5113                         <field name="max_fine" reporter:datatype="money" />
5114                         <field name="max_fine_rule" reporter:datatype="link"/>
5115                         <field name="opac_renewal" reporter:datatype="bool"/>
5116                         <field name="phone_renewal" reporter:datatype="bool"/>
5117                         <field name="recurring_fine" reporter:datatype="money" />
5118                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5119                         <field name="renewal_remaining" reporter:datatype="int" />
5120             <field name="grace_period" reporter:datatype="interval" />
5121                         <field name="stop_fines" reporter:datatype="text"/>
5122                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5123                         <field name="target_copy" reporter:datatype="link"/>
5124                         <field name="usr" reporter:datatype="link"/>
5125                         <field name="xact_finish" reporter:datatype="timestamp" />
5126                         <field name="xact_start" reporter:datatype="timestamp" />
5127                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5128                 </fields>
5129                 <links>
5130                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5131                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5132                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5133                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5134                 </links>
5135         </class>
5136         <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">
5137                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5138                         <field name="field" reporter:datatype="link"/>
5139                         <field name="id" reporter:datatype="id" />
5140                         <field name="source" reporter:datatype="link"/>
5141                         <field name="value" reporter:datatype="text"/>
5142                 </fields>
5143                 <links>
5144                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5145                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5146                 </links>
5147         </class>
5148         <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">
5149                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5150                         <field name="high" reporter:datatype="money" />
5151                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5152                         <field name="low" reporter:datatype="money" />
5153                         <field name="name" reporter:datatype="text"/>
5154                         <field name="normal" reporter:datatype="money" />
5155                         <field name="recurrence_interval" reporter:datatype="interval"/>
5156             <field name="grace_period" reporter:datatype="interval" />
5157                 </fields>
5158                 <links/>
5159         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5160             <actions>
5161                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5162                 <retrieve/>
5163                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5164                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5165             </actions>
5166         </permacrud>
5167         </class>
5168         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5169                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5170                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5171                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5172                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5173                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5174                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5175                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5176                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5177                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5178                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5179                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5180                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5181                 </fields>
5182                 <links>
5183                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5184                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5185                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5186                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5187                 </links>
5188         </class>
5189         <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">
5190                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5191                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5192                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5193                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5194                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5195                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5196                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5197                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5198                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5199                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5200                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5201                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5202                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5203                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5204                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5205                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5206                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5207                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5208                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5209                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5210                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5211                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5212                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5213                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5214                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5215                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5216                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5217                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5218                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5219                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5220                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5221                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5222                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5223                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5224                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5225                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5226                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5227                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5228                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5229                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5230                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5231                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5232                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5233                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5234                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5235                 </fields>
5236                 <links>
5237                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5238                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5239                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5240                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5241                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5242                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5243                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5244                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5245                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5246                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5247                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5248                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5249                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5250                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5251                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5252                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5253                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5254                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5255                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5256                 </links>
5257         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5258             <actions>
5259                 <create permission="CREATE_COPY">
5260                     <context link="call_number" field="owning_lib"/>
5261                 </create>
5262                 <retrieve/>
5263                 <update permission="UPDATE_COPY">
5264                     <context link="call_number" field="owning_lib"/>
5265                 </update>
5266                 <delete permission="DELETE_COPY">
5267                     <context link="call_number" field="owning_lib"/>
5268                 </delete>
5269             </actions>
5270         </permacrud>
5271         </class>
5272
5273         <class id="act" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_template" oils_persist:tablename="asset.copy_template" reporter:label="Asset Copy Template">
5274                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
5275                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
5276                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
5277                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5278                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5279                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5280                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5281                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5282                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
5283                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
5284                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
5285                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5286                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5287                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
5288                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
5289                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
5290                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
5291                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
5292                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
5293                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
5294                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
5295                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
5296                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5297                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
5298                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
5299                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
5300                 </fields>
5301                 <links>
5302                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5303                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5304                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5305                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5306                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5307                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5308                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5309                 </links>
5310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5311                         <actions>
5312                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5313                                 <retrieve />
5314                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5315                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
5316                         </actions>
5317                 </permacrud>
5318         </class>
5319
5320         <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" oils_persist:field_safe="true">
5321                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
5322                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
5323                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5324                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5325                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
5326                 </fields>
5327                 <links/>
5328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5329             <actions>
5330                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5331                 <retrieve/>
5332                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5333                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
5334             </actions>
5335         </permacrud>
5336         </class>
5337         <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">
5338                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
5339                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
5340                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5341                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
5342                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
5343                 </fields>
5344                 <links/>
5345         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5346             <actions>
5347                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5348                 <retrieve/>
5349                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5350                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
5351             </actions>
5352         </permacrud>
5353         </class>
5354         <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">
5355                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
5356                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5357                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5358                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5359                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5360                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
5361                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
5362                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
5363                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
5364                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
5365                 </fields>
5366                 <links>
5367                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
5368                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
5369                 </links>
5370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5371             <actions>
5372                 <create permission="CREATE_PERM" global_required="true"/>
5373                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
5374                 <update permission="UPDATE_PERM" global_required="true"/>
5375                 <delete permission="DELETE_PERM" global_required="true"/>
5376             </actions>
5377         </permacrud>
5378         </class>
5379         <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">
5380                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
5381                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5382                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
5383                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
5384                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
5385                 </fields>
5386                 <links>
5387                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
5388                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
5389                 </links>
5390         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5391             <actions>
5392                 <create permission="ADMIN_SURVEY">
5393                     <context link="question" jump="survey" field="owner"/>
5394                 </create>
5395                 <retrieve/>
5396                 <update permission="ADMIN_SURVEY">
5397                     <context link="question" jump="survey" field="owner"/>
5398                 </update>
5399                 <delete permission="ADMIN_SURVEY">
5400                     <context link="question" jump="survey" field="owner"/>
5401                 </delete>
5402             </actions>
5403         </permacrud>
5404         </class>
5405         <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">
5406                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
5407                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5408                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
5409                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
5410                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
5411                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
5412                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
5413                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
5414                 </fields>
5415                 <links>
5416                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
5417                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
5418                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
5419                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5420                 </links>
5421         </class>
5422         <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">
5423                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5424                         <field name="balance_owed" reporter:datatype="money" />
5425                         <field name="total_owed" reporter:datatype="money" />
5426                         <field name="total_paid" reporter:datatype="money" />
5427                         <field name="usr" reporter:datatype="link"/>
5428                 </fields>
5429                 <links>
5430                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5431                 </links>
5432         </class>
5433         <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">
5434                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
5435                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
5436                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
5437                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
5438                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
5439                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
5440                 </fields>
5441                 <links>
5442                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5443                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5444                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5445                 </links>
5446         </class>
5447         <class id="mife" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::identifier_field_entry" oils_persist:tablename="metabib.identifier_field_entry" reporter:label="Identifier Field Entry">
5448                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
5449                         <field name="field" reporter:datatype="link"/>
5450                         <field name="id" reporter:datatype="id" />
5451                         <field name="source" reporter:datatype="link"/>
5452                         <field name="value" reporter:datatype="text"/>
5453                 </fields>
5454                 <links>
5455                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5456                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5457                 </links>
5458         </class>
5459         <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">
5460                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
5461                         <field name="field" reporter:datatype="link"/>
5462                         <field name="id" reporter:datatype="id" />
5463                         <field name="source" reporter:datatype="link"/>
5464                         <field name="value" reporter:datatype="text"/>
5465                 </fields>
5466                 <links>
5467                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5468                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5469                 </links>
5470         </class>
5471         <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">
5472                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
5473                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5474                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
5475                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
5476                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
5477                 </fields>
5478                 <links>
5479                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
5480                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5481                 </links>
5482         </class>
5483         <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">
5484                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
5485                         <field name="depth" reporter:datatype="int" />
5486                         <field name="grantable" reporter:datatype="bool"/>
5487                         <field name="grp" reporter:datatype="link"/>
5488                         <field name="id" reporter:datatype="id" />
5489                         <field name="perm" reporter:datatype="link"/>
5490                 </fields>
5491                 <links>
5492                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5493                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5494                 </links>
5495         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5496             <actions>
5497                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
5498                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
5499                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
5500                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
5501             </actions>
5502         </permacrud>
5503         </class>
5504         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
5505                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
5506                         <field name="items" oils_persist:virtual="true" />
5507                         <field name="btype" reporter:datatype="text"/>
5508                         <field name="id" reporter:datatype="id" />
5509                         <field name="name" reporter:datatype="text"/>
5510                         <field name="description" reporter:datatype="text"/>
5511                         <field name="owner" reporter:datatype="link"/>
5512                         <field name="pub" reporter:datatype="bool"/>
5513                         <field name="create_time" reporter:datatype="timestamp" />
5514                 </fields>
5515                 <links>
5516                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5517                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
5518                 </links>
5519         </class>
5520         <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">
5521                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
5522                         <field name="id" reporter:datatype="id" />
5523                         <field name="bucket" reporter:datatype="link"/>
5524                         <field name="note" reporter:datatype="text" />
5525                 </fields>
5526                 <links>
5527                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
5528                 </links>
5529         </class>
5530         <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">
5531                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
5532                         <field name="id" reporter:datatype="int" />
5533                         <field name="usr" reporter:datatype="link"/>
5534                         <field name="work_ou" reporter:datatype="link"/>
5535                 </fields>
5536                 <links>
5537                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5538                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
5539                 </links>
5540         </class>
5541         <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">
5542                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
5543                         <field name="depth" reporter:datatype="int"/>
5544                         <field name="grantable" reporter:datatype="bool"/>
5545                         <field name="id" reporter:datatype="id" />
5546                         <field name="perm" reporter:datatype="link"/>
5547                         <field name="usr" reporter:datatype="link"/>
5548                 </fields>
5549                 <links>
5550                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5551                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5552                 </links>
5553         </class>
5554         <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">
5555                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
5556                         <field name="object_id" reporter:datatype="text"/>
5557                         <field name="grantable" reporter:datatype="bool"/>
5558                         <field name="id" reporter:datatype="id" />
5559                         <field name="perm" reporter:datatype="link"/>
5560                         <field name="usr" reporter:datatype="link"/>
5561                         <field name="object_type" reporter:datatype="text"/>
5562                 </fields>
5563                 <links>
5564                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5565                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
5566                 </links>
5567         </class>
5568         <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">
5569                 <fields oils_persist:primary="id" oils_persist:sequence="">
5570                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5571                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5572                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5573                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5574                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5575                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5576                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5577                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5578                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5579                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5580                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5581                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5582                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5583                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5584                 </fields>
5585                 <links>
5586                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5587                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5588                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5589                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5590                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5591                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5592                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5593                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5594                 </links>
5595         </class>
5596         <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">
5597                 <fields oils_persist:primary="id" oils_persist:sequence="">
5598                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5599                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5600                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5601                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5602                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5603                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5604                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5605                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5606                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5607                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5608                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5609                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5610                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5611                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5612                 </fields>
5613                 <links>
5614                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5615                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5616                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5617                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5618                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5619                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5620                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5621                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5622                 </links>
5623         </class>
5624         <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">
5625                 <fields oils_persist:primary="id" oils_persist:sequence="">
5626                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5627                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5628                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5629                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5630                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5631                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5632                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5633                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5634                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5635                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5636                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5637                 </fields>
5638                 <links>
5639                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
5640                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
5641                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
5642                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
5643                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5644                 </links>
5645         </class>
5646         <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">
5647                 <fields oils_persist:primary="id" oils_persist:sequence="">
5648                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5649                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5650                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5651                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
5652                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
5653                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
5654                         <field reporter:label="Accepting User" name="accepting_usr" />
5655                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
5656                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5657                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5658                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5659                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
5660                 </fields>
5661                 <links>
5662                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
5663                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
5664                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
5665                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5666                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5667                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5668                 </links>
5669         </class>
5670         <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">
5671                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
5672                         <field name="bucket" reporter:datatype="link"/>
5673                         <field name="id" reporter:datatype="id" />
5674                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
5675                         <field name="create_time" reporter:datatype="timestamp" />
5676                         <field name="pos" reporter:datatype="int" />
5677                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5678                 </fields>
5679                 <links>
5680                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
5681                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
5682             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
5683                 </links>
5684         </class>
5685         <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">
5686                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
5687                         <field name="id" reporter:datatype="id" />
5688                         <field name="item" reporter:datatype="link"/>
5689                         <field name="note" reporter:datatype="text" />
5690                 </fields>
5691                 <links>
5692                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
5693                 </links>
5694         </class>
5695         <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">
5696                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
5697                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
5698                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5699                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5700                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5701                 </fields>
5702                 <links>
5703                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5704                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5705                 </links>
5706         </class>
5707     <class id="ascsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_sip_fields" oils_persist:tablename="asset.stat_cat_sip_fields" reporter:label="SIP Statistical Category Field Identifier">
5708         <fields oils_persist:primary="field">
5709             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5710             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5711             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5712         </fields>
5713         <links/>
5714         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5715             <actions>
5716                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
5717                 <retrieve />
5718                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
5719                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
5720             </actions>
5721         </permacrud>
5722     </class>
5723         <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">
5724                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
5725                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
5726                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5727                 </fields>
5728                 <links/>
5729         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5730             <actions>
5731                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5732                 <retrieve/>
5733                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5734                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
5735             </actions>
5736         </permacrud>
5737         </class>
5738
5739
5740         <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">
5741                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5742                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5743                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5744                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5745                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
5746                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5747                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5748                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5749                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5750                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5751                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5752                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5753                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5754                 </fields>
5755                 <links>
5756                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5757                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
5758                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5759                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5760                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5761                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5762                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
5763                 </links>
5764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5765             <actions>
5766                 <create permission="TRANSIT_COPY">
5767                     <context link="target_copy" field="owner"/>
5768                 </create>
5769                 <retrieve/>
5770                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5771                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5772             </actions>
5773         </permacrud>
5774         </class>
5775         <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">
5776                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
5777                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
5778                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
5779                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
5780                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
5781                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
5782                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
5783                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
5784                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
5785                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
5786                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
5787                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
5788                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
5789                 </fields>
5790                 <links>
5791                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
5792                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
5793                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
5794                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
5795                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
5796                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
5797                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5798                 </links>
5799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5800             <actions>
5801                 <create permission="TRANSIT_COPY" context_field="owner">
5802                     <context link="target_copy" field="circ_lib"/>
5803                 </create>
5804                 <retrieve/>
5805                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
5806                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
5807             </actions>
5808         </permacrud>
5809         </class>
5810         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
5811                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
5812                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5813                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
5814                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
5815                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
5816                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5817                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
5818                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
5819                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
5820                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5821                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
5822                 </fields>
5823                 <links>
5824                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5825                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
5826                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
5827                 </links>
5828         </class>
5829         <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">
5830                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
5831                         <field name="grp" />
5832                         <field name="id" reporter:datatype="id" />
5833                         <field name="usr" />
5834                 </fields>
5835                 <links>
5836                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
5837                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5838                 </links>
5839         </class>
5840         <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">
5841                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
5842                         <field name="id" reporter:datatype="id" />
5843                         <field name="fq_field" reporter:datatype="text"/>
5844                         <field name="identity_value" reporter:datatype="text"/>
5845                         <field name="translation" reporter:datatype="text"/>
5846                         <field name="string" reporter:datatype="text"/>
5847                 </fields>
5848                 <links>
5849                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
5850                 </links>
5851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5852             <actions>
5853                 <create permission="CREATE_TRANSLATION" global_required="true"/>
5854                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
5855                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
5856                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
5857             </actions>
5858         </permacrud>
5859         </class>
5860         <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">
5861                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
5862                         <field name="id" reporter:datatype="id" />
5863                         <field name="fm_class" reporter:datatype="text"/>
5864                         <field name="field" reporter:datatype="text"/>
5865                         <field name="owner" reporter:datatype="org_unit"/>
5866                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
5867                 </fields>
5868                 <links>
5869                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5870                 </links>
5871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5872             <actions>
5873                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5874                 <retrieve/>
5875                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5876                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
5877             </actions>
5878         </permacrud>
5879         </class>
5880         <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">
5881                 <fields oils_persist:primary="code">
5882                         <field name="code" reporter:datatype="id" />
5883                         <field name="marc_code" reporter:datatype="text"/>
5884                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5885                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5886                 </fields>
5887                 <links/>
5888         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5889             <actions>
5890                 <create permission="CREATE_LOCALE" global_required="true"/>
5891                 <retrieve/>
5892                 <update permission="UPDATE_LOCALE" global_required="true"/>
5893                 <delete permission="DELETE_LOCALE" global_required="true"/>
5894             </actions>
5895         </permacrud>
5896         </class>
5897         <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">
5898                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
5899                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
5900                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
5901                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
5902             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
5903                 </fields>
5904                 <links>
5905                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5906                 </links>
5907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5908             <actions>
5909                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
5910                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
5911                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
5912                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
5913             </actions>
5914         </permacrud>
5915         </class>
5916
5917         <class id="aurt" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_type" oils_persist:tablename="acq.user_request_type" reporter:label="User Purchase Request Type">
5918                 <fields oils_persist:primary="id">
5919                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5920                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5921                 </fields>
5922                 <links/>
5923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5924             <actions>
5925                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5926                 <retrieve/>
5927                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5928                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
5929             </actions>
5930         </permacrud>
5931         </class>
5932
5933         <class id="aur" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request" oils_persist:tablename="acq.user_request" reporter:label="User Purchase Request">
5934                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
5935                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
5936                         <field reporter:label="User" name="usr" reporter:datatype="link" />
5937                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
5938                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
5939                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
5940                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
5941                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
5942                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
5943                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
5944                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
5945                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
5946                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
5947                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
5948                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
5949                         <field reporter:label="Title" name="title" reporter:datatype="text" />
5950                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
5951                         <field reporter:label="Author" name="author" reporter:datatype="text" />
5952                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
5953                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
5954                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
5955                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
5956                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
5957                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
5958                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
5959                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
5960                 </fields>
5961                 <links>
5962                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5963                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5964                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
5965                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
5966                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
5967                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
5968                 </links>
5969         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5970             <actions>
5971                 <create permission="user_request.create">
5972                     <context link="usr" field="home_ou"/>
5973                                 </create>
5974                 <retrieve permission="user_request.view">
5975                     <context link="usr" field="home_ou"/>
5976                                 </retrieve>
5977                 <update permission="user_request.update">
5978                     <context link="usr" field="home_ou"/>
5979                                 </update>
5980                 <delete permission="user_request.delete">
5981                     <context link="usr" field="home_ou"/>
5982                                 </delete>
5983             </actions>
5984         </permacrud>
5985         </class>
5986
5987         <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">
5988                 <fields oils_persist:primary="code">
5989                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
5990                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
5991                 </fields>
5992                 <links/>
5993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5994             <actions>
5995                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5996                 <retrieve/>
5997                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5998                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
5999             </actions>
6000         </permacrud>
6001         </class>
6002
6003         <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">
6004                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6005                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6006                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6007                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6008                         <field reporter:label="Ratio" name="ratio" />
6009                 </fields>
6010                 <links>
6011                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6012                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6013                 </links>
6014                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6015                         <actions>
6016                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6017                                 <retrieve/>
6018                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6019                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6020                         </actions>
6021                 </permacrud>
6022         </class>
6023
6024         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6025                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6026                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6027                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6028                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6029                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6030                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6031                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6032                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6033                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6034                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6035                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6036                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6037                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6038                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6039                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6040                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6041                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6042                 </fields>
6043                 <links>
6044                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6045                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6046             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6047             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6048             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6049                 </links>
6050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6051             <actions>
6052                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6053                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6054                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6055                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6056             </actions>
6057         </permacrud>
6058         </class>
6059
6060         <class id="acqpron" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::provider_note" oils_persist:tablename="acq.provider_note" reporter:label="Provider Note">
6061                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6062                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6063                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6064                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6065                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6066                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6067                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6068                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6069                 </fields>
6070                 <links>
6071                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6072                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6073                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6074                 </links>
6075         </class>
6076
6077         <class id="acqipm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_payment_method" oils_persist:tablename="acq.invoice_payment_method" reporter:label="Invoice Payment Method">
6078                 <fields oils_persist:primary="code">
6079                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6080                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6081                 </fields>
6082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6083             <actions>
6084                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6085                 <retrieve/>
6086                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6087                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6088             </actions>
6089                 </permacrud>
6090         </class>
6091
6092         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6093                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6094                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6095                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6096                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6097                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6098                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6099                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6100                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6101                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6102                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6103                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6104                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6105                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6106                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6107                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6108                 </fields>
6109                 <links>
6110                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6111                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6112                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6113                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6114                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6115                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6116                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6117                 </links>
6118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6119             <actions>
6120                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6121                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6122                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6123                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6124             </actions>
6125         </permacrud>
6126         </class>
6127
6128         <class id="acqie" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_entry" oils_persist:tablename="acq.invoice_entry" reporter:label="Invoice Entry">
6129                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6130                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6131                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6132                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6133                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6134                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6135                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6136                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6137                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6138                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6139                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6140                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6141                 </fields>
6142                 <links>
6143                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6144                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6145                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6146                 </links>
6147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6148             <actions>
6149                 <create   permission="ADMIN_INVOICE">
6150                                         <context link="invoice" field="receiver"/>
6151                                 </create>
6152                 <retrieve permission="ADMIN_INVOICE">
6153                                         <context link="invoice" field="receiver"/>
6154                                 </retrieve>
6155                 <update   permission="ADMIN_INVOICE">
6156                                         <context link="invoice" field="receiver"/>
6157                                 </update>
6158                                 <delete   permission="ADMIN_INVOICE">
6159                                         <context link="invoice" field="receiver"/>
6160                                 </delete>
6161             </actions>
6162         </permacrud>
6163         </class>
6164
6165         <class id="acqii" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice_item" oils_persist:tablename="acq.invoice_item" reporter:label="Non-bibliographic Invoice Item">
6166                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6167                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6168                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6169                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6170                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6171                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6172                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6173                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6174                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6175                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6176                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6177                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6178                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6179                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6180                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6181                 </fields>
6182                 <links>
6183                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6184                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6185                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6186                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6187                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6188                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6189                 </links>
6190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6191             <actions>
6192                 <create   permission="ADMIN_INVOICE">
6193                                         <context link="invoice" field="receiver"/>
6194                                 </create>
6195                 <retrieve permission="ADMIN_INVOICE">
6196                                         <context link="invoice" field="receiver"/>
6197                                 </retrieve>
6198                 <update   permission="ADMIN_INVOICE">
6199                                         <context link="invoice" field="receiver"/>
6200                                 </update>
6201                                 <delete   permission="ADMIN_INVOICE">
6202                                         <context link="invoice" field="receiver"/>
6203                                 </delete>
6204             </actions>
6205         </permacrud>
6206         </class>
6207
6208         <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">
6209                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6210                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6211                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6212                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6213                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6214                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6215                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6216                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6217                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6218                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6219                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6220                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6221                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6222                 </fields>
6223                 <links>
6224                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6225                 </links>
6226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6227             <actions>
6228                 <create permission="ADMIN_PROVIDER">
6229                     <context link="provider" field="owner"/>
6230                 </create>
6231                 <retrieve permission="ADMIN_PROVIDER">
6232                     <context link="provider" field="owner"/>
6233                 </retrieve>
6234                 <update permission="ADMIN_PROVIDER">
6235                     <context link="provider" field="owner"/>
6236                 </update>
6237                 <delete permission="ADMIN_PROVIDER">
6238                     <context link="provider" field="owner"/>
6239                 </delete>
6240             </actions>
6241         </permacrud>
6242         </class>
6243
6244         <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">
6245                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6246                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6247                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6248                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6249                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6250                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6251                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6252         </fields>
6253                 <links>
6254                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6255                 </links>
6256         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6257             <actions>
6258                 <create permission="ADMIN_PROVIDER">
6259                     <context link="provider" field="owner"/>
6260                 </create>
6261                 <retrieve permission="ADMIN_PROVIDER">
6262                     <context link="provider" field="owner"/>
6263                 </retrieve>
6264                 <update permission="ADMIN_PROVIDER">
6265                     <context link="provider" field="owner"/>
6266                 </update>
6267                 <delete permission="ADMIN_PROVIDER">
6268                     <context link="provider" field="owner"/>
6269                 </delete>
6270             </actions>
6271         </permacrud>
6272     </class>
6273         <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">
6274                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
6275                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
6276                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6277                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6278                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6279                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
6280                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
6281                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6282                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
6283                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
6284                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
6285                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
6286                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6287                 </fields>
6288                 <links>
6289                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
6290                 </links>
6291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6292             <actions>
6293                 <create permission="ADMIN_PROVIDER">
6294                     <context link="contact" jump='provider' field="owner"/>
6295                 </create>
6296                 <retrieve permission="ADMIN_PROVIDER">
6297                     <context link="contact" jump='provider' field="owner"/>
6298                 </retrieve>
6299                 <update permission="ADMIN_PROVIDER">
6300                     <context link="contact" jump='provider' field="owner"/>
6301                 </update>
6302                 <delete permission="ADMIN_PROVIDER">
6303                     <context link="contact" jump='provider' field="owner"/>
6304                 </delete>
6305             </actions>
6306         </permacrud>
6307         </class>
6308
6309         <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">
6310                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
6311                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
6312                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
6313                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
6314                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
6315                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
6316                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
6317                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
6318                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6319                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
6320                 </fields>
6321                 <links>
6322                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
6323                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
6324                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
6325                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
6326                 </links>
6327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6328                 </permacrud>
6329         </class>
6330
6331         <class id="acqfc" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
6332                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
6333                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6334                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
6335                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
6336                 </fields>
6337                 <links>
6338             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
6339                 </links>
6340                 <!--
6341                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6342                         But here's what it should look like if we ever do use pcrud.
6343                 -->
6344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6345                         <actions>
6346                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6347                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6348                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6349                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6350                         </actions>
6351                 </permacrud>
6352         </class>
6353
6354         <class id="acqfy" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
6355                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
6356                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
6357                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
6358                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
6359                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
6360                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
6361                 </fields>
6362                 <links>
6363                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6364                 </links>
6365                 <!--
6366                         For now, we don't have pcrud as one of the controllers, so the permacrud section is moot.
6367                         But here's what it should look like if we ever do use pcrud.
6368                 -->
6369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6370                         <actions>
6371                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6372                                 <retrieve permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6373                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6374                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
6375                         </actions>
6376                 </permacrud>
6377         </class>
6378
6379         <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">
6380                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
6381                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6382                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6383                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6384                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6385                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6386                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6387                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6388                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
6389                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
6390                 </fields>
6391                 <links>
6392                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6393                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6394             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
6395             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
6396                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
6397                 </links>
6398         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6399             <actions>
6400                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6401                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
6402                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6403                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
6404             </actions>
6405         </permacrud>
6406         </class>
6407
6408         <class id="acqfscred" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::funding_source_credit" oils_persist:tablename="acq.funding_source_credit" reporter:label="Credit to Funding Source">
6409                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
6410                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
6411                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
6412                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6413                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6414                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
6415                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
6416                 </fields>
6417                 <links>
6418                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6419                 </links>
6420                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6421                         <actions>
6422                                 <create permission="ADMIN_FUNDING_SOURCE">
6423                     <context link="funding_source" field="owner"/>
6424                 </create>
6425                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
6426                     <context link="funding_source" field="owner"/>
6427                 </retrieve>
6428                                 <update permission="ADMIN_FUNDING_SOURCE">
6429                     <context link="funding_source" field="owner"/>
6430                 </update>
6431                                 <delete permission="ADMIN_FUNDING_SOURCE">
6432                     <context link="funding_source" field="owner"/>
6433                 </delete>
6434                         </actions>
6435                 </permacrud>
6436         </class>
6437
6438         <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">
6439                 <fields oils_persist:primary="id">
6440                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
6441                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
6442                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
6443                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
6444                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
6445                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6446                 </fields>
6447                 <links>
6448                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6449                 </links>
6450                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6451                 </permacrud>
6452         </class>
6453
6454         <class id="acqfdeb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_debit" oils_persist:tablename="acq.fund_debit" reporter:label="Debit From Fund">
6455                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
6456                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
6457                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6458                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
6459                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
6460                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6461                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
6462                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
6463                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6464                 </fields>
6465                 <links>
6466                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6467                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6468                 </links>
6469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6470                         <actions>
6471                                 <create permission="ADMIN_ACQ_FUND">
6472                     <context link="fund" field="org"/>
6473                 </create>
6474                                 <retrieve permission="ADMIN_ACQ_FUND">
6475                     <context link="fund" field="org"/>
6476                 </retrieve>
6477                                 <update permission="ADMIN_ACQ_FUND">
6478                     <context link="fund" field="org"/>
6479                 </update>
6480                                 <delete permission="ADMIN_ACQ_FUND">
6481                     <context link="fund" field="org"/>
6482                 </delete>
6483                         </actions>
6484                 </permacrud>
6485         </class>
6486
6487         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
6488                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
6489                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6490                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6491                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6492                         <field reporter:label="Year" name="year" reporter:datatype="int" />
6493                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
6494                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6495                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
6496                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
6497                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6498                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
6499                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
6500                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
6501                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
6502                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
6503                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
6504                 </fields>
6505                 <links>
6506                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6507                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6508             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
6509             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
6510             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
6511                 </links>
6512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6513             <actions>
6514                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
6515                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
6516                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
6517                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
6518             </actions>
6519         </permacrud>
6520         </class>
6521
6522         <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">
6523                 <fields oils_persist:primary="fund">
6524                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6525                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6526                 </fields>
6527                 <links>
6528                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6529                 </links>
6530         </class>
6531
6532         <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">
6533                 <fields oils_persist:primary="fund">
6534                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6535                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
6536                 </fields>
6537                 <links>
6538                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6539                 </links>
6540         </class>
6541
6542         <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">
6543                 <fields oils_persist:primary="fund">
6544                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6545                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
6546                 </fields>
6547                 <links>
6548                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6549                 </links>
6550         </class>
6551
6552         <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">
6553                 <fields oils_persist:primary="fund">
6554                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6555                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6556                 </fields>
6557                 <links>
6558                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6559                 </links>
6560         </class>
6561
6562         <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">
6563                 <fields oils_persist:primary="fund">
6564                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6565                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
6566                 </fields>
6567                 <links>
6568                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6569                 </links>
6570         </class>
6571
6572    <class id="acqafat" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_allocation_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_allocation_total" reporter:label="All Fund Allocation Total">
6573         <fields oils_persist:primary="fund">
6574             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6575             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
6576         </fields>
6577         <links>
6578             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6579         </links>
6580     </class>
6581
6582    <class id="acqafet" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_encumbrance_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_encumbrance_total" reporter:label="All Fund Encumbrance Total">
6583         <fields oils_persist:primary="fund">
6584             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6585             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
6586         </fields>
6587         <links>
6588             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6589         </links>
6590     </class>
6591
6592    <class id="acqafst" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_total" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_total" reporter:label="All Fund Spent Total">
6593         <fields oils_persist:primary="fund">
6594             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6595             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
6596         </fields>
6597         <links>
6598             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6599         </links>
6600     </class>
6601
6602    <class id="acqafsb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_spent_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_spent_balance" reporter:label="All Fund Spent Balance">
6603         <fields oils_persist:primary="fund">
6604             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6605             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
6606         </fields>
6607         <links>
6608             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6609         </links>
6610     </class>
6611
6612    <class id="acqafcb" controller="open-ils.cstore open-ils.reporter-store" oils_obj:fieldmapper="acq::all_fund_combined_balance" oils_persist:readonly="true" oils_persist:tablename="acq.all_fund_combined_balance" reporter:label="All Fund Combined Total">
6613         <fields oils_persist:primary="fund">
6614             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6615             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
6616         </fields>
6617         <links>
6618             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6619         </links>
6620     </class>
6621
6622         <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">
6623                 <fields oils_persist:primary="funding_source">
6624                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6625                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
6626                 </fields>
6627                 <links>
6628                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6629                 </links>
6630         </class>
6631
6632         <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">
6633                 <fields oils_persist:primary="funding_source">
6634                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6635                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
6636                 </fields>
6637                 <links>
6638                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6639                 </links>
6640         </class>
6641
6642         <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">
6643                 <fields oils_persist:primary="funding_source">
6644                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6645                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
6646                 </fields>
6647                 <links>
6648                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6649                 </links>
6650         </class>
6651
6652         <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">
6653                 <fields oils_persist:primary="fund">
6654                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
6655                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
6656                 </fields>
6657                 <links>
6658                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6659                 </links>
6660         </class>
6661
6662         <class id="acqfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund_allocation" oils_persist:tablename="acq.fund_allocation" reporter:label="Fund Allocation">
6663                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
6664                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6665                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6666                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6667                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6668                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6669                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6670                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6671                 </fields>
6672                 <links>
6673                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6674                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6675                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6676                 </links>
6677                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6678                         <actions>
6679                                 <create permission="ADMIN_ACQ_FUND">
6680                     <context link="fund" field="org"/>
6681                 </create>
6682                                 <retrieve permission="ADMIN_ACQ_FUND">
6683                     <context link="fund" field="org"/>
6684                 </retrieve>
6685                                 <update permission="ADMIN_ACQ_FUND">
6686                     <context link="fund" field="org"/>
6687                 </update>
6688                                 <delete permission="ADMIN_ACQ_FUND">
6689                     <context link="fund" field="org"/>
6690                 </delete>
6691                         </actions>
6692                 </permacrud>
6693         </class>
6694
6695     <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">
6696         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
6697             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
6698             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
6699             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
6700             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
6701             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
6702             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
6703             <field reporter:label="Note" name="note" reporter:datatype="text" />
6704             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
6705         </fields>
6706         <links>
6707             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
6708             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
6709             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
6710         </links>
6711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6712                         <actions>
6713                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6714                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6715                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6716                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
6717                         </actions>
6718                 </permacrud>
6719     </class>
6720
6721         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
6722                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
6723                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
6724                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6725                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
6726                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6727                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6728                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6729                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
6730                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
6731                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6732                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6733                 </fields>
6734                 <links>
6735                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6736                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6737                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6738                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6739                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
6740                 </links>
6741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6742                         <actions>
6743                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
6744                         </actions>
6745                 </permacrud>
6746         </class>
6747
6748         <class id="acqcr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::cancel_reason" oils_persist:tablename="acq.cancel_reason" reporter:label="Cancel Reason">
6749                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
6750                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6751                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
6752                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
6753                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
6754                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
6755                 </fields>
6756                 <links>
6757                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6758                 </links>
6759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6760                         <actions>
6761                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6762                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
6763                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6764                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
6765                         </actions>
6766                 </permacrud>
6767         </class>
6768
6769         <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">
6770                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
6771                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
6772                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
6773                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6774                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6775                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6776                         <field reporter:label="State" name="state" reporter:datatype="text" />
6777                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
6778                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6779                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6780                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
6781                         <field reporter:label="Name" name="name" reporter:datatype="text" />
6782                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6783                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6784                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
6785                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6786                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
6787                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
6788                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
6789                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
6790                 </fields>
6791                 <links>
6792                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6793                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6794                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6795                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
6796                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6797                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
6798                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
6799                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
6800                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6801                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6802                 </links>
6803                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6804                         <actions>
6805                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6806                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6807                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6808                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
6809                         </actions>
6810                 </permacrud>
6811         </class>
6812
6813         <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">
6814                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
6815                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6816                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6817                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6818                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
6819                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
6820                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6821                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6822                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
6823                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6824                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6825                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6826                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6827                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
6828                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6829                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6830                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6831                 </fields>
6832                 <links>
6833                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
6834                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6835                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6836                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6837                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
6838                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6839                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6840                 </links>
6841                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6842             <actions>
6843                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
6844             </actions>
6845                 </permacrud>
6846         </class>
6847
6848         <class id="acqpon" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_note" oils_persist:tablename="acq.po_note" reporter:label="PO Note">
6849                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
6850                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6851                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6852                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6853                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6854                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6855                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6856                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
6857                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
6858                 </fields>
6859                 <links>
6860                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6861                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6862                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6863                 </links>
6864                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6865             <actions>
6866                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6867                     <context link="purchase_order" field="ordering_agency"/>
6868                 </retrieve>
6869                 <create permission="CREATE_PURCHASE_ORDER">
6870                     <context link="purchase_order" field="ordering_agency"/>
6871                 </create>
6872                 <update permission="CREATE_PURCHASE_ORDER">
6873                     <context link="purchase_order" field="ordering_agency"/>
6874                 </update>
6875                 <delete permission="CREATE_PURCHASE_ORDER">
6876                     <context link="purchase_order" field="ordering_agency"/>
6877                 </delete>
6878             </actions>
6879                 </permacrud>
6880         </class>
6881
6882         <class id="acqpoi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::po_item" oils_persist:tablename="acq.po_item" reporter:label="Purchase Order Item">
6883                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
6884                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6885                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6886                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6887                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
6888                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
6889                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
6890                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6891                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
6892                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
6893                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6894                 </fields>
6895                 <links>
6896                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6897                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6898                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6899                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6900                 </links>
6901                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6902             <actions>
6903                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
6904                     <context link="purchase_order" field="ordering_agency"/>
6905                 </retrieve>
6906                 <create permission="CREATE_PURCHASE_ORDER">
6907                     <context link="purchase_order" field="ordering_agency"/>
6908                 </create>
6909                 <update permission="CREATE_PURCHASE_ORDER">
6910                     <context link="purchase_order" field="ordering_agency"/>
6911                 </update>
6912                 <delete permission="CREATE_PURCHASE_ORDER">
6913                     <context link="purchase_order" field="ordering_agency"/>
6914                 </delete>
6915             </actions>
6916                 </permacrud>
6917         </class>
6918
6919         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
6920                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
6921                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
6922                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
6923                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
6924                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
6925                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6926                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6927                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6928                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
6929                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
6930                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
6931                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
6932                         <field reporter:label="State" name="state" reporter:datatype="text" />
6933                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6934                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6935                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
6936                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6937                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6938                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
6939                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
6940                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
6941                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
6942                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
6943                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
6944                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
6945                 </fields>
6946                 <links>
6947                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
6948                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6949                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6950                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6951                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6952                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
6953                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
6954                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
6955                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
6956                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
6957                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6958                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
6959                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
6960                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
6961                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
6962                 </links>
6963                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6964                         <actions>
6965                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
6966                                         <context link="purchase_order" field="ordering_agency"/>
6967                                         <context link="picklist" field="org_unit"/>
6968                                 </retrieve>
6969                         </actions>
6970                 </permacrud>
6971         </class>
6972
6973         <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">
6974                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
6975                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
6976                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
6977                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
6978                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
6979                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6980                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6981                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
6982                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6983                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6984                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
6985                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
6986                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
6987                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
6988                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
6989                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
6990                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
6991                         <field reporter:label="State" name="state" reporter:datatype="text"/>
6992                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
6993                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
6994                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
6995                 </fields>
6996                 <links>
6997                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
6998                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6999                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7000                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7001                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7002                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7003                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7004                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7005                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7006                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7007                 </links>
7008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7009                         <actions>
7010                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7011                                         <context link="purchase_order" field="ordering_agency"/>
7012                                         <context link="picklist" field="org_unit"/>
7013                                 </retrieve>
7014                         </actions>
7015                 </permacrud>
7016         </class>
7017
7018         <class id="acqliat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_alert_text" oils_persist:tablename="acq.lineitem_alert_text" reporter:label="Line Item Alert Text">
7019                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7020                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7021                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7022                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7023                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7024                 </fields>
7025                 <links>
7026                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7027                 </links>
7028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7029                         <actions>
7030                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7031                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7032                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7033                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7034                         </actions>
7035                 </permacrud>
7036         </class>
7037
7038         <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">
7039                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7040                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7041                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7042                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7043                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7044                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7045                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7046                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7047                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7048                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7049                 </fields>
7050                 <links>
7051                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7052                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7053                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7054                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7055                 </links>
7056         </class>
7057
7058         <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">
7059                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7060                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7061                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7062                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7063                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7064                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7065                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7066                 </fields>
7067                 <links>
7068                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7069                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7070                 </links>
7071         </class>
7072
7073         <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">
7074                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7075                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7076                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7077                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7078                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7079                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7080                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7081                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7082                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7083                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7084                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7085                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7086                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7087                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7088                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7089                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7090                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7091                 </fields>
7092                 <links>
7093                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7094                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7095                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7096                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7097                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7098                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7099                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7100                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7101                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7102                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7103                 </links>
7104         </class>
7105
7106         <class id="acqliad" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_attr_definition" oils_persist:tablename="acq.lineitem_attr_definition" reporter:label="Line Item Attribute Definition">
7107                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7108                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7109                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7110                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7111                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7112                 </fields>
7113                 <links/>
7114                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7115                         <actions>
7116                                 <retrieve />
7117                         </actions>
7118                 </permacrud>
7119         </class>
7120
7121         <class id="acqlimad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem_marc_attr_definition" oils_persist:tablename="acq.lineitem_marc_attr_definition" reporter:label="Line Item MARC Attribute Definition">
7122                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7123                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7124                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7125                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7126                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7127                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7128             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7129                 </fields>
7130                 <links/>
7131         <permacrud>
7132             <actions>
7133                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7134                 <retrieve />
7135                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7136                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7137             </actions>
7138         </permacrud>
7139         </class>
7140
7141         <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">
7142                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7143                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7144                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7145                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7146                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7147                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7148                 </fields>
7149                 <links/>
7150         </class>
7151         <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">
7152                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7153                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7154                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7155                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7156                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7157                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7158                 </fields>
7159                 <links>
7160                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7161                 </links>
7162         </class>
7163
7164         <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">
7165             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7166                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7167                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7168                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7169                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7170                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7171                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7172         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7173
7174             </fields>
7175             <links>
7176                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7177             </links>
7178             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7179                 <actions>
7180                     <create permission="ADMIN_PROVIDER">
7181                         <context link="provider" field="owner"/>
7182                     </create>
7183                     <retrieve permission="ADMIN_PROVIDER">
7184                         <context link="provider" field="owner"/>
7185                     </retrieve>
7186                     <update permission="ADMIN_PROVIDER">
7187                         <context link="provider" field="owner"/>
7188                     </update>
7189                     <delete permission="ADMIN_PROVIDER">
7190                         <context link="provider" field="owner"/>
7191                     </delete>
7192                 </actions>
7193             </permacrud>
7194         </class>
7195         
7196         <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">
7197             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
7198                 <field reporter:label="ID" name="id" reporter:datatype="id" />
7199                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7200                 <field reporter:label="Name" name="name" reporter:datatype="text" />
7201                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
7202             </fields>
7203             <links>
7204                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7205             </links>
7206             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7207                 <actions>
7208                     <create permission="ADMIN_PROVIDER">
7209                         <context link="provider" field="owner"/>
7210                     </create>
7211                     <retrieve permission="ADMIN_PROVIDER">
7212                         <context link="provider" field="owner"/>
7213                     </retrieve>
7214                     <update permission="ADMIN_PROVIDER">
7215                         <context link="provider" field="owner"/>
7216                     </update>
7217                     <delete permission="ADMIN_PROVIDER">
7218                         <context link="provider" field="owner"/>
7219                     </delete>
7220                 </actions>
7221             </permacrud>
7222         </class>
7223         
7224         <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">
7225             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7226                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7227                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7228                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7229                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7230                 </fields>
7231                 <links/>
7232         </class>
7233
7234         <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">
7235                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
7236                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
7237                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
7238                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
7239                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
7240                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
7241                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
7242                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
7243                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
7244                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
7245                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
7246                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
7247                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
7248                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
7249                 </fields>
7250                 <links>
7251                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7252                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7253                 </links>
7254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7255             <actions>
7256                 <create permission="ADMIN_PROVIDER">
7257                     <context link="provider" field="owner"/>
7258                 </create>
7259                 <retrieve permission="ADMIN_PROVIDER">
7260                     <context link="provider" field="owner"/>
7261                 </retrieve>
7262                 <update permission="ADMIN_PROVIDER">
7263                     <context link="provider" field="owner"/>
7264                 </update>
7265                 <delete permission="ADMIN_PROVIDER">
7266                     <context link="provider" field="owner"/>
7267                 </delete>
7268             </actions>
7269         </permacrud>
7270         </class>
7271
7272         <class id="acqedim" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::edi_message" oils_persist:tablename="acq.edi_message" reporter:label="EDI Message">
7273                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
7274                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
7275                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
7276                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
7277                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
7278                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
7279                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
7280                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
7281                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
7282                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
7283                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
7284                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
7285                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
7286                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
7287                 </fields>
7288                 <links>
7289                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
7290                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7291                 </links>
7292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7293             <actions>
7294                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7295                     <context link="account" jump="provider" field="owner"/>
7296                 </retrieve>
7297                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7298                     <context link="account" jump="provider" field="owner"/>
7299                 </update>
7300                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
7301                     <context link="account" jump="provider" field="owner"/>
7302                 </delete>
7303             </actions>
7304         </permacrud>
7305         </class>
7306
7307
7308         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
7309                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
7310                         <field name="id" reporter:datatype="id" />
7311                         <field name="parent" reporter:datatype="link"/>
7312                         <field name="owner" reporter:datatype="link"/>
7313                         <field name="create_time" reporter:datatype="timestamp"/>
7314                         <field name="name" reporter:datatype="text"/>
7315                         <field name="shared" reporter:datatype="bool"/>
7316                         <field name="share_with" reporter:datatype="link"/>
7317                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7318                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
7319                 </fields>
7320                 <links>
7321                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7322                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
7323                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
7324                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7325                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
7326                 </links>
7327         </class>
7328         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
7329                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
7330                         <field name="id" reporter:datatype="id" />
7331                         <field name="parent" reporter:datatype="link"/>
7332                         <field name="owner" reporter:datatype="link"/>
7333                         <field name="create_time" reporter:datatype="timestamp"/>
7334                         <field name="name" reporter:datatype="text"/>
7335                         <field name="shared" reporter:datatype="bool"/>
7336                         <field name="share_with" reporter:datatype="link"/>
7337                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7338                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
7339                 </fields>
7340                 <links>
7341                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7342                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
7343                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
7344                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7345                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
7346                 </links>
7347         </class>
7348         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
7349                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
7350                         <field name="id" reporter:datatype="id" />
7351                         <field name="parent" reporter:datatype="link"/>
7352                         <field name="owner" reporter:datatype="link"/>
7353                         <field name="create_time" reporter:datatype="timestamp"/>
7354                         <field name="name" reporter:datatype="text"/>
7355                         <field name="shared" reporter:datatype="bool"/>
7356                         <field name="share_with" reporter:datatype="link"/>
7357                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
7358                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7359                 </fields>
7360                 <links>
7361                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7362                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
7363                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
7364                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
7365                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
7366                 </links>
7367         </class>
7368         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
7369                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
7370                         <field name="id" reporter:datatype="id" />
7371                         <field name="owner" reporter:datatype="link"/>
7372                         <field name="create_time" reporter:datatype="timestamp"/>
7373                         <field name="name" reporter:datatype="text"/>
7374                         <field name="data" reporter:datatype="text"/>
7375                         <field name="folder" reporter:datatype="link"/>
7376                         <field name="description" reporter:datatype="text"/>
7377                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
7378                 </fields>
7379                 <links>
7380                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7381                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
7382                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
7383                 </links>
7384         </class>
7385         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
7386                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
7387                         <field name="id" reporter:datatype="id" />
7388                         <field name="owner" reporter:datatype="link"/>
7389                         <field name="create_time" reporter:datatype="timestamp"/>
7390                         <field name="template" reporter:datatype="link"/>
7391                         <field name="data" reporter:datatype="text"/>
7392                         <field name="folder" reporter:datatype="link"/>
7393                         <field name="recur" reporter:datatype="bool"/>
7394                         <field name="recurrence" reporter:datatype="interval"/>
7395                         <field name="name" reporter:datatype="text"/>
7396                         <field name="description" reporter:datatype="text"/>
7397                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
7398                 </fields>
7399                 <links>
7400                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7401                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
7402                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
7403                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
7404                 </links>
7405         </class>
7406         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
7407                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
7408                         <field name="id" reporter:datatype="id" />
7409                         <field name="runner" reporter:datatype="link"/>
7410                         <field name="start_time" reporter:datatype="timestamp"/>
7411                         <field name="complete_time" reporter:datatype="timestamp"/>
7412                         <field name="run_time" reporter:datatype="timestamp"/>
7413                         <field name="email" reporter:datatype="text"/>
7414                         <field name="excel_format" reporter:datatype="bool"/>
7415                         <field name="csv_format" reporter:datatype="bool"/>
7416                         <field name="html_format" reporter:datatype="bool"/>
7417                         <field name="error_code" reporter:datatype="int"/>
7418                         <field name="error_text" reporter:datatype="text"/>
7419                         <field name="report" reporter:datatype="link"/>
7420                         <field name="folder" reporter:datatype="link"/>
7421                         <field name="chart_pie" reporter:datatype="bool"/>
7422                         <field name="chart_bar" reporter:datatype="bool"/>
7423                         <field name="chart_line" reporter:datatype="bool"/>
7424                 </fields>
7425                 <links>
7426                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
7427                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
7428                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
7429                 </links>
7430         </class>
7431         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
7432                 <fields oils_persist:primary="id">
7433                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7434                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7435                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7436                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7437                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7438                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7439                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7440                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7441                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7442                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7443                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7444                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7445                 </fields>
7446                 <links>
7447                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7448                 </links>
7449         </class>
7450         <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">
7451                 <fields oils_persist:primary="id">
7452                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7453                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
7454                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7455                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7456                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7457                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7458                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7459                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7460                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7461                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7462                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7463                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7464                 </fields>
7465                 <links>
7466                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7467                 </links>
7468         </class>
7469         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
7470                 <fields oils_persist:primary="id">
7471                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
7472                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
7473                         <field reporter:label="Fingerprint" name="fingerprint" />
7474                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
7475                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
7476                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
7477                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
7478                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
7479                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
7480                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
7481                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
7482                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
7483                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
7484                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
7485                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
7486                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
7487                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
7488                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
7489                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
7490                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
7491                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
7492                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
7493                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
7494                 </fields>
7495                 <links>
7496                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
7497                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
7498                 </links>
7499         </class>
7500         <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">
7501                 <fields oils_persist:primary="id">
7502                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
7503                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
7504                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
7505                 </fields>
7506                 <links>
7507                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
7508                 </links>
7509         </class>
7510         <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">
7511                 <fields oils_persist:primary="id">
7512                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
7513                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
7514                 </fields>
7515                 <links>
7516                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
7517                 </links>
7518         </class>
7519         <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">
7520                 <fields oils_persist:primary="id">
7521                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
7522                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
7523                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
7524                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
7525                 </fields>
7526                 <links>
7527                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
7528                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
7529                 </links>
7530         </class>
7531         <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">
7532                 <fields oils_persist:primary="xact">
7533                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7534                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
7535                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
7536                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
7537                 </fields>
7538                 <links>
7539                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7540                 </links>
7541         </class>
7542         <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">
7543                 <fields oils_persist:primary="xact">
7544                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
7545                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
7546                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
7547                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
7548                 </fields>
7549                 <links>
7550                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
7551                 </links>
7552         </class>
7553         <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)">
7554                 <fields oils_persist:primary="id">
7555                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
7556                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
7557                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
7558                 </fields>
7559                 <links>
7560                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
7561                 </links>
7562         </class>
7563         <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">
7564                 <fields oils_persist:primary="id">
7565                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
7566                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
7567                 </fields>
7568                 <links>
7569                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
7570                 </links>
7571         </class>
7572         <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">
7573                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
7574                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
7575                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
7576                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
7577                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
7578                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
7579                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
7580                 </fields>
7581                 <links>
7582                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7583                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
7584                 </links>
7585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7586                         <actions>
7587                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7588                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7589                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7590                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
7591                         </actions>
7592                 </permacrud>
7593         </class>
7594         <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">
7595                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
7596                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
7597                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
7598                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
7599                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
7600                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
7601                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
7602                 </fields>
7603                 <links>
7604                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7605                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7606                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7607                 </links>
7608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7609                         <actions>
7610                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
7611                                         <context link="formula" field="owner"/>
7612                                 </create>
7613                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
7614                                         <context link="formula" field="owner"/>
7615                                 </retrieve>
7616                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
7617                                         <context link="formula" field="owner"/>
7618                                 </update>
7619                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
7620                                         <context link="formula" field="owner"/>
7621                                 </delete>
7622                         </actions>
7623                 </permacrud>
7624         </class>
7625
7626         <class id="acqdfa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::distribution_formula_application" oils_persist:tablename="acq.distribution_formula_application" reporter:label="Distribution Formula Application">
7627                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
7628                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7629                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7630                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7631                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
7632                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
7633                 </fields>
7634                 <links>
7635                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7636                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
7637                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7638                 </links>
7639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7640                         <actions>
7641                                 <create permission="CREATE_PURCHASE_ORDER">
7642                                         <context link="formula" field="owner"/>
7643                 </create>
7644                                 <retrieve permission="CREATE_PURCHASE_ORDER">
7645                                         <context link="formula" field="owner"/>
7646                 </retrieve>
7647                                 <update permission="CREATE_PURCHASE_ORDER">
7648                                         <context link="formula" field="owner"/>
7649                 </update>
7650                                 <delete permission="CREATE_PURCHASE_ORDER">
7651                                         <context link="formula" field="owner"/>
7652                 </delete>
7653                         </actions>
7654                 </permacrud>
7655         </class>
7656
7657         <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">
7658                 <fields oils_persist:primary="id">
7659                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
7660                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7661                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
7662                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
7663                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
7664                 </fields>
7665                 <links>
7666                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7667                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7668                 </links>
7669                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7670                 </permacrud>
7671         </class>
7672
7673         <class id="acqclt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_type" oils_persist:tablename="acq.claim_type" reporter:label="Claim Type">
7674                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
7675                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7676                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7677                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7678                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7679                 </fields>
7680                 <links>
7681                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7682                 </links>
7683                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7684                         <actions>
7685                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7686                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7687                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7688                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
7689                         </actions>
7690                 </permacrud>
7691         </class>
7692
7693         <class id="acqclet" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event_type" oils_persist:tablename="acq.claim_event_type" reporter:label="Claim Event Type">
7694                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
7695                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
7696                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7697                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7698                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7699                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
7700                 </fields>
7701                 <links>
7702                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7703                 </links>
7704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7705                         <actions>
7706                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7707                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
7708                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7709                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
7710                         </actions>
7711                 </permacrud>
7712         </class>
7713
7714         <class id="acqcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
7715                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
7716                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7717                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7718                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
7719                 </fields>
7720                 <links>
7721                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7722                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
7723                 </links>
7724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7725                 </permacrud>
7726         </class>
7727
7728         <class id="acqcle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
7729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
7730                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7731                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7732                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7733                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7734                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7735                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7736                 </fields>
7737                 <links>
7738                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7739                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
7740                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7741                 </links>
7742                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7743                 </permacrud>
7744         </class>
7745
7746         <class id="acqscl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
7747                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
7748                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
7749                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
7750                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
7751                 </fields>
7752                 <links>
7753                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
7754                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
7755                 </links>
7756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7757                 </permacrud>
7758         </class>
7759
7760         <class id="acqscle" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
7761                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
7762                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
7763                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
7764                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
7765                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
7766                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7767                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7768                 </fields>
7769                 <links>
7770                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
7771                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
7772                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7773                 </links>
7774                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7775                 </permacrud>
7776         </class>
7777
7778         <class id="acqclp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy" oils_persist:tablename="acq.claim_policy" reporter:label="Claim Policy">
7779                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
7780                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
7781                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
7782                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
7783                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7784                 </fields>
7785                 <links>
7786                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7787                 </links>
7788                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7789             <actions>
7790                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7791                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
7792                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7793                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
7794             </actions>
7795                 </permacrud>
7796         </class>
7797
7798         <class id="acqclpa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::claim_policy_action" oils_persist:tablename="acq.claim_policy_action" reporter:label="Claim Policy Action">
7799                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
7800                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
7801                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
7802                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
7803                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
7804                 </fields>
7805                 <links>
7806                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7807                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
7808                 </links>
7809                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7810                         <actions>
7811                                 <create permission="ADMIN_CLAIM_POLICY">
7812                                         <context link="claim_policy" field="org_unit"/>
7813                 </create>
7814                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
7815                                         <context link="claim_policy" field="org_unit"/>
7816                 </retrieve>
7817                                 <update permission="ADMIN_CLAIM_POLICY">
7818                                         <context link="claim_policy" field="org_unit"/>
7819                 </update>
7820                                 <delete permission="ADMIN_CLAIM_POLICY">
7821                                         <context link="claim_policy" field="org_unit"/>
7822                 </delete>
7823                         </actions>
7824                 </permacrud>
7825         </class>
7826
7827     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
7828         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
7829             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7830             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7831             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7832             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
7833             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
7834             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
7835             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
7836             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
7837             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
7838             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
7839             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
7840             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
7841             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
7842             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
7843             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7844         </fields>
7845     </class>
7846
7847     <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">
7848         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
7849             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7850             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7851             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7852             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
7853             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7854         </fields>
7855     </class>
7856
7857     <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">
7858         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
7859             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7860             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7861             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7862             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7863             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7864             <field reporter:label="City" name="city" reporter:datatype="text"/>
7865             <field reporter:label="State" name="state" reporter:datatype="text"/>
7866             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7867             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7868             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7869         </fields>
7870     </class>
7871
7872     <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">
7873         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
7874             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7875             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7876             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7877             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
7878             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
7879             <field reporter:label="City" name="city" reporter:datatype="text"/>
7880             <field reporter:label="State" name="state" reporter:datatype="text"/>
7881             <field reporter:label="Country" name="country" reporter:datatype="text"/>
7882             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7883             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7884         </fields>
7885     </class>
7886
7887     <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">
7888         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
7889             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
7890             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
7891             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
7892             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
7893             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
7894             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
7895         </fields>
7896     </class>
7897
7898         <class id="afs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
7899                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
7900                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
7901                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7902                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7903                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
7904                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
7905                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
7906                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
7907                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
7908                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
7909                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
7910                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
7911                 </fields>
7912                 <links>
7913                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7914                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7915                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
7916                 </links>
7917                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7918                 </permacrud>
7919         </class>
7920
7921         <class id="afscv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
7922                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
7923                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
7924                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
7925                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
7926                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
7927                 </fields>
7928                 <links>
7929                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
7930                 </links>
7931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7932                 </permacrud>
7933         </class>
7934
7935     <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">
7936         <fields>
7937             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7938             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7939             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7940         </fields>
7941                 <links>
7942                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7943                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7944                 </links>
7945     </class>
7946
7947     <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">
7948         <fields>
7949             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7950             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
7951         </fields>
7952                 <links>
7953                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7954                 </links>
7955     </class>
7956
7957     <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">
7958         <fields>
7959             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7960             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7961             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7962         </fields>
7963                 <links>
7964                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7965                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7966                 </links>
7967     </class>
7968
7969     <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">
7970         <fields>
7971             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7972             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
7973         </fields>
7974                 <links>
7975                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7976                 </links>
7977     </class>
7978
7979     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
7980                 <oils_persist:source_definition>
7981
7982             SELECT  DISTINCT l.*
7983               FROM  action.unfulfilled_hold_loops l
7984                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
7985               WHERE l.count = m.max
7986
7987                 </oils_persist:source_definition>
7988         <fields>
7989             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
7990             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
7991             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
7992         </fields>
7993                 <links>
7994                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7995                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
7996                 </links>
7997     </class>
7998
7999         <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">
8000                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8001                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8002                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8003                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8004                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8005                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8006                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8007                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8008                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8009                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8010                 </fields>
8011                 <links>
8012                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8013                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8014                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8015                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8016                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8017                 </links>
8018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8019                 </permacrud>
8020         </class>
8021
8022         <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">
8023                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8024                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8025                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8026                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8027                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8028                 </fields>
8029                 <links>
8030                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8031                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8032                 </links>
8033                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8034                 </permacrud>
8035         </class>
8036
8037         <class id="qdt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8038                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8039                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8040                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8041                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8042                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8043                 </fields>
8044                 <links>
8045                 </links>
8046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8047                 </permacrud>
8048         </class>
8049
8050         <class id="qsf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8051                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8052                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8053                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8054                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8055                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8056                 </fields>
8057                 <links>
8058                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8059                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8060                 </links>
8061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8062                 </permacrud>
8063         </class>
8064         
8065         <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">
8066                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8067                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8068                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8069                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8070                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8071                 </fields>
8072                 <links>
8073                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8074                 </links>
8075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8076                 </permacrud>
8077         </class>
8078         
8079         <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">
8080                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8081                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8082                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8083                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8084                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8085                 </fields>
8086                 <links>
8087                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8088                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8089                 </links>
8090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8091                 </permacrud>
8092         </class>
8093
8094         <class id="qbv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8095                 <fields oils_persist:primary="name">
8096                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8097                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8098                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8099                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8100                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8101                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8102                 </fields>
8103                 <links>
8104                 </links>
8105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8106                 </permacrud>
8107         </class>
8108
8109         <class id="qxp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8110                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8111                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8112                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8113                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8114                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8115                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8116                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8117                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8118                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8119                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8120                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8121                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8122                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8123                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8124                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8125                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8126                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8127                 </fields>
8128                 <links>
8129                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8130                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8131                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8132                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8133                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8134                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8135                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8136                 </links>
8137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8138                 </permacrud>
8139         </class>
8140
8141         <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">
8142                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8143                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8144                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8145                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8146                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8147                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8148                 </fields>
8149                 <links>
8150                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8151                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8152                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8153                 </links>
8154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8155                 </permacrud>
8156         </class>
8157
8158         <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">
8159                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8160                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8161                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8162                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8163                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8164                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8165                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8166                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8167                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8168                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8169                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8170                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8171                 </fields>
8172                 <links>
8173                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8174                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8175                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8176                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8177                 </links>
8178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8179                 </permacrud>
8180         </class>
8181
8182         <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">
8183                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8184                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8185                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8186                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8187                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8188                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8189                 </fields>
8190                 <links>
8191                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8192                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8193                 </links>
8194                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8195                 </permacrud>
8196         </class>
8197
8198         <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">
8199                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8200                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8201                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8202                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8203                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8204                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
8205                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
8206                 </fields>
8207                 <links>
8208                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8209                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8210                 </links>
8211                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8212                 </permacrud>
8213         </class>
8214
8215         <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">
8216                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
8217                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
8218                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8219                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8220                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
8221                 </fields>
8222                 <links>
8223                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8224                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
8225                 </links>
8226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8227                 </permacrud>
8228         </class>
8229
8230         <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">
8231                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8232                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8233                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8234                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8235                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8236                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8237                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8238                 </fields>
8239                 <links>
8240                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8241                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8242                 </links>
8243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8244                 </permacrud>
8245         </class>
8246
8247         <class id="xbind" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
8248                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8249                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8250                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8251                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8252                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8253                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8254                 </fields>
8255                 <links>
8256                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8257                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8258                 </links>
8259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8260                 </permacrud>
8261         </class>
8262
8263         <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">
8264                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8265                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8266                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8267                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8268                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8269                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8270                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8271                 </fields>
8272                 <links>
8273                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8274                 </links>
8275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8276                 </permacrud>
8277         </class>
8278
8279         <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">
8280                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8281                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8282                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8283                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8284                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8285                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8286                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8287                 </fields>
8288                 <links>
8289                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8290                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8291                 </links>
8292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8293                 </permacrud>
8294         </class>
8295
8296         <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">
8297                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8298                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8299                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8300                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8301                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8302                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8303                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8304                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8305                 </fields>
8306                 <links>
8307                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8308                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8309                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8310                 </links>
8311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8312                 </permacrud>
8313         </class>
8314
8315         <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">
8316                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8317                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8318                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8319                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8320                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8321                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8322                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8323                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8324                 </fields>
8325                 <links>
8326                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8327                 </links>
8328                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8329                 </permacrud>
8330         </class>
8331
8332         <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">
8333                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8334                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8335                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8336                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8337                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8338                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8339                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8340                 </fields>
8341                 <links>
8342                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8343                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8344                 </links>
8345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8346                 </permacrud>
8347         </class>
8348
8349         <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">
8350                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8351                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8352                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8353                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8354                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8355                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8356                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8357                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8358                 </fields>
8359                 <links>
8360                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8361                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8362                 </links>
8363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8364                 </permacrud>
8365         </class>
8366
8367         <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">
8368                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8369                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8370                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8371                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8372                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8373                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8374                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8375                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8376                 </fields>
8377                 <links>
8378                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8379                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8380                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8381                 </links>
8382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8383                 </permacrud>
8384         </class>
8385
8386         <class id="xisnull" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
8387                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8388                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8389                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8390                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8391                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8392                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8393                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8394                 </fields>
8395                 <links>
8396                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8397                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8398                 </links>
8399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8400                 </permacrud>
8401         </class>
8402
8403         <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">
8404                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8405                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8406                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8407                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8408                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8409                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8410                 </fields>
8411                 <links>
8412                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8413                 </links>
8414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8415                 </permacrud>
8416         </class>
8417
8418         <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">
8419                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8420                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8421                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8422                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8423                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8424                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8425                 </fields>
8426                 <links>
8427                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8428                 </links>
8429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8430                 </permacrud>
8431         </class>
8432
8433         <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">
8434                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8435                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8436                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8437                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8438                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8439                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8440                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8441                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8442                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8443                 </fields>
8444                 <links>
8445                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8446                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8447                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8448                 </links>
8449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8450                 </permacrud>
8451         </class>
8452
8453         <class id="xser" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
8454                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8455                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8456                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8457                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8458                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8459                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8460                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8461                 </fields>
8462                 <links>
8463                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8464                 </links>
8465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8466                 </permacrud>
8467         </class>
8468
8469         <class id="xstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
8470                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8471                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8472                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8473                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8474                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8475                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8476                 </fields>
8477                 <links>
8478                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8479                 </links>
8480                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8481                 </permacrud>
8482         </class>
8483
8484         <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">
8485                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8486                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8487                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8488                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8489                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8490                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8491                 </fields>
8492                 <links>
8493                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8494                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8495                 </links>
8496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8497                 </permacrud>
8498         </class>
8499
8500         <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">
8501                 <fields oils_persist:primary="id">
8502                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
8503                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
8504                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
8505                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
8506                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
8507                 </fields>
8508                 <links>
8509                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
8510                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8511                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
8512                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
8513                 </links>
8514         </class>
8515
8516         <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">
8517                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
8518                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8519                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
8520                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
8521                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
8522                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8523                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8524                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
8525                 </fields>
8526                 <links/>
8527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8528                         <actions>
8529                                 <retrieve/>
8530                         </actions>
8531                 </permacrud>
8532         </class>
8533
8534         <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">
8535                 <fields oils_persist:primary="ptype_key">
8536                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
8537                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8538                 </fields>
8539                 <links/>
8540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8541                         <actions>
8542                                 <retrieve/>
8543                         </actions>
8544                 </permacrud>
8545         </class>
8546
8547         <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">
8548                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
8549                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8550                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
8551                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
8552                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
8553                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
8554                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8555                 </fields>
8556                 <links>
8557                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
8558                 </links>
8559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8560                         <actions>
8561                                 <retrieve/>
8562                         </actions>
8563                 </permacrud>
8564         </class>
8565
8566         <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">
8567                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
8568                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8569                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
8570                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
8571                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
8572                 </fields>
8573                 <links>
8574                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
8575                 </links>
8576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8577                         <actions>
8578                                 <retrieve/>
8579                         </actions>
8580                 </permacrud>
8581         </class>
8582
8583         <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">
8584                 <fields oils_persist:primary="code">
8585                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
8586                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
8587                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
8588                 </fields>
8589                 <links/>
8590                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8591                         <actions>
8592                                 <retrieve/>
8593                         </actions>
8594                 </permacrud>
8595         </class>
8596
8597         <class id="rlcd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_copy_deleted" oils_persist:readonly="true" reporter:core="true" reporter:label="Last Copy Delete Time">
8598                 <oils_persist:source_definition>
8599
8600             SELECT  b.id,
8601                     MAX(dcp.edit_date) AS last_delete_date
8602              FROM   biblio.record_entry b
8603                     JOIN asset.call_number cn ON (cn.record = b.id)
8604                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
8605              WHERE  NOT b.deleted
8606              GROUP BY b.id
8607              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
8608
8609                 </oils_persist:source_definition>
8610                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8611                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8612                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
8613                 </fields>
8614                 <links>
8615                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8616                 </links>
8617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8618                         <actions>
8619                                 <retrieve/>
8620                         </actions>
8621                 </permacrud>
8622         </class>
8623
8624         <class id="rhcrpb" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib" oils_persist:readonly="true" reporter:core="true" reporter:label="Hold/Copy Ratio per Bib">
8625                 <oils_persist:source_definition>
8626
8627             -- -- If we uncomment the RIGHT JOIN against biblio.record_entry, then we'll get a row for every non-deleted bib, whether it has active holds or not.
8628             -- -- If we expect to use pcrud to query against specific bibs, we probably want to do this.  However, if we're using this to populate a report, we
8629             -- -- may not.
8630             -- SELECT
8631             --     bre.id AS "bib_id",
8632             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
8633             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
8634             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
8635             -- FROM (
8636                 SELECT
8637                     y.bre AS "id",
8638                     COALESCE( x.copy_count, 0 ) AS "copy_count",
8639                     y.hold_count AS "hold_count",
8640                     (y.hold_count::REAL / (CASE WHEN x.copy_count = 0 OR x.copy_count IS NULL THEN 0.1 ELSE x.copy_count::REAL END)) AS "hold_copy_ratio"
8641                 FROM (
8642                         SELECT
8643                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
8644                             COUNT(*) AS "hold_count"
8645                         FROM action.hold_request h
8646                         WHERE
8647                             cancel_time IS NULL
8648                             AND fulfillment_time IS NULL
8649                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
8650                         GROUP BY 1
8651                     )y LEFT JOIN (
8652                         SELECT 
8653                             (SELECT id
8654                                 FROM biblio.record_entry 
8655                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
8656                             ) AS "bre", 
8657                             COUNT(*) AS "copy_count"
8658                         FROM asset.copy
8659                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
8660                         WHERE copy.holdable 
8661                             AND NOT copy.deleted 
8662                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
8663                         GROUP BY 1
8664                     )x ON x.bre = y.bre
8665                 -- )z RIGHT JOIN (
8666                 --     SELECT id
8667                 --     FROM biblio.record_entry
8668                 --     WHERE NOT deleted
8669                 -- )bre ON (z.bib_id = bre.id)
8670                 
8671
8672                 </oils_persist:source_definition>
8673                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8674                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
8675                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
8676                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
8677                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
8678                 </fields>
8679                 <links>
8680                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8681                 </links>
8682                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8683                         <actions>
8684                                 <retrieve/>
8685                         </actions>
8686                 </permacrud>
8687         </class>
8688
8689         <class id="rhcrpbap" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library">
8690                 <oils_persist:source_definition>
8691             SELECT *,
8692                 CASE WHEN copy_count_at_pickup_library = 0 THEN 'Infinity'::FLOAT ELSE holds_at_pickup_library::FLOAT/copy_count_at_pickup_library END AS pickup_library_ratio,
8693                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
8694             FROM
8695                 (SELECT bib_record as id, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
8696                     FROM
8697                         action.hold_request ahr
8698                         JOIN reporter.hold_request_record rhrr USING (id)
8699                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8700                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
8701                     WHERE
8702                         ahr.cancel_time IS NULL
8703                         AND ahr.fulfillment_time IS NULL
8704                     GROUP BY bib_record, pickup_lib
8705                 )x
8706                 JOIN
8707                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
8708                     FROM
8709                         action.hold_request ahr
8710                         JOIN reporter.hold_request_record rhrr USING (id)
8711                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
8712                     WHERE
8713                         ahr.cancel_time IS NULL
8714                         AND ahr.fulfillment_time IS NULL
8715                     GROUP BY bib_record
8716                 )y
8717                 USING (id)
8718                 </oils_persist:source_definition>
8719                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8720                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
8721                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
8722                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
8723                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
8724                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
8725                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
8726                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
8727                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
8728                 </fields>
8729                 <links>
8730                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8731                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
8732                 </links>
8733                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8734                         <actions>
8735                                 <retrieve/>
8736                         </actions>
8737                 </permacrud>
8738         </class>
8739
8740         <class id="rlc" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::last_circ_date" oils_persist:readonly="true" reporter:label="Last Circulation or Creation Date">
8741                 <oils_persist:source_definition>
8742             SELECT
8743                 ac.id,
8744                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
8745                 MAX(actac.xact_start) AS last_circ
8746             FROM asset.copy ac
8747                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8748             GROUP BY ac.id
8749
8750             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
8751             --SELECT
8752             --    ac.id,
8753             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
8754             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
8755             --FROM asset.copy ac
8756             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
8757             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
8758             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
8759                 </oils_persist:source_definition>
8760                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
8761                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
8762                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
8763                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
8764                 </fields>
8765                 <links>
8766                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8767                 </links>
8768                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8769                         <actions>
8770                                 <retrieve/>
8771                         </actions>
8772                 </permacrud>
8773         </class>
8774
8775         <!-- ********************************************************************************************************************* -->
8776         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
8777         <!-- ********************************************************************************************************************* -->
8778         <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">
8779                 <fields oils_persist:primary="id">
8780                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
8781                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
8782                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
8783                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8784                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
8785                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
8786                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
8787                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
8788                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
8789                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
8790                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
8791                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
8792                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
8793                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
8794                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8795                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
8796                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
8797                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
8798                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
8799                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
8800                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
8801                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
8802                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
8803                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
8804                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
8805                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
8806                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
8807                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
8808                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
8809                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
8810                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
8811                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
8812                 </fields>
8813                 <links>
8814                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
8815                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
8816                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
8817                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
8818                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
8819                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
8820                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
8821                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
8822                 </links>
8823         </class>
8824
8825         <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">
8826                 <fields oils_persist:primary="id">
8827                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8828                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8829                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8830                 </fields>
8831                 <links>
8832                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8833                 </links>
8834         </class>
8835
8836         <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">
8837                 <fields oils_persist:primary="id">
8838                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
8839                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
8840                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
8841                 </fields>
8842                 <links>
8843                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8844                 </links>
8845         </class>
8846
8847         <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">
8848                 <fields oils_persist:primary="id">
8849                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
8850
8851                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
8852                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
8853                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
8854
8855                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
8856                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
8857                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
8858
8859                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
8860                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
8861
8862                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
8863                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
8864                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
8865
8866                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
8867                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
8868
8869                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
8870                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
8871                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
8872
8873                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
8874                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
8875                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
8876
8877                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
8878                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
8879                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
8880                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
8881
8882                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
8883                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
8884
8885                 </fields>
8886                 <links>
8887                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
8888                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8889                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
8890                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
8891                 </links>
8892         </class>
8893
8894         <class id="acrlid" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_ready_lineitem_detail" oils_persist:readonly="true" reporter:label="Claim Ready Lineitem Details">
8895                 <oils_persist:source_definition>
8896
8897             SELECT
8898                 po.ordering_agency AS ordering_agency,
8899                 po.id AS purchase_order,
8900                 li.id AS lineitem,
8901                 lid.id AS lineitem_detail,
8902                 cpa.id AS claim_policy_action
8903             FROM
8904                 acq.lineitem_detail lid
8905                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
8906                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
8907                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
8908                 JOIN acq.claim_policy_action cpa ON (
8909                     cpa.claim_policy = cp.id
8910
8911                     -- we only care about claim policy actions whose claim
8912                     -- interval we'd reached or exceeded
8913                     AND (NOW() - cpa.action_interval) &gt; po.order_date
8914
8915                     -- filter out all claim policy actions where claim events
8916                     -- have occurred on or after the action's action_interval
8917                     AND NOT EXISTS (
8918                         SELECT 1
8919                         FROM
8920                             acq.claim_event evt
8921                             JOIN acq.claim claim ON (
8922                                 claim.id = evt.claim
8923                                 AND claim.lineitem_detail = lid.id
8924                             )
8925                         WHERE
8926                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
8927                     )
8928                 )
8929             WHERE
8930                 lid.cancel_reason IS NULL
8931                 AND li.cancel_reason IS NULL -- belt/suspenders
8932                 AND po.cancel_reason IS NULL -- belt/suspenders
8933                 AND lid.recv_time IS NULL
8934                 AND po.state = 'on-order'
8935             ORDER BY 1, 2, 3, 4, 5
8936
8937                 </oils_persist:source_definition>
8938                 <fields>
8939                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8940                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8941                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8942                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8943                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
8944                 </fields>
8945                 <links>
8946                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8947                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8948                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8949                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8950                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
8951                 </links>
8952         </class>
8953
8954         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary">
8955                 <oils_persist:source_definition>
8956
8957             SELECT 
8958                 li.id AS lineitem, 
8959                 (
8960                     SELECT COUNT(lid.id) 
8961                     FROM acq.lineitem_detail lid
8962                     WHERE lineitem = li.id
8963                 ) AS item_count,
8964                 (
8965                     SELECT COUNT(lid.id) 
8966                     FROM acq.lineitem_detail lid
8967                     WHERE recv_time IS NOT NULL AND lineitem = li.id
8968                 ) AS recv_count,
8969                 (
8970                     SELECT COUNT(lid.id) 
8971                     FROM acq.lineitem_detail lid
8972                     WHERE cancel_reason IS NOT NULL AND lineitem = li.id
8973                 ) AS cancel_count,
8974                 (
8975                     SELECT COUNT(lid.id) 
8976                     FROM acq.lineitem_detail lid
8977                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8978                     WHERE NOT debit.encumbrance AND lineitem = li.id
8979                 ) AS invoice_count,
8980                 (
8981                     SELECT COUNT(DISTINCT(lid.id)) 
8982                     FROM acq.lineitem_detail lid
8983                         JOIN acq.claim claim ON (claim.lineitem_detail = lid.id)
8984                     WHERE lineitem = li.id
8985                 ) AS claim_count,
8986                 (
8987                     SELECT (COUNT(lid.id) * li.estimated_unit_price)::NUMERIC(8,2)
8988                     FROM acq.lineitem_detail lid
8989                     WHERE lid.cancel_reason IS NULL AND lineitem = li.id
8990                 ) AS estimated_amount,
8991                 (
8992                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8993                     FROM acq.lineitem_detail lid
8994                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
8995                     WHERE debit.encumbrance AND lineitem = li.id
8996                 ) AS encumbrance_amount,
8997                 (
8998                     SELECT SUM(debit.amount)::NUMERIC(8,2)
8999                     FROM acq.lineitem_detail lid
9000                         JOIN acq.fund_debit debit ON (lid.fund_debit = debit.id)
9001                     WHERE NOT debit.encumbrance AND lineitem = li.id
9002                 ) AS paid_amount
9003
9004                 FROM acq.lineitem AS li
9005         </oils_persist:source_definition>
9006                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
9007                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9008                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9009                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
9010                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
9011                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
9012                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
9013                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
9014                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
9015                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
9016                 </fields>
9017                 <links>
9018                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9019                 </links>
9020     </class>
9021
9022
9023         <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">
9024                 <oils_persist:source_definition>
9025
9026                         SELECT  t.*
9027                           FROM  action.transit_copy t
9028                                 JOIN actor.org_unit AS s ON (t.source = s.id)
9029                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
9030                           WHERE s.parent_ou &lt;&gt; d.parent_ou
9031
9032                 </oils_persist:source_definition>
9033                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
9034                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
9035                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
9036                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
9037                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
9038                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
9039                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
9040                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
9041                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
9042                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
9043                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
9044                 </fields>
9045                 <links>
9046                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
9047                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
9048                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
9049                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
9050                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9051                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
9052                 </links>
9053         </class>
9054
9055     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
9056                 <oils_persist:source_definition>
9057
9058         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
9059                 SELECT
9060                         cp.id as copy,
9061                         COUNT(circ.id),
9062                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9063                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9064                 FROM
9065                         asset.copy cp
9066                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
9067                 GROUP BY 1, 3, 4
9068                 UNION
9069                 SELECT
9070                         cp.id as copy,
9071                         COUNT(circ.id),
9072                         EXTRACT(YEAR FROM circ.xact_start) AS year,
9073                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
9074                 FROM
9075                         asset.copy cp
9076                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
9077                 GROUP BY 1, 3, 4
9078                 UNION
9079                 SELECT
9080                         id as copy,
9081                         circ_count,
9082                         -1 AS year,
9083                         false as is_renewal
9084                 FROM
9085                         extend_reporter.legacy_circ_count
9086         )x GROUP BY 1, 3, 4
9087
9088                 </oils_persist:source_definition>
9089         <fields>
9090             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
9091             <field reporter:label="Count" name="count" reporter:datatype="int"/>
9092             <field reporter:label="Year" name="year" reporter:datatype="int"/>
9093             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
9094         </fields>
9095                 <links>
9096                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
9097                 </links>
9098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9099                         <actions>
9100                                 <retrieve/>
9101                         </actions>
9102                 </permacrud>
9103     </class>
9104
9105         <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">
9106                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
9107                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
9108                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
9109                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
9110                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
9111                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
9112                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
9113                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
9114                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
9115                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
9116                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
9117                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
9118                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
9119                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
9120                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
9121                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
9122                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
9123                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
9124                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
9125                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
9126                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
9127                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
9128                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
9129                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
9130                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
9131                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
9132                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
9133                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
9134                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
9135                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
9136                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
9137                 </fields>
9138                 <links>
9139                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
9140                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
9141                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
9142                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
9143                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
9144                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9145                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9146                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
9147                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
9148                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
9149                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
9150                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
9151                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
9152                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
9153                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
9154                 </links>
9155         </class>
9156
9157     <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">
9158         <fields oils_persist:primary="id">
9159             <field reporter:label="Title" name="title" reporter:datatype="text"/>
9160             <field reporter:label="Author" name="author" reporter:datatype="text"/>
9161             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
9162             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
9163             <field reporter:label="Price" name="price" reporter:datatype="money"/>
9164             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9165             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
9166             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
9167             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9168             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
9169             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9170             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
9171             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
9172             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
9173             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9174             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9175             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
9176             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
9177             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
9178             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
9179             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
9180             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
9181             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9182             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
9183             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
9184             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
9185             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
9186             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
9187             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
9188             <field reporter:label="Status" name="status" reporter:datatype="link"/>
9189             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
9190             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
9191             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
9192             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
9193         </fields>
9194         <links>
9195             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9196             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9197             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9198             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
9199             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
9200         </links>
9201     </class>
9202
9203     <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">
9204         <fields oils_persist:primary="id">
9205             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9206             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9207             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9208             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9209         </fields>
9210         <links>
9211             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9212             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9213         </links>
9214     </class>
9215
9216     <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">
9217         <fields oils_persist:primary="owning_lib">
9218             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9219             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9220             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9221         </fields>
9222         <links>
9223             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9224         </links>
9225     </class>
9226
9227     <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">
9228         <fields oils_persist:primary="id">
9229             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9230             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9231             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9232             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9233             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9234         </fields>
9235         <links>
9236             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9237             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9238             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9239         </links>
9240     </class>
9241
9242     <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">
9243         <fields oils_persist:primary="circ_lib">
9244             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
9245             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9246             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9247             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9248         </fields>
9249         <links>
9250             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9251             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9252         </links>
9253     </class>
9254
9255     <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">
9256         <fields oils_persist:primary="id">
9257             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
9258             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9259             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9260             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
9261             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
9262         </fields>
9263         <links>
9264             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9265             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9266             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9267         </links>
9268     </class>
9269
9270     <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">
9271         <fields oils_persist:primary="home_ou">
9272             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
9273             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9274             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
9275             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
9276         </fields>
9277         <links>
9278             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9279             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
9280         </links>
9281     </class>
9282         <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">
9283                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
9284                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
9285                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
9286                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
9287                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
9288                 </fields>
9289                 <links>
9290                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9291                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
9292                 </links>
9293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9294                         <actions>
9295                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9296                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
9297                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9298                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
9299                         </actions>
9300                 </permacrud>
9301         </class>
9302         <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">
9303                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
9304                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
9305                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
9306                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
9307                 </fields>
9308                 <links>
9309                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9310                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
9311                         </links>
9312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9313                 <actions>
9314                                 <create permission="ADMIN_ACQ_FUND_TAG">
9315                                         <context link="tag" field="owner"/>
9316                                 </create>
9317                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
9318                                         <context link="tag" field="owner"/>
9319                                 </retrieve>
9320                                 <update permission="ADMIN_ACQ_FUND_TAG">
9321                                         <context link="tag" field="owner"/>
9322                                 </update>
9323                                 <delete permission="ADMIN_ACQ_FUND_TAG">
9324                                         <context link="tag" field="owner"/>
9325                                 </delete>
9326                         </actions>
9327                 </permacrud>
9328         </class>
9329         <class id="cbc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::barcode_completion" oils_persist:tablename="config.barcode_completion" reporter:label="Barcode Completions">
9330                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
9331                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9332                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
9333                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
9334                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
9335                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
9336                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9337                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
9338                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
9339                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
9340                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
9341                 </fields>
9342                 <links>
9343                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9344                 </links>
9345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9346                         <actions>
9347                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9348                                 <retrieve/>
9349                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9350                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
9351                         </actions>
9352                 </permacrud>
9353         </class>
9354
9355         <class id="coustl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::org_unit_setting_type_log" oils_persist:tablename="config.org_unit_setting_type_log" reporter:label="Organizational Unit Setting Type Log">
9356                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
9357                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9358                         <field name="date_applied" reporter:datatype="timestamp"/>
9359                         <field name="org" reporter:datatype="org_unit"/>
9360                         <field name="original_value" reporter:datatype="text"/>
9361                         <field name="new_value" reporter:datatype="text"/>
9362                         <field name="field_name" reporter:datatype="link"/>
9363                 </fields>
9364                 <links>
9365                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
9366                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
9367                 </links>
9368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9369                         <actions>
9370                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
9371                                 <retrieve/>
9372                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9373                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
9374                         </actions>
9375                 </permacrud>
9376         </class>
9377
9378
9379         <!-- ********************************************************************************************************************* -->
9380
9381 </IDL>
9382
9383 <!--
9384     vim:noet:ts=4:sw=4:
9385 -->