]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1452950 pat. reg surveys and opt-in settings
[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           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <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">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <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">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                 </fields>
204                 <links>
205                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
206                 </links>
207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
208                         <actions>
209                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
210                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
211                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
212                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
213                         </actions>
214                 </permacrud>
215         </class>
216
217         <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">
218                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
219                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
220                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
221                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
222                 </fields>
223                 <links>
224                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
225                 </links>
226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
227                         <actions>
228                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
229                     <context link="grp" field="owner"/>
230                 </create>
231                                 <retrieve/>
232                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
233                     <context link="grp" field="owner"/>
234                 </update>
235                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
236                     <context link="grp" field="owner"/>
237                 </delete>
238                         </actions>
239                 </permacrud>
240         </class>
241
242         <class  id="vibtg" 
243             controller="open-ils.cstore open-ils.pcrud" 
244             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
245             oils_persist:tablename="vandelay.import_bib_trash_group" 
246             reporter:label="Import/Overlay Field Groups for Removal">
247                 <fields oils_persist:primary="id" 
248                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
249                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
250                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
251                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
252                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
253                 </fields>
254                 <links>
255                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
256                 </links>
257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
258                         <actions>
259                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
260                                 <retrieve/>
261                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267
268         <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">
269                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
270                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
271                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
272                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
273                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
274                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
275                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
276                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
277                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
278                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
279                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
280                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
281                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
282                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
283                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
286                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
287                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
288                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
289                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
290                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
291                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
292                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
293                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
294                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
295                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
296                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
297                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
298                 </fields>
299                 <links>
300                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
301                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
302                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
303                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_IMPORT_ITEM">
308                     <context link="definition" field="owner"/>
309                                 </create>
310                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
311                     <context link="definition" field="owner"/>
312                                 </retrieve>
313                                 <update permission="UPDATE_IMPORT_ITEM">
314                     <context link="definition" field="owner"/>
315                                 </update>
316                                 <delete permission="DELETE_IMPORT_ITEM">
317                     <context link="definition" field="owner"/>
318                                 </delete>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <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">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
325                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
327                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
329                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
330                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
331                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
332                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
333                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
334                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
335                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
336                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
337                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
338                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
339                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
340                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
341                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
342                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
343                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
344                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
345                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
346                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
347                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
348                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
349                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
350                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
351                 </fields>
352                 <links>
353                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
354                 </links>
355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
356                         <actions>
357                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                                 <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"/>
359                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
360                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
361                         </actions>
362                 </permacrud>
363         </class>
364
365         <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">
366                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
367                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
368                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
369                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
370                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
371                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
372                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
373                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
374                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
375                 </fields>
376                 <links>
377                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
378                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
379                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
380                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
381                 </links>
382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
383                         <actions>
384                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
387                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
388                         </actions>
389                 </permacrud>
390         </class>
391
392         <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">
393                 <fields oils_persist:primary="code">
394                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
395                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
396                 </fields>
397                 <links>
398                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
399                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <retrieve/>
405                         </actions>
406                 </permacrud>
407         </class>
408
409         <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">
410                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
411                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
412                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
414                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
415                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
416                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
417                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
418                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
419                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
420                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
421                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
422                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
423                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
424                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
425                 </fields>
426                 <links>
427                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
428                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
429                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
430                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
431             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
432             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
433             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
434                 </links>
435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
436                         <actions>
437                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
438                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
439                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
440                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
441                         </actions>
442                 </permacrud>
443         </class>
444
445         <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">
446                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
447                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
448                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
449                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
450                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
451                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
452                 </fields>
453                 <links/>
454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
455                         <actions>
456                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
457                 <retrieve/>
458                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
459                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
460                         </actions>
461                 </permacrud>
462         </class>
463
464         <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">
465                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
466                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
467                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
468                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
469                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
470                 </fields>
471                 <links>
472                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
473                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
474                 </links>
475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
476                         <actions>
477                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
478                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
481                         </actions>
482                 </permacrud>
483         </class>
484
485         <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">
486                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
487                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
488                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
489                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
490                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
491                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
492                 </fields>
493                 <links>
494                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
495                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
496                 </links>
497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
498                         <actions>
499                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
500                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
501                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
502                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
503                         </actions>
504                 </permacrud>
505         </class>
506
507         <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">
508                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
509                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
510                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
511                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
512                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
513                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
514                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
515                 </fields>
516                 <links>
517                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
518                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
519                 </links>
520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
521                         <actions>
522                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                         </actions>
527                 </permacrud>
528         </class>
529
530         <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">
531                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
532                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
533                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
534                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
535                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
536                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
537                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
538                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
539                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
540                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
541                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
542                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
543                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
544                 </fields>
545                 <links>
546                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
547                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
548                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
549             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
550             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
551                 </links>
552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
553                         <actions>
554                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
556                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
557                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
558                         </actions>
559                 </permacrud>
560         </class>
561
562         <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">
563                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
564                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
565                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
566                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
567                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
568                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
569                 </fields>
570                 <links/>
571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
572                         <actions>
573                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                 <retrieve/>
575                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
576                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
577                         </actions>
578                 </permacrud>
579         </class>
580
581         <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">
582                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
583                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
584                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
585                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
586                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
587                 </fields>
588                 <links>
589                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
590                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
591                 </links>
592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
593                         <actions>
594                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
596                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
597                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
598                         </actions>
599                 </permacrud>
600         </class>
601
602         <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">
603                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
604                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
605                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
606                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
607                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
608                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
609                 </fields>
610                 <links>
611                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
612                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <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">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
626                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
627                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
628                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
629                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
630                 </fields>
631                 <links>
632                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
633                 </links>
634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
635                         <actions>
636                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
637                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
638                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
639                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
640                         </actions>
641                 </permacrud>
642         </class>
643
644         <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">
645                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
646                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
647                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
648                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
649                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
650                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
651                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
652                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
653             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
654                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
655                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
656                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
657                 </fields>
658                 <links>
659                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
660                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
661                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
662                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
663                 </links>
664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665                         <actions>
666                                 <create permission="ADMIN_IMPORT_MATCH_SET">
667                     <context link="match_set" field="owner"/>
668                                 </create>
669                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
670                     <context link="match_set" field="owner"/>
671                                 </retrieve>
672                                 <update permission="ADMIN_IMPORT_MATCH_SET">
673                     <context link="match_set" field="owner"/>
674                                 </update>
675                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
676                     <context link="match_set" field="owner"/>
677                                 </delete>
678                         </actions>
679                 </permacrud>
680         </class>
681
682         <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">
683                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
684                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
685                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
686                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
687                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
688                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
689                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
690                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
691                 </fields>
692                 <links>
693                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
694                 </links>
695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
696                         <actions>
697                                 <create permission="ADMIN_IMPORT_MATCH_SET">
698                     <context link="match_set" field="owner"/>
699                                 </create>
700                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
701                     <context link="match_set" field="owner"/>
702                                 </retrieve>
703                                 <update permission="ADMIN_IMPORT_MATCH_SET">
704                     <context link="match_set" field="owner"/>
705                                 </update>
706                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
707                     <context link="match_set" field="owner"/>
708                                 </delete>
709                         </actions>
710                 </permacrud>
711         </class>
712
713         <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">
714                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
715                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
716                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
717                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
718                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
719                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
720                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
721                 </fields>
722                 <links>
723                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
724                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
725                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
726                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
727                 </links>
728         </class>
729
730     <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">
731         <fields oils_persist:primary="name">
732             <field reporter:label="Name" name="name" reporter:datatype="text"/>
733             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
734             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
735             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
736         </fields>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
740                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
741                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
742                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
743             </actions>
744         </permacrud>
745     </class>
746
747     <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">
748         <fields oils_persist:primary="id">
749             <field reporter:label="ID" name="id" reporter:datatype="id"/>
750             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
751             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
752             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
753             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
754         </fields>
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="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">
766                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
767                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
768                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
769                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
770                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
771                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
772                 </fields>
773                 <links>
774                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
775                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
776                 </links>
777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
778             <actions>
779                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780                 <retrieve/>
781                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
782                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
783             </actions>
784         </permacrud>
785         </class>
786
787         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
788                 <fields oils_persist:primary="id">
789                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
790                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
791                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
792         </fields>
793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
794             <actions>
795                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
796                 <retrieve/>
797                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
798                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
799             </actions>
800         </permacrud>
801         </class>
802
803         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
804                 <fields oils_persist:primary="id">
805                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
806                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
807                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
808                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
809                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
810                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
811                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
812                         <field reporter:label="Repeatabl?" name="repeatable" reporter:datatype="bool"/>
813                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
814                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
815                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
816         </fields>
817                 <links>
818                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
819                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
820         </links>
821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
822             <actions>
823                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
824                 <retrieve/>
825                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
826                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
827             </actions>
828         </permacrud>
829         </class>
830
831         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
832                 <fields oils_persist:primary="id">
833                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
834                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
835                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
836                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
837                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" />
838                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
839                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
840                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
841                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
842                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
843         </fields>
844                 <links>
845                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
846                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
847         </links>
848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
849             <actions>
850                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
851                 <retrieve/>
852                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
853                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
854             </actions>
855         </permacrud>
856         </class>
857
858         <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">
859                 <fields oils_persist:primary="name">
860                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
861                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
862                         <field reporter:label="Description" name="description" reporter:datatype="text" />
863                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
864                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
865                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
866                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
867                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
868                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
869                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
870                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
871                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
872                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
873                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
874                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
875                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
876                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
877                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
878                 </fields>
879                 <links>
880                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
881                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
882                 </links>
883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
884             <actions>
885                 <create permission="ADMIN_SVF" global_required="true"/>
886                 <retrieve/>
887                 <update permission="ADMIN_SVF" global_required="true"/>
888                 <delete permission="ADMIN_SVF" global_required="true"/>
889             </actions>
890         </permacrud>
891         </class>
892
893         <class id="csc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::sms_carrier" oils_persist:tablename="config.sms_carrier" reporter:label="SMS Carrier" oils_persist:field_safe="true">
894                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
896                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
897                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
898             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
899                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
900                 </fields>
901                 <links/>
902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
903             <actions>
904                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
905                 <retrieve/>
906                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
907                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
908             </actions>
909         </permacrud>
910         </class>
911
912         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
913                 <fields oils_persist:primary="coded_value">
914                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
915                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
916                 </fields>
917                 <links>
918                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
919                 </links>
920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
921             <actions>
922                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
923                 <retrieve/>
924                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
925                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
926             </actions>
927         </permacrud>
928         </class>
929
930         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
931                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
932                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
933                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
934                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
935                 </fields>
936                 <links>
937                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
938                 </links>
939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
940             <actions>
941                 <retrieve/>
942             </actions>
943         </permacrud>
944         </class>
945
946
947         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
948                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
949                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
950                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
951                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
952                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
953                 </fields>
954                 <links>
955                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
956                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
957                 </links>
958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
959             <actions>
960                 <retrieve/>
961             </actions>
962         </permacrud>
963         </class>
964
965
966         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
967                 <fields oils_persist:primary="source">
968                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
969                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
970                 </fields>
971                 <links>
972                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
973                 </links>
974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
975             <actions>
976                 <retrieve/>
977             </actions>
978         </permacrud>
979         </class>
980
981         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
982                 <fields>
983                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
984                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
985                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
986                 </fields>
987                 <links>
988                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
989                 </links>
990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
991             <actions>
992                 <retrieve/>
993             </actions>
994         </permacrud>
995         </class>
996
997         <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" oils_persist:readonly="true">
998                 <fields oils_persist:primary="id">
999                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1000                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1001                 </fields>
1002                 <links>
1003                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1004                 </links>
1005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1006             <actions>
1007                 <retrieve/>
1008             </actions>
1009         </permacrud>
1010         </class>
1011
1012         <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">
1013                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1014                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1015                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1016                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1017                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1018                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1019                 </fields>
1020                 <links>
1021                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1022                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1029                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <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">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1037                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1038                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1039                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1040                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1041                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1042                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1043             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1044             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1045             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1046                 </fields>
1047                 <links>
1048                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1049                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1050                 </links>
1051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1052             <actions>
1053                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1054                 <retrieve/>
1055                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1056                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1057             </actions>
1058         </permacrud>
1059         </class>
1060
1061         <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">
1062                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1063                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1064                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1065                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1066                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1067                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1068                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1069                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1070                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1071                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1072                 </fields>
1073                 <links>
1074                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1075                 </links>
1076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1077             <actions>
1078                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1079                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1080                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1081                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1082             </actions>
1083         </permacrud>
1084         </class>
1085
1086     <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">
1087         <fields oils_persist:primary="name">
1088             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1089             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1090             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1091             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1092             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1093             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1094             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1095             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1096             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1097             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1098         </fields>
1099         <links>
1100             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1101             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1102         </links>
1103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1104             <actions>
1105                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1106                 <retrieve/>
1107                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1108                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1109             </actions>
1110         </permacrud>
1111     </class>
1112
1113     <class id="cza" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::z3950_attr" oils_persist:tablename="config.z3950_attr" reporter:label="Z39.50 Attribute">
1114         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1115             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1116             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1117             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1118             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1119             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1120             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1121             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1122         </fields>
1123         <links>
1124             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1125         </links>
1126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1127             <actions>
1128                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1129                 <retrieve/>
1130                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1131                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1132             </actions>
1133         </permacrud>
1134     </class>
1135
1136     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1137                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1138                         oils_persist:tablename="config.z3950_index_field_map" 
1139                         reporter:label="Z39.50 Index Field Map">
1140         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1141             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1142             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1143             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1144             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1145             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1146             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1147         </fields>
1148         <links>
1149             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1150             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1151             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1152         </links>
1153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1154             <actions>
1155                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1156                 <retrieve/>
1157                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1158                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1159             </actions>
1160         </permacrud>
1161     </class>
1162
1163
1164         <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">
1165                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1166                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1167                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1168                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1169                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1170                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1171                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1172                 </fields>
1173                 <links>
1174             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1175             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1176                 </links>
1177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1178                         <actions>
1179                                 <retrieve/>
1180                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1181                         </actions>
1182                 </permacrud>
1183         </class>
1184
1185         <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">
1186                 <fields oils_persist:primary="key">
1187                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1188                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1189                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1190                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1191                 </fields>
1192                 <links/>
1193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1194                         <actions>
1195                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1196                                 <retrieve/>
1197                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1198                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1199                         </actions>
1200                 </permacrud>
1201         </class>
1202
1203         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1204                 <fields oils_persist:primary="module">
1205                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1206                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1207                 </fields>
1208                 <links/>
1209         </class>
1210
1211         <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">
1212                 <fields oils_persist:primary="module">
1213                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1214                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1215                 </fields>
1216                 <links/>
1217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218                         <actions>
1219                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1220                                 <retrieve/>
1221                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1222                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1223                         </actions>
1224                 </permacrud>
1225         </class>
1226
1227         <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">
1228                 <fields oils_persist:primary="module">
1229                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1230                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1231                 </fields>
1232                 <links/>
1233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1234                         <actions>
1235                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1236                                 <retrieve/>
1237                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1238                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1239                         </actions>
1240                 </permacrud>
1241         </class>
1242
1243         <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">
1244                 <fields oils_persist:primary="module">
1245                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1246                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1247                 </fields>
1248                 <links/>
1249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1250                         <actions>
1251                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1252                                 <retrieve/>
1253                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1254                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1255                         </actions>
1256                 </permacrud>
1257         </class>
1258
1259         <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">
1260                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1261                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1262                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1263                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1264                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1265                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1266                 </fields>
1267                 <links>
1268                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1269                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1274                     <context link="event_def" field="owner"/>
1275                 </create>
1276                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1277                     <context link="event_def" field="owner"/>
1278                 </retrieve>
1279                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1280                     <context link="event_def" field="owner"/>
1281                 </update>
1282                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1283                     <context link="event_def" field="owner"/>
1284                 </delete>
1285                         </actions>
1286                 </permacrud>
1287         </class>
1288
1289         <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">
1290                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1291                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1292                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1293                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1294                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1295                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1296                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1297                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1298                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1299                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1300                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1301                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1302                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1303                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1304                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1305                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1306                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1307                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1308                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1309                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1310                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1311                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1312                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1313                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1314                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1315                 </fields>
1316                 <links>
1317                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1318                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1319                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1320                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1321                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1322                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1323                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1324                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1325                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1326                 </links>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1330                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1331                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1332                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1338                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1339                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1340                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1341                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1342                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1343                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1344                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1345                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1346                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1347                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1348                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1349                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1350                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1351                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1352                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1353                 </fields>
1354                 <links>
1355                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1356                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1357                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1358                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1359                 </links>
1360         </class>
1361
1362         <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">
1363                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1364                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1365                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1366                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1367                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1368                 </fields>
1369                 <links>
1370                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1371                 </links>
1372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1373                         <actions>
1374                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1375                     <context link="event_def" field="owner"/>
1376                 </create>
1377                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1378                     <context link="event_def" field="owner"/>
1379                 </retrieve>
1380                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1381                     <context link="event_def" field="owner"/>
1382                 </update>
1383                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1384                     <context link="event_def" field="owner"/>
1385                 </delete>
1386                         </actions>
1387                 </permacrud>
1388         </class>
1389
1390         <class id="atul" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action_trigger::user_log" reporter:label="Action Trigger User Log" oils_persist:readonly="true">
1391                 <oils_persist:source_definition><![CDATA[
1392                 SELECT  atevdef.hook,
1393                         atevdef.name,
1394                         atevdef.reactor,
1395                         atev.id,
1396                         atev.event_def,
1397                         atev.add_time,
1398                         atev.run_time,
1399                         atev.start_time,
1400                         atev.update_time,
1401                         atev.complete_time,
1402                         atev.update_process,
1403                         atev.state,
1404                         atev.user_data,
1405                         atev.template_output,
1406                         atev.error_output,
1407                         atev.async_output,
1408                         targ_circ.id AS target_circ,
1409                         targ_ahr.id AS target_hold,
1410                         COALESCE(
1411                                 targ_circ.circ_lib,
1412                                 targ_ahr.pickup_lib
1413                         ) AS perm_lib
1414                 FROM action_trigger.event atev
1415                 JOIN action_trigger.event_definition atevdef ON
1416                         (atevdef.id = atev.event_def)
1417                 JOIN action_trigger.hook ath ON
1418                         (ath.key = atevdef.hook)
1419                 LEFT JOIN action.circulation targ_circ ON
1420                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1421                 LEFT JOIN action.hold_request targ_ahr ON
1422                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1423                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1424                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1425                                 'circ.staff.max_visible_event_age',
1426                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1427                         ) UNION
1428                         SELECT '1000 YEARS'::INTERVAL AS value
1429                 ) ous)
1430                 ]]></oils_persist:source_definition>
1431                 <fields oils_persist:primary="id">
1432                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1433                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1434                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1435                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1436                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1437                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1438                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1439                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1440                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1441                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1442                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1443                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1444                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1445                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1446                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1447                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1448                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1449                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1450                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1451                 </fields>
1452                 <links>
1453                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1454                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1455                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1456                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1457                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1458                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1459                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1460                 </links>
1461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1462                         <actions>
1463                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1464                         </actions>
1465                 </permacrud>
1466         </class>
1467
1468         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1470                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1471                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1472                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1473                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1474                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1475                 </fields>
1476                 <links>
1477                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1478                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1479                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1480                 </links>
1481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1482                         <actions>
1483                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1484                         </actions>
1485                 </permacrud>
1486         </class>
1487
1488         <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">
1489                 <fields oils_persist:primary="code">
1490                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1491                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1493                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1494                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1495                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1496                 </fields>
1497                 <links/>
1498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1499             <actions>
1500                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1501                 <retrieve/>
1502                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1503                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1504             </actions>
1505         </permacrud>
1506         </class>
1507
1508         <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">
1509                 <fields oils_persist:primary="code">
1510                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1511                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1512                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1513                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1514                 </fields>
1515                 <links/>
1516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1517             <actions>
1518                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1519                 <retrieve/>
1520                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1521                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1522             </actions>
1523         </permacrud>
1524         </class>
1525
1526         <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">
1527                 <fields oils_persist:primary="code">
1528                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1529                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1530                 </fields>
1531                 <links/>
1532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1533             <actions>
1534                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1535                 <retrieve/>
1536                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1537                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1538             </actions>
1539         </permacrud>
1540         </class>
1541
1542         <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">
1543                 <fields oils_persist:primary="code">
1544                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1545                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1546                 </fields>
1547                 <links/>
1548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1549             <actions>
1550                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1551                 <retrieve/>
1552                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1553                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1554             </actions>
1555         </permacrud>
1556         </class>
1557
1558         <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">
1559                 <fields oils_persist:primary="code">
1560                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1561                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1562                 </fields>
1563                 <links/>
1564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1565             <actions>
1566                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1567                 <retrieve/>
1568                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1569                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1570             </actions>
1571         </permacrud>
1572         </class>
1573
1574         <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">
1575                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1576                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1577                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1578                 </fields>
1579                 <links/>
1580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1581             <actions>
1582                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1583                 <retrieve/>
1584                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1585                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1586             </actions>
1587         </permacrud>
1588         </class>
1589
1590         <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">
1591                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1592                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1593                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1594                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1595                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1596                 </fields>
1597         <links>
1598             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1599             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1600             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1601         </links>
1602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1603             <actions>
1604                 <create permission="UPDATE_COPY">
1605                     <context link="target_copy" field="circ_lib"/>
1606                 </create>
1607                 <retrieve/>
1608                 <update permission="UPDATE_COPY">
1609                     <context link="target_copy" field="circ_lib"/>
1610                 </update>
1611                 <delete permission="UPDATE_COPY">
1612                     <context link="target_copy" field="circ_lib"/>
1613                 </delete>
1614             </actions>
1615         </permacrud>
1616         </class>
1617
1618         <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">
1619                 <fields oils_persist:primary="code">
1620                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1621                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1622                 </fields>
1623                 <links/>
1624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1625             <actions>
1626                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1627                 <retrieve/>
1628                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1629                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1630             </actions>
1631         </permacrud>
1632         </class>
1633
1634         <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">
1635                 <fields oils_persist:primary="code">
1636                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1637                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1638                 </fields>
1639                 <links/>
1640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1641             <actions>
1642                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1643                 <retrieve/>
1644                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1645                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1646             </actions>
1647         </permacrud>
1648         </class>
1649
1650         <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">
1651                 <fields oils_persist:primary="code">
1652                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1653                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1654                 </fields>
1655                 <links/>
1656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1657             <actions>
1658                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1659                 <retrieve/>
1660                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1661                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1662             </actions>
1663         </permacrud>
1664         </class>
1665
1666     <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">
1667         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1668             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1669             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1670             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1671             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1672             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1673             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1674             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1675             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1676             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1677             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1678             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1679             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1680             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1681             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1682             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1683             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1684             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1685         </fields>
1686         <links/>
1687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1688             <actions>
1689                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1690                 <retrieve/>
1691                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1692                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1693             </actions>
1694         </permacrud>
1695     </class>
1696
1697     <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">
1698         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1699             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1700             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1701             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1702             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1703             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1704             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1705             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1706             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1707             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1708             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1709             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1710             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1711             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1712             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1713             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1714             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1715             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1716             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1717             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1718         </fields>
1719         <links/>
1720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1721             <actions>
1722                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1723                 <retrieve/>
1724                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1725                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1726             </actions>
1727         </permacrud>
1728     </class>
1729
1730     <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">
1731         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1732             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1733             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1734             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1735             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1736             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1737         </fields>
1738         <links>
1739             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1740             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1741             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1742         </links>
1743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1744             <actions>
1745                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1746                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1747                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1748                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1749             </actions>
1750         </permacrud>
1751     </class>
1752
1753         <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">
1754                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1755                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1756                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1757                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1758                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1759                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1760                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1761                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1762                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1763                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1764                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1765                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1766                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1767                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1768                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1769                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1770                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1771             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1772                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1773                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1774                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1775                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1776                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1777                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1778                 </fields>
1779                 <links>
1780                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1781                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1782                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1783                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1784                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1785                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1786                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1787                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1788                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1789                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1790                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1791                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1792                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1793             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1794                 </links>
1795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1796             <actions>
1797                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1798                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1799                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1800                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1801             </actions>
1802         </permacrud>
1803         </class>
1804
1805         <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">
1806                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1807                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1808                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1809                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1810                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1811                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1812                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1813                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1814                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1815                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1816                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1817                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1818                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1819                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1820                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1821                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1822             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1823                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1824                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1825             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1826                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1827                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1828                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1829                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1830             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1831             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1832             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1833                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1834                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1835                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1836                 </fields>
1837                 <links>
1838                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1839                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1840                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1841                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1842                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1843                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1844                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1845                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1846                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1847                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1848                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1849                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1850                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1851                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1852             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1853                 </links>
1854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1855             <actions>
1856                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1857                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1858                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1859                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1860             </actions>
1861         </permacrud>
1862         </class>
1863
1864     <class id="cclg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_group" oils_persist:tablename="config.circ_limit_group" reporter:label="Circulation Limit Group">
1865         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1866             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1867             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1868             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1869         </fields>
1870         <links/>
1871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1872             <actions>
1873                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1874                 <retrieve/>
1875                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1876                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1877             </actions>
1878         </permacrud>
1879     </class>
1880
1881     <class id="ccls" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set" oils_persist:tablename="config.circ_limit_set" reporter:label="Circulation Limit Set">
1882         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1883             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1884             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1885             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1886             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1887             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1888             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1889             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1890         </fields>
1891         <links>
1892             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1893         </links>
1894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1895             <actions>
1896                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1897                 <retrieve/>
1898                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1899                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1900             </actions>
1901         </permacrud>
1902     </class>
1903
1904     <class id="ccmlsm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_matrix_limit_set_map" oils_persist:tablename="config.circ_matrix_limit_set_map" reporter:label="Circulation Matrix Limit Set Map">
1905         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1906             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1907             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1908             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1909             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1910             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1911         </fields>
1912         <links>
1913             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1914             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1915         </links>
1916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1917             <actions>
1918                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1919                     <context link="matchpoint" field="org_unit"/>
1920                 </create>
1921                 <retrieve/>
1922                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1923                     <context link="matchpoint" field="org_unit"/>
1924                 </update>
1925                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1926                     <context link="matchpoint" field="org_unit"/>
1927                 </delete>
1928             </actions>
1929         </permacrud>
1930     </class>
1931
1932     <class id="cclscmm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_circ_mod_map" oils_persist:tablename="config.circ_limit_set_circ_mod_map" reporter:label="Circulation Limit Set Circ Mod Map">
1933         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1934             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1935             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1936             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1937         </fields>
1938         <links>
1939             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1940             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1941         </links>
1942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1943             <actions>
1944                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1945                     <context link="limit_set" field="owning_lib"/>
1946                 </create>
1947                 <retrieve/>
1948                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1949                     <context link="limit_set" field="owning_lib"/>
1950                 </update>
1951                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1952                     <context link="limit_set" field="owning_lib"/>
1953                 </delete>
1954             </actions>
1955         </permacrud>
1956     </class>
1957     <class id="cclsacpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_copy_loc_map" oils_persist:tablename="config.circ_limit_set_copy_loc_map" reporter:label="Circulation Limit Set Copy Location Map">
1958         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1959             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1960             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1961             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1962         </fields>
1963         <links>
1964             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1965             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1966         </links>
1967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1968             <actions>
1969                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1970                     <context link="limit_set" field="owning_lib"/>
1971                 </create>
1972                 <retrieve/>
1973                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1974                     <context link="limit_set" field="owning_lib"/>
1975                 </update>
1976                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1977                     <context link="limit_set" field="owning_lib"/>
1978                 </delete>
1979             </actions>
1980         </permacrud>
1981     </class>
1982
1983     <class id="cclsgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::circ_limit_set_group_map" oils_persist:tablename="config.circ_limit_set_group_map" reporter:label="Circulation Limit Set Group Map">
1984         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1985             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1986             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1987             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1988             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1989         </fields>
1990         <links>
1991             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1992             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1993         </links>
1994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1995             <actions>
1996                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1997                     <context link="limit_set" field="owning_lib"/>
1998                 </create>
1999                 <retrieve/>
2000                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2001                     <context link="limit_set" field="owning_lib"/>
2002                 </update>
2003                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2004                     <context link="limit_set" field="owning_lib"/>
2005                 </delete>
2006             </actions>
2007         </permacrud>
2008     </class>
2009
2010         <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">
2011                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2012                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2013                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2014                 </fields>
2015                 <links/>
2016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2017             <actions>
2018                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2019                 <retrieve/>
2020                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2021                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2022             </actions>
2023         </permacrud>
2024         </class>
2025
2026         <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">
2027                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2028                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2029                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2030                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2031                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2032                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2033                 </fields>
2034                 <links>
2035                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2036                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2037                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2038                 </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_SURVEY">
2042                     <context link="survey" field="owner"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_SURVEY">
2046                     <context link="survey" field="owner"/>
2047                 </update>
2048                 <delete permission="ADMIN_SURVEY">
2049                     <context link="survey" field="owner"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053         </class>
2054         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2055                 <fields oils_persist:primary="id" oils_persist:sequence="">
2056                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2057                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2058                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2059                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2060                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2061                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2062                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2063                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2064                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2065                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2066                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2067                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2068                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2069                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2070                 </fields>
2071                 <links>
2072                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2073                 </links>
2074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2075                         <actions>
2076                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2077                                         <context link="usr" field="home_ou" />
2078                                 </retrieve>
2079                         </actions>
2080                 </permacrud>
2081         </class>
2082         <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">
2083                 <fields oils_persist:primary="id" oils_persist:sequence="">
2084                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2085                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2086                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2087                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2088                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2089                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2090                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2091                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2092                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2093                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2094                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2095                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2096                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2097                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2098                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2099                 </fields>
2100                 <links>
2101                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2102                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2103                 </links>
2104         </class>
2105         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2106                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2107                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2108                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2109                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2110                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2111                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2112                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2113                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2114                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2115                 </fields>
2116                 <links>
2117                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2118                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2119                 </links>
2120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2121                         <actions> <!-- created magically, so no create action -->
2122                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2123                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2124                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2125                         </actions>
2126                 </permacrud>
2127         </class>
2128         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2129                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2130                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2131                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2132                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2133                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2134                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2135                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2136                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2137                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2138                 </fields>
2139                 <links>
2140                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2141                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2142                 </links>
2143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2144                         <actions> <!-- created magically, so no create action -->
2145                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2146                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2147                         </actions>
2148                 </permacrud>
2149         </class>
2150         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2151                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2152                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2153                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2154                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2155                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2156                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2157                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2158                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2159                 </fields>
2160                 <links>
2161                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2162                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2163                 </links>
2164         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2165             <actions>
2166                 <create permission="UPDATE_USER" context_field="owner">
2167                     <context link="usr" field="home_ou"/>
2168                 </create>
2169                                 <!-- note: public notes are still accessible via API -->
2170                 <retrieve permission="UPDATE_USER">
2171                     <context link="usr" field="home_ou"/>
2172                                 </retrieve>
2173                 <update permission="UPDATE_USER">
2174                     <context link="usr" field="home_ou"/>
2175                                 </update>
2176                 <delete permission="UPDATE_USER">
2177                     <context link="usr" field="home_ou"/>
2178                                 </delete>
2179             </actions>
2180         </permacrud>
2181         </class>
2182         <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">
2183                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2184                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2185                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2186                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2187                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2189                 </fields>
2190                 <links>
2191                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2192                 </links>
2193         </class>
2194         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2195                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2196                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2197                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2198                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2199                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2200                 </fields>
2201                 <links>
2202                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2203                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2204                 </links>
2205         </class>
2206         <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">
2207                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2208                         <field name="field" reporter:datatype="link"/>
2209                         <field name="id" reporter:datatype="id" />
2210                         <field name="source" reporter:datatype="link"/>
2211                         <field name="value" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2215                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2216                 </links>
2217         </class>
2218         <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">
2219                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2220                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2221                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2222                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2223                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2224                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2225                 </fields>
2226                 <links>
2227                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2228                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2229                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2230                 </links>
2231         </class>
2232         <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">
2233                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2234                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2235                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2236                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2237                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2238                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2239                 </fields>
2240                 <links>
2241                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2242                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2243                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2244                 </links>
2245         </class>
2246         <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">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2248                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2249                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2250                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2251                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2252                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2253                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2254                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2255                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2256                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2257                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2258                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2259                 </fields>
2260                 <links>
2261                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2262                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2263                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2264                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2265                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2266                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2267                 </links>
2268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2269             <actions>
2270                 <create permission="TRANSIT_COPY" context_field="owner">
2271                     <context link="target_copy" field="circ_lib"/>
2272                 </create>
2273                 <retrieve/>
2274                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2275                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2281                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2282                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2283                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2284                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2285                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2286                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2287                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2288                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2289                 </fields>
2290                 <links>
2291                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2292                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2293                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2294                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2295                 </links>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="ADMIN_SURVEY">
2299                     <context link="survey" field="owner"/>
2300                 </create>
2301                 <retrieve permission="VIEW_USER">
2302                     <context link="usr" field="home_ou"/>
2303                 </retrieve>
2304                 <update permission="ADMIN_SURVEY">
2305                     <context link="survey" field="owner"/>
2306                 </update>
2307                 <delete permission="ADMIN_SURVEY">
2308                     <context link="survey" field="owner"/>
2309                 </delete>
2310             </actions>
2311         </permacrud>
2312         </class>
2313         <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">
2314                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2315                         <field name="bucket" />
2316                         <field name="id" reporter:datatype="id" />
2317                         <field name="target_copy" reporter:datatype="link"/>
2318                         <field name="create_time" reporter:datatype="timestamp" />
2319                         <field name="pos" reporter:datatype="int" />
2320                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2321                 </fields>
2322                 <links>
2323                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2324                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2325             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2326                 </links>
2327         </class>
2328         <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">
2329                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2330                         <field name="id" reporter:datatype="id" />
2331                         <field name="item" reporter:datatype="link"/>
2332                         <field name="note" reporter:datatype="text" />
2333                 </fields>
2334                 <links>
2335                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2336                 </links>
2337         </class>
2338
2339         <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">
2340                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2341                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2342                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2343                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2344                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2345                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2346                 </fields>
2347                 <links>
2348                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2349                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2350                 </links>
2351                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2352                         <actions>
2353                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2354                                 <retrieve/>
2355                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2356                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2357                         </actions>
2358                 </permacrud>
2359         </class>
2360
2361         <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">
2362                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2363                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2364                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2365                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2366                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2367                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2368                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2369                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2370                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2371                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2372                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2373                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2374                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2375                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2376                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2377                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2378                 </fields>
2379                 <links>
2380                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2381                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2382                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2383                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2384                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2385                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2386                 </links>
2387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2388                         <actions>
2389                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2390                                 <retrieve/>
2391                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2392                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2393                         </actions>
2394                 </permacrud>
2395         </class>
2396
2397         <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">
2398                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2399                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2400                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2401                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2402                 </fields>
2403                 <links>
2404                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2405                 </links>
2406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2407                         <actions>
2408                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2409                                 <retrieve/>
2410                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2411                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2412                         </actions>
2413                 </permacrud>
2414         </class>
2415
2416         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2417                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2418                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2419                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2420                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2421                 </fields>
2422                 <links>
2423                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2424                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2425                 </links>
2426                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2427                         <actions>
2428                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2429                                 <retrieve/>
2430                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2431                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2432                         </actions>
2433                 </permacrud>
2434         </class>
2435
2436         <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">
2437                 <fields oils_persist:primary="code">
2438                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2439                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2440                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2441                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2442                 </fields>
2443                 <links>
2444                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2445                 </links>
2446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2447                         <actions>
2448                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2449                                 <retrieve/>
2450                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2451                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2452                         </actions>
2453                 </permacrud>
2454         </class>
2455
2456         <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">
2457                 <fields oils_persist:primary="code">
2458                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2459                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2460                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2461                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2462                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2463                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2464                 </fields>
2465                 <links>
2466                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2467                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2468                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2469                 </links>
2470                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2471                         <actions>
2472                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2473                                 <retrieve/>
2474                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2475                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2476                         </actions>
2477                 </permacrud>
2478         </class>
2479
2480     <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">
2481         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2482             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2483             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2484             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2485         </fields>
2486         <links>
2487             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2488             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2489         </links>
2490         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2491             <actions>
2492                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2493                 <retrieve/>
2494                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2495                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2496             </actions>
2497         </permacrud>
2498     </class>
2499
2500         <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">
2501                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2502                         <field name="active" reporter:datatype="bool"/>
2503                         <field name="create_date" reporter:datatype="timestamp"/>
2504                         <field name="creator" />
2505                         <field name="deleted" reporter:datatype="bool"/>
2506                         <field name="edit_date" reporter:datatype="timestamp"/>
2507                         <field name="editor" />
2508                         <field name="id" reporter:datatype="id" />
2509                         <field name="last_xact_id" />
2510                         <field name="marc" />
2511                         <field name="source" />
2512                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2513                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2514                         <field name="heading" />
2515                         <field name="simple_heading" />
2516                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2517                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2518                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2519                 </fields>
2520                 <links>
2521                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2522                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2523                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2524                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2525                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2526                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2527                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2528                 </links>
2529                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2530                         <actions>
2531                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2532                                 <retrieve/>
2533                                 <update permission="UPDATE_MARC" global_required="true"/>
2534                                 <delete permission="UPDATE_MARC" global_required="true"/>
2535                         </actions>
2536                 </permacrud>
2537         </class>
2538         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2539                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2540                         <field name="char_encoding" />
2541                         <field name="id" />
2542                         <field name="record" />
2543                         <field name="record_status" />
2544                         <field name="thesaurus" />
2545                 </fields>
2546                 <links>
2547                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2548                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2549                 </links>
2550         </class>
2551         <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">
2552                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2553                         <field name="id" reporter:datatype="id" />
2554                         <field name="bib" reporter:datatype="link" />
2555                         <field name="authority" reporter:datatype="link" />
2556                 </fields>
2557                 <links>
2558                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2559                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2560                 </links>
2561         </class>
2562         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2563                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2564                         <field name="id" reporter:datatype="id" />
2565                         <field name="record" reporter:datatype="link" />
2566                         <field name="atag" reporter:datatype="link" />
2567                         <field name="value" reporter:datatype="text" />
2568                 </fields>
2569                 <links>
2570                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2571                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2572                 </links>
2573         </class>
2574         <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">
2575                 <fields oils_persist:primary="code" oils_persist:sequence="">
2576                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2577                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2578                 </fields>
2579                 <links/>
2580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2581             <actions>
2582                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2583                 <retrieve/>
2584                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2585                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2586             </actions>
2587         </permacrud>
2588         </class>
2589         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2590                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2591                         <field name="accepting_usr" />
2592                         <field name="amount" reporter:datatype="money" />
2593                         <field name="amount_collected" reporter:datatype="money" />
2594                         <field name="approval_code" reporter:datatype="text"/>
2595                         <field name="cash_drawer" reporter:datatype="link"/>
2596                         <field name="cc_number" reporter:datatype="text"/>
2597                         <field name="cc_order_number" reporter:datatype="text"/>
2598                         <field name="cc_processor" reporter:datatype="text"/>
2599                         <field name="id" reporter:datatype="id" />
2600                         <field name="note" reporter:datatype="text"/>
2601                         <field name="payment_ts" reporter:datatype="timestamp"/>
2602                         <field name="xact" reporter:datatype="link"/>
2603                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2604                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2605                 </fields>
2606                 <links>
2607                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2608                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2609                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2610                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2611                 </links>
2612         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2613             <actions>
2614                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2615                     <context link="xact" jump="usr" field="home_ou"/>
2616                 </retrieve>
2617                         </actions>
2618                 </permacrud>
2619         </class>
2620         <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">
2621                 <fields oils_persist:primary="name">
2622                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2623                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2624                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2625                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2626                 </fields>
2627                 <links/>
2628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2629             <actions>
2630                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2631                 <retrieve/>
2632                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2633                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2634             </actions>
2635         </permacrud>
2636         </class>
2637
2638         <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">
2639                 <fields oils_persist:primary="alias">
2640                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2641                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2642                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2643                 </fields>
2644                 <links>
2645                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2646                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2647                 </links>
2648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2649             <actions>
2650                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2651                 <retrieve/>
2652                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2653                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2654             </actions>
2655         </permacrud>
2656         </class>
2657
2658         <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">
2659                 <fields oils_persist:primary="name">
2660                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2661                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2662                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2663                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2664                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2665                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2666                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2667                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2668                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2669                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2670                 </fields>
2671                 <links>
2672                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2673                 </links>
2674         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2675             <actions>
2676                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2677                 <retrieve/>
2678                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2679                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2680             </actions>
2681         </permacrud>
2682         </class>
2683
2684         <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">
2685                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2686                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2687                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2688                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2689                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2690                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2691                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2692                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2693                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2694                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2695                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2696                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2697                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2698                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2699                 </fields>
2700                 <links>
2701                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2702                 </links>
2703         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2704             <actions>
2705                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2706                 <retrieve/>
2707                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2708                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2709             </actions>
2710         </permacrud>
2711         </class>
2712         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2713                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2714                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2715                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2716                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2717                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2718                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2719                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2720                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2721                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2722                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2723                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2724                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2725                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2726                 </fields>
2727                 <links>
2728                 </links>
2729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2730                         <actions>
2731                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2732                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2733                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2734                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2735                         </actions>
2736                 </permacrud>
2737         </class>
2738         <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">
2739                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2740                         <field name="id" reporter:datatype="id" />
2741                         <field name="name" reporter:datatype="text"/>
2742                         <field name="xpath" reporter:datatype="text"/>
2743                         <field name="format" reporter:datatype="link"/>
2744                         <field name="first_word" reporter:datatype="bool" />
2745                 </fields>
2746                 <links/>
2747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2748             <actions>
2749                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2750                 <retrieve/>
2751                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2752                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2753             </actions>
2754         </permacrud>
2755         </class>
2756         <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">
2757                 <fields oils_persist:primary="code" oils_persist:sequence="">
2758                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2759                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2760                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2761                 </fields>
2762                 <links/>
2763         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2764             <actions>
2765                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2766                 <retrieve/>
2767                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2768                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2769             </actions>
2770         </permacrud>
2771         </class>
2772         <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">
2773                 <fields oils_persist:primary="code" oils_persist:sequence="">
2774                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2775                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2776                 </fields>
2777                 <links/>
2778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2779             <actions>
2780                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2781                 <retrieve/>
2782                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2783                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2784             </actions>
2785         </permacrud>
2786         </class>
2787     <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">
2788         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2789             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2790             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2791             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2792             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2793         </fields>
2794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2795             <actions>
2796                 <retrieve/>
2797             </actions>
2798         </permacrud>
2799     </class>
2800         <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">
2801                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2802                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2803                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2804                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2805                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2806                 </fields>
2807                 <links>
2808                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2809                 </links>
2810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2811             <actions>
2812                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2813                 <retrieve/>
2814                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2815                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2816             </actions>
2817         </permacrud>
2818         </class>
2819         <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">
2820                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2821                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2822                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2823                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2824                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2825                 </fields>
2826                 <links>
2827                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2828                 </links>
2829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2830             <actions>
2831                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2832                 <retrieve/>
2833                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2834                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2835             </actions>
2836         </permacrud>
2837         </class>
2838         <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">
2839                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2840                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2841                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2842                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2843                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2844                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2845                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2846                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2847                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2848                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2849                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2850                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2851                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2852                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2853                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2854                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2855                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2856                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2857                 </fields>
2858                 <links>
2859                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2860                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2861                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2862                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2863                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2864                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2865                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2866                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2867                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2868                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2869                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2870                 </links>
2871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2872             <actions>
2873                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2874                 <retrieve/>
2875                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2876                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2877             </actions>
2878         </permacrud>
2879         </class>
2880         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2881                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2882                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2883                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2884                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2885                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2886                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2887                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2888                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2889                 </fields>
2890                 <links>
2891                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2892                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2893         </links>
2894         </class>
2895         <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">
2896                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2897                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2898                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2899                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2900                 </fields>
2901                 <links>
2902                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2903                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2904                 </links>
2905         </class>
2906         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2907                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2908                         <field name="id" reporter:datatype="id" />
2909                         <field name="value" oils_persist:i18n="true" />
2910                 </fields>
2911                 <links/>
2912         </class>
2913         <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">
2914                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2915                         <field name="balance_owed" reporter:datatype="money" />
2916                         <field name="total_owed" reporter:datatype="money" />
2917                         <field name="total_paid" reporter:datatype="money" />
2918                         <field name="usr" reporter:datatype="link"/>
2919                 </fields>
2920                 <links>
2921                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2922         </links>
2923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2924             <actions>
2925                 <retrieve permission="VIEW_USER">
2926                     <context link="usr" field="home_ou"/>
2927                 </retrieve>
2928             </actions>
2929         </permacrud>
2930         </class>
2931         <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">
2932                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2933                         <field name="collector" />
2934                         <field name="enter_time" reporter:datatype="timestamp"/>
2935                         <field name="id" reporter:datatype="id" />
2936                         <field name="location" reporter:datatype="link"/>
2937                         <field name="usr" reporter:datatype="link"/>
2938                 </fields>
2939                 <links>
2940                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2941                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2942                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2943                 </links>
2944         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2945             <actions>
2946                 <create permission="money.collections_tracker.create" context_field="location"/>
2947                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2948                 <delete permission="money.collections_tracker.create" context_field="location"/>
2949             </actions>
2950         </permacrud>
2951         </class>
2952         <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">
2953                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2954                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2955                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2956                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2957                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2958                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2959                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2960                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2961                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2962                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2963                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2964                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2965                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2966                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2967                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2968                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2969                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2970                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2971                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2972                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2979                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2980                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2981                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2982                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2984                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2985                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2986                 </fields>
2987                 <links>
2988                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2989                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2990                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2991                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2992                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2993                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2994                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2995                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2996                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2997                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2998                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2999                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3000                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3001                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3002                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3003                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3004                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3005                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3006                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3007                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3008                 </links>
3009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3010             <actions>
3011                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3012                 <retrieve/>
3013                 <update permission="UPDATE_MARC" global_required="true"/>
3014                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
3015                 <delete permission="DELETE_RECORD" global_required="true"/>
3016             </actions>
3017         </permacrud>
3018         </class>
3019         <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">
3020                 <fields oils_persist:primary="id">
3021                         <field name="dow_0_close" />
3022                         <field name="dow_0_open" />
3023                         <field name="dow_1_close" />
3024                         <field name="dow_1_open" />
3025                         <field name="dow_2_close" />
3026                         <field name="dow_2_open" />
3027                         <field name="dow_3_close" />
3028                         <field name="dow_3_open" />
3029                         <field name="dow_4_close" />
3030                         <field name="dow_4_open" />
3031                         <field name="dow_5_close" />
3032                         <field name="dow_5_open" />
3033                         <field name="dow_6_close" />
3034                         <field name="dow_6_open" />
3035                         <field name="id" reporter:datatype="id" />
3036                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3037                 </fields>
3038                 <links>
3039                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3040                 </links>
3041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3042             <actions>
3043                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3044                 <retrieve/>
3045                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3046                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3047             </actions>
3048         </permacrud>
3049         </class>
3050         <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">
3051                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3052                         <field name="id" reporter:datatype="id" />
3053                         <field name="record" reporter:datatype="link"/>
3054                         <field name="label" reporter:datatype="text"/>
3055                         <field name="label_sortkey" reporter:datatype="text"/>
3056                         <field name="deleted" reporter:datatype="bool"/>
3057                 </fields>
3058                 <links>
3059                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3060                 </links>
3061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3062             <actions>
3063                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3064                 <retrieve/>
3065                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3066                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3067             </actions>
3068         </permacrud>
3069         </class>
3070         <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">
3071                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3072                         <field name="id" reporter:datatype="id" />
3073                         <field name="target_copy" reporter:datatype="link" />
3074                         <field name="part" reporter:datatype="link"/>
3075                 </fields>
3076                 <links>
3077                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3078                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3079                 </links>
3080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3081             <actions>
3082                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3083                 <retrieve/>
3084                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3085                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3086             </actions>
3087         </permacrud>
3088         </class>
3089         <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">
3090                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3091                         <field name="close_end" reporter:datatype="timestamp" />
3092                         <field name="close_start" reporter:datatype="timestamp" />
3093                         <field name="id" reporter:datatype="id" />
3094                         <field name="org_unit" reporter:datatype="org_unit"/>
3095                         <field name="reason" reporter:datatype="text"/>
3096                 </fields>
3097                 <links>
3098                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3099                 </links>
3100         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3101             <actions>
3102                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3103                 <retrieve/>
3104                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3105                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3106             </actions>
3107         </permacrud>
3108         </class>
3109         <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">
3110                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3111                         <field name="extended" reporter:datatype="interval"/>
3112                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3113                         <field name="max_renewals" reporter:datatype="int" />
3114                         <field name="name" reporter:datatype="text"/>
3115                         <field name="normal" reporter:datatype="interval"/>
3116                         <field name="shrt" reporter:datatype="interval"/>
3117                 </fields>
3118                 <links>
3119                 </links>
3120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3121             <actions>
3122                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3123                 <retrieve/>
3124                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3125                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3126             </actions>
3127         </permacrud>
3128         </class>
3129
3130         <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">
3131                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3132                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3133                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3134             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3135                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3136             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3137                 </fields>
3138                 <links>
3139             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3140                 </links>
3141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3142             <actions>
3143                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3144                 <retrieve/>
3145                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3146                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3147             </actions>
3148                 </permacrud>
3149         </class>
3150
3151         <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">
3152                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3153                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3154                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3155                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3156             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3157                 </fields>
3158                 <links>
3159                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3160                 </links>
3161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3162             <actions>
3163                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3164                 <retrieve/>
3165                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3166                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3167             </actions>
3168                 </permacrud>
3169         </class>
3170
3171         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3172                 <fields oils_persist:primary="id" oils_persist:sequence="">
3173                         <field name="balance_owed" reporter:datatype="money"/>
3174                         <field name="id" reporter:datatype="id" />
3175                         <field name="last_billing_note" reporter:datatype="text"/>
3176                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3177                         <field name="last_billing_type" reporter:datatype="text"/>
3178                         <field name="last_payment_note" reporter:datatype="text"/>
3179                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3180                         <field name="last_payment_type" reporter:datatype="text"/>
3181                         <field name="total_owed" reporter:datatype="money"/>
3182                         <field name="total_paid" reporter:datatype="money"/>
3183                         <field name="usr" reporter:datatype="link"/>
3184                         <field name="xact_finish" reporter:datatype="timestamp" />
3185                         <field name="xact_start" reporter:datatype="timestamp" />
3186                         <field name="xact_type" reporter:datatype="text"/>
3187                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3188                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3189                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3190                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3191                         <field name="billing_location" reporter:datatype="link"/>
3192                 </fields>
3193                 <links>
3194                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3195                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3196                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3197                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3198                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3199                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3200                 </links>
3201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3202                         <actions>
3203                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3204                                         <context link="usr" field="home_ou" />
3205                                 </retrieve>
3206                         </actions>
3207                 </permacrud>
3208         </class>
3209         <class id="au" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::user" oils_persist:tablename="actor.usr" reporter:core="true" reporter:label="ILS User">
3210                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3211                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3212                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3213                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3219                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3220                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3221                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3222                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3223                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3224                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3225                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3226                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3227                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3228                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3229                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3230                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3231                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3232                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3233                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3234                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3235                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3236                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3237                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3238                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3239                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3240                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3241                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3242                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3243                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3244                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3245                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3246                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3247                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3248                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3249                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3250                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3251                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3252                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3253                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3254                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3255                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3256                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3257                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3258                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3259                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3260                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3261                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3262                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3263                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3264                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3265                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3266                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3267                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3268                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3269                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3272                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3274                 </fields>
3275                 <links>
3276                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3277                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3278                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3279                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3280                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3281                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3282                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3283                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3284                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3285                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3286                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3287                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3288                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3289                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3290                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3291                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3292                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3293                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3294                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3295                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3296                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3297                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3298                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3299                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3300                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3301                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3302                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3303                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3304                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3305                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3306                 </links>
3307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3308                         <actions>
3309                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3310                         </actions>
3311                 </permacrud>
3312         </class>
3313         <class id="cuat" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::usr_activity_type" oils_persist:tablename="config.usr_activity_type" reporter:label="User Activity Type">
3314                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3315                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3316                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3317                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3318                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3319                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3320                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3321                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3322                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3323         </fields>
3324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3325                         <actions>
3326                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3327                                 <retrieve/>
3328                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3329                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3330                         </actions>
3331                 </permacrud>
3332         </class>
3333         <class id="auact" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_activity" oils_persist:tablename="actor.usr_activity" reporter:label="User Activity">
3334                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3335                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3336                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3337                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3338                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3339         </fields>
3340         <links>
3341                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3342                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3343                 </links>
3344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3345                         <actions>
3346                                 <retrieve permission="RUN_REPORTS">
3347                                         <context link="usr" field="home_ou" />
3348                                 </retrieve>
3349                         </actions>
3350                 </permacrud>
3351         </class>
3352         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3353                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3354                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3355                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3356                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3357                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3358                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3359                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3360         </fields>
3361         <links>
3362                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3363                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3364                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3365                 </links>
3366                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3367                         <actions>
3368                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3369                                         <context link="usr" field="home_ou" />
3370                                         <context link="ws" field="owning_lib" />
3371                                 </retrieve>
3372                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3373                                         <context link="usr" field="home_ou" />
3374                                         <context link="ws" field="owning_lib" />
3375                                 </create>
3376                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3377                                         <context link="usr" field="home_ou" />
3378                                         <context link="ws" field="owning_lib" />
3379                                 </update>
3380                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3381                                         <context link="usr" field="home_ou" />
3382                                         <context link="ws" field="owning_lib" />
3383                                 </delete>
3384                         </actions>
3385                 </permacrud>
3386         </class>
3387         <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">
3388                 <fields oils_persist:primary="name">
3389                         <field name="name" reporter:datatype="text"/>
3390                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3391                 </fields>
3392                 <links/>
3393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3394                         <actions>
3395                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3396                                 <retrieve/>
3397                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3398                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3399                         </actions>
3400                 </permacrud>
3401         </class>
3402         <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">
3403                 <fields oils_persist:primary="name">
3404                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3405                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3406                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3407                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3408                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3409                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3410                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3411                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3412                 </fields>
3413                 <links>
3414                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3415                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3416                 </links>
3417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3418                         <actions>
3419                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3420                                 <retrieve/>
3421                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3422                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3423                         </actions>
3424                 </permacrud>
3425         </class>
3426         <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">
3427                 <fields oils_persist:primary="name">
3428                         <field name="name" reporter:datatype="text"/>
3429                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3430                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3431                         <field name="datatype" reporter:datatype="text"/>
3432                         <field name="view_perm" reporter:datatype="link"/>
3433                         <field name="update_perm" reporter:datatype="link"/>
3434                         <field name="fm_class" reporter:datatype="text"/>
3435                         <field name="grp" reporter:datatype="link"/>
3436                 </fields>
3437                 <links>
3438                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3439                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3440                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3441                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3442                 </links>
3443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3444                         <actions>
3445                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3446                                 <retrieve/>
3447                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3448                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3449                         </actions>
3450                 </permacrud>
3451         </class>
3452         <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">
3453                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3454                         <field name="id" />
3455                         <field name="name"  reporter:datatype="text"/>
3456                         <field name="org_unit" reporter:datatype="org_unit"/>
3457                         <field name="value"  reporter:datatype="text"/>
3458                 </fields>
3459                 <links>
3460                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3461                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3462                 </links>
3463         </class>
3464         <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">
3465                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3466                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3467                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3468                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3469                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3470                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3471                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3472                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3473                 </fields>
3474                 <links>
3475                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3476                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3477                 </links>
3478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3479             <actions>
3480                 <create permission="CREATE_COPY_NOTE">
3481                     <context link="owning_copy" field="circ_lib"/>
3482                 </create>
3483                 <retrieve permission="VIEW_COPY_NOTES">
3484                     <context link="owning_copy" field="circ_lib"/>
3485                 </retrieve>
3486                 <update permission="UPDATE_COPY_NOTE">
3487                     <context link="owning_copy" field="circ_lib"/>
3488                 </update>
3489                 <delete permission="DELETE_COPY_NOTE">
3490                     <context link="owning_copy" field="circ_lib"/>
3491                 </delete>
3492             </actions>
3493         </permacrud>
3494         </class>
3495         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3496                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3497                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3498                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3499                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3500                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3501                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3502                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3503                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3504                 </fields>
3505                 <links>
3506                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3507                 </links>
3508         </class>
3509         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3510                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3511                         <field name="fingerprint"  reporter:datatype="text"/>
3512                         <field name="id" reporter:datatype="id" />
3513                         <field name="master_record" reporter:datatype="link"/>
3514                         <field name="mods"  reporter:datatype="text"/>
3515                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3516                 </fields>
3517                 <links>
3518                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3519                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3520                 </links>
3521         </class>
3522         <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">
3523                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3524                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3525                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3526                 </fields>
3527                 <links/>
3528         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3529             <actions>
3530                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3531                 <retrieve/>
3532                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3533                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3534             </actions>
3535         </permacrud>
3536         </class>
3537         <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">
3538                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3539                         <field name="code"  reporter:datatype="text"/>
3540                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3541                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3542                 </fields>
3543                 <links/>
3544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3545             <actions>
3546                 <create permission="CREATE_PERM" global_required="true"/>
3547                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3548                 <update permission="UPDATE_PERM" global_required="true"/>
3549                 <delete permission="DELETE_PERM" global_required="true"/>
3550             </actions>
3551         </permacrud>
3552         </class>
3553         <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">
3554                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3555                         <field name="id" reporter:datatype="id" />
3556                         <field name="metarecord" reporter:datatype="link"/>
3557                         <field name="source" reporter:datatype="link"/>
3558                 </fields>
3559                 <links>
3560                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3561                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3562                 </links>
3563         </class>
3564         <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">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3566                         <field name="id" reporter:datatype="id" />
3567                         <field name="field" reporter:datatype="link"/>
3568                         <field name="source" reporter:datatype="link"/>
3569                         <field name="value"  reporter:datatype="text"/>
3570                 </fields>
3571                 <links>
3572                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3573                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3574                 </links>
3575         </class>
3576         <class id="mbe" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry" oils_persist:tablename="metabib.browse_entry" reporter:label="Combined Browse Entry" oils_persist:readonly="true">
3577                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3578                         <field name="id" reporter:datatype="id" />
3579                         <field name="value" reporter:datatype="text"/>
3580                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3581                 </fields>
3582                 <links>
3583                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3584                 </links>
3585         </class>
3586         <class id="mbedm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_def_map" oils_persist:tablename="metabib.browse_entry_def_map" reporter:label="Combined Browse Entry Definition Map" oils_persist:readonly="true">
3587                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3588                         <field name="id" reporter:datatype="id" />
3589                         <field name="entry" reporter:datatype="link"/>
3590                         <field name="def" reporter:datatype="link"/>
3591                         <field name="source" reporter:datatype="link"/>
3592                 </fields>
3593                 <links>
3594                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3595                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3596                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3597                 </links>
3598         </class>
3599         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
3600                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3601                         <field name="id" reporter:datatype="id" />
3602                         <field name="entry" reporter:datatype="link"/>
3603                         <field name="simple_heading" reporter:datatype="link"/>
3604                 </fields>
3605                 <links>
3606                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3607                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3608                 </links>
3609         </class>
3610         <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">
3611                 <oils_persist:source_definition>
3612                         SELECT * FROM metabib.author_field_entry
3613                                                 UNION ALL
3614                         SELECT * FROM metabib.keyword_field_entry
3615                                                 UNION ALL
3616                         SELECT * FROM metabib.identifier_field_entry
3617                                                 UNION ALL
3618                         SELECT * FROM metabib.title_field_entry
3619                                                 UNION ALL
3620                         SELECT * FROM metabib.subject_field_entry
3621                                                 UNION ALL
3622                         SELECT * FROM metabib.series_field_entry
3623                 </oils_persist:source_definition>
3624                 <fields>
3625                         <field name="field" reporter:datatype="link"/>
3626                         <field name="id" reporter:datatype="id" />
3627                         <field name="source" reporter:datatype="link"/>
3628                         <field name="value"  reporter:datatype="text"/>
3629                 </fields>
3630                 <links>
3631                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3632                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3633                 </links>
3634         </class>
3635         <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">
3636                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3637                         <field name="field" reporter:datatype="link"/>
3638                         <field name="id" reporter:datatype="id" />
3639                         <field name="source" reporter:datatype="link"/>
3640                         <field name="value"  reporter:datatype="text"/>
3641                 </fields>
3642                 <links>
3643                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3644                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3645                 </links>
3646         </class>
3647         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3648                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3649                         <field name="accepting_usr" reporter:datatype="link"/>
3650                         <field name="amount" reporter:datatype="money" />
3651                         <field name="amount_collected" reporter:datatype="money" />
3652                         <field name="cash_drawer" reporter:datatype="link"/>
3653                         <field name="id" reporter:datatype="id" />
3654                         <field name="note"  reporter:datatype="text"/>
3655                         <field name="payment_ts" reporter:datatype="timestamp"/>
3656                         <field name="xact" reporter:datatype="link"/>
3657                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3658                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3659                 </fields>
3660                 <links>
3661                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3662                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3663                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3664                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3665                 </links>
3666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3667             <actions>
3668                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3669                     <context link="xact" jump="usr" field="home_ou"/>
3670                 </retrieve>
3671                         </actions>
3672                 </permacrud>
3673         </class>
3674         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3675                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3676                         <field name="accepting_usr" reporter:datatype="link"/>
3677                         <field name="amount" reporter:datatype="money" />
3678                         <field name="amount_collected" reporter:datatype="money" />
3679                         <field name="id" reporter:datatype="id" />
3680                         <field name="note"  reporter:datatype="text"/>
3681                         <field name="payment_ts" reporter:datatype="timestamp"/>
3682                         <field name="xact" reporter:datatype="link"/>
3683                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3684                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3685                 </fields>
3686                 <links>
3687                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3688                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3689                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3690                 </links>
3691         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3692             <actions>
3693                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3694                     <context link="xact" jump="usr" field="home_ou"/>
3695                 </retrieve>
3696                         </actions>
3697                 </permacrud>
3698         </class>
3699         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3700                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3701                         <field name="accepting_usr" reporter:datatype="link"/>
3702                         <field name="amount" reporter:datatype="money" />
3703                         <field name="amount_collected" reporter:datatype="money" />
3704                         <field name="id" reporter:datatype="id" />
3705                         <field name="note"  reporter:datatype="text"/>
3706                         <field name="payment_ts" reporter:datatype="timestamp"/>
3707                         <field name="xact" reporter:datatype="link"/>
3708                         <field name="billing" reporter:datatype="link"/>
3709                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3710                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3711                 </fields>
3712                 <links>
3713                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3714                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3715                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3716                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3717                 </links>
3718         </class>
3719         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3720                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3721                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3722                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3723                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3724                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3725                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3726                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3727                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3728                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3729                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3730                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3731                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3732                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3733                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3734                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3735                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3736                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3737                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3738                 </fields>
3739                 <links>
3740                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3741                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3742                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3743                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3744                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3745                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3746                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3747                 </links>
3748         </class>
3749
3750         <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">
3751                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3752                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3753                         <field name="name"  reporter:datatype="text"/>
3754                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3755                         <field name="block_list" reporter:datatype="text"/>
3756                         <field name="staff_alert" reporter:datatype="bool"/>
3757                         <field name="org_depth" reporter:datatype="int"/>
3758                         <field name="ignore_proximity" reporter:datatype="int"/>
3759                 </fields>
3760                 <links/>
3761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3762             <actions>
3763                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3764                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3765                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3766                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3767             </actions>
3768         </permacrud>
3769         </class>
3770         <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">
3771                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3772                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3773                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3774                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3775                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3776                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3777                 </fields>
3778                 <links>
3779                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3780                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3781                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3782         </links>
3783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3784             <actions>
3785                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3786                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3787                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3788                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3789             </actions>
3790         </permacrud>
3791         </class>
3792         <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">
3793                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3794                         <field name="holdable" reporter:datatype="bool"/>
3795                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3796                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3797                         <field name="opac_visible" reporter:datatype="bool"/>
3798             <field name="copy_active" reporter:datatype="bool"/>
3799             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3800                 </fields>
3801                 <links/>
3802         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3803             <actions>
3804                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3805                 <retrieve/>
3806                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3807                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3808             </actions>
3809         </permacrud>
3810         </class>
3811         <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">
3812                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3813                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3814                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3815                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3816                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3817                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3818                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3819                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3820                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3821                 </fields>
3822                 <links>
3823                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3824                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3825                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3826                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3827                 </links>
3828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3829                         <actions>
3830                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3831                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3832                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3833                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3834                         </actions>
3835                 </permacrud>
3836         </class>
3837         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3838                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3839                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3840                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3841                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3842                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3843                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3844                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3845                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3846                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3847                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3848                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3849                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3850                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3851                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3852                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3853                 </fields>
3854                 <links>
3855                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3856                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3857                 </links>
3858         </class>
3859         <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">
3860                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3861                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3862                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3863                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3864                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3865                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3866                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3867                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3868                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3869                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3870                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3871                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3872                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3873                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3874                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3875                 </fields>
3876                 <links>
3877                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3878                 </links>
3879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3880                         <actions>
3881                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3882                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3883                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3884                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3885                         </actions>
3886                 </permacrud>
3887         </class>
3888
3889
3890         <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">
3891                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3892                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3893                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3894                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3895                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3896                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3897                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3898                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3899                 </fields>
3900                 <links>
3901                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3902                 </links>
3903         </class>
3904
3905         <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">
3906                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3907                         <field name="call_number" />
3908                         <field name="create_date" reporter:datatype="timestamp"/>
3909                         <field name="creator" reporter:datatype="link"/>
3910                         <field name="id" reporter:datatype="id" />
3911                         <field name="pub" reporter:datatype="bool"/>
3912                         <field name="title"  reporter:datatype="text"/>
3913                         <field name="value"  reporter:datatype="text"/>
3914                 </fields>
3915                 <links>
3916                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3917                 </links>
3918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3919             <actions>
3920                 <create permission="CREATE_VOLUME_NOTE">
3921                     <context link="call_number" field="owning_lib"/>
3922                 </create>
3923                 <retrieve permission="VIEW_VOLUME_NOTES">
3924                     <context link="call_number" field="owning_lib"/>
3925                 </retrieve>
3926                 <update permission="UPDATE_VOLUME_NOTE">
3927                     <context link="call_number" field="owning_lib"/>
3928                 </update>
3929                 <delete permission="DELETE_VOLUME_NOTE">
3930                     <context link="call_number" field="owning_lib"/>
3931                 </delete>
3932             </actions>
3933         </permacrud>
3934         </class>
3935         <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">
3936                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3937                         <field name="create_date" reporter:datatype="timestamp"/>
3938                         <field name="creator" reporter:datatype="link"/>
3939                         <field name="edit_date" reporter:datatype="timestamp"/>
3940                         <field name="editor" reporter:datatype="link"/>
3941                         <field name="id" reporter:datatype="id" />
3942                         <field name="record" reporter:datatype="link"/>
3943                         <field name="value" reporter:datatype="text"/>
3944                 </fields>
3945                 <links>
3946                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3947                 </links>
3948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3949             <actions>
3950                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3951                 <retrieve/>
3952                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3953                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3954             </actions>
3955         </permacrud>
3956         </class>
3957         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3958         <oils_persist:source_definition>
3959 SELECT  usr,
3960         SUM(
3961             CASE
3962                 WHEN (
3963                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3964                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3965                 ) THEN 1
3966                 ELSE 0
3967             END
3968         ) AS out,
3969
3970         SUM(
3971             CASE
3972                 WHEN (
3973                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3974                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3975                 ) THEN 1
3976                 ELSE 0
3977             END
3978         ) AS overdue,
3979
3980         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3981         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3982         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3983   FROM  action.circulation
3984   WHERE checkin_time IS NULL
3985   GROUP BY 1
3986         </oils_persist:source_definition>
3987         <fields oils_persist:primary="usr">
3988             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3989             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3990             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3991             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3992             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3993             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3994         </fields>
3995         <links>
3996             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3997         </links>
3998         </class>
3999         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4000         <oils_persist:source_definition>
4001 SELECT  usr,
4002         STRING_AGG(
4003             CASE
4004                 WHEN (
4005                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4006                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4007                 ) THEN id::TEXT
4008                 ELSE '0'
4009             END
4010         ,',') AS out,
4011
4012         STRING_AGG(
4013             CASE
4014                 WHEN (
4015                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4016                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4017                 ) THEN id::TEXT
4018                 ELSE '0'
4019             END
4020         ,',') AS overdue,
4021
4022         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4023         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4024         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4025   FROM  action.circulation
4026   WHERE checkin_time IS NULL
4027   GROUP BY 1
4028         </oils_persist:source_definition>
4029         <fields oils_persist:primary="usr">
4030             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4031             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4032             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4033             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4034             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4035             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4036         </fields>
4037         <links>
4038             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4039         </links>
4040         </class>
4041         <class id="circ" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circulation" oils_persist:tablename="action.circulation" reporter:core="true" reporter:label="Circulation">
4042                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4043                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4044                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4045                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4046                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4047                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4048                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4049                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4050                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4051                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4052                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4053                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4054                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4055                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4056                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4057                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4058                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4059                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4060                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4061                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4062                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4063                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4064                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4065                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4066                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4067                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4068                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4069                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4070                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4071                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4072                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4073                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4075                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4076                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4077                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4078                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4079                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4080                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4081                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4082                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4083                 </fields>
4084                 <links>
4085                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4086                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4087                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4088                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4089                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4090                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4091                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4092                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4093                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4094                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4095                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4096                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4097                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4098                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4099                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4100                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4101                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4102                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4103                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4104                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4105                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4106                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4107                 </links>
4108                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4109                         <actions>
4110                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4111                         </actions>
4112                 </permacrud>
4113         </class>
4114         <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">
4115                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4116                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4117                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4118                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4119                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4120                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4121                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4122                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4123                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4124                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4125                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4126                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4127                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4128                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4129                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4130                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4131                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4132                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4133                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4134                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4135                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4136                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4137                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4138                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4139                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4140                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4141                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4142                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4143                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4144                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4145                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4146                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4147                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4148                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4149                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4150                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4151                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4152                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4153                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4154                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4155                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4156                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4157                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4158                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4159                 </fields>
4160                 <links>
4161                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4162                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4163                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4164                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4165                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4166                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4167                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4168                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4169                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4170                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4171                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4172                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4173                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4174                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4175                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4176                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4177                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4178                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4179                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4180                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4181                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4182                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4183                 </links>
4184         </class>
4185         <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">
4186                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4187                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4188                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4189                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4190                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4191                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4192                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4193                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4194                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4195                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4196                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4197                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4198                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4199                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4200                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4201                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4202                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4203                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4204                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4205                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4206                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4207                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4208                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4209                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4210                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4211                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4212                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4213                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4214                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4215                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4216                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4217                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4218                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4219                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4220                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4221                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4222                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4223                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4224                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4225                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4226                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4227                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4228                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4229                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4230                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4231                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4232                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4233                 </fields>
4234                 <links>
4235                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4236                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4237                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4238                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4239                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4240                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4241                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4242                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4243                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4244                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4245                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4246                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4247                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4248                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4249                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4250                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4251                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4252                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4253                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4254                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4255                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4256                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4257                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4258                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4259                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4260                 </links>
4261         </class>
4262
4263         <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">
4264                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4265                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4266                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4267                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4268                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4269                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4270                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4271                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4272                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4273                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4274                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4275                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4276                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4277                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4278                 </fields>
4279                 <links>
4280                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4281                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4282                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4283                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4284                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4285                 </links>
4286                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4287                         <actions>
4288                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4289                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4290                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4291                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4292                         </actions>
4293                 </permacrud>
4294         </class>
4295
4296         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4297                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4298                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4299                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4300                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4301                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4302                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4303                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4304                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4305                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4306                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4307                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4308                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4309                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4310                 </fields>
4311                 <links>
4312                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4313                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4314                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4315                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4316                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4317                 </links>
4318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4319                         <actions>
4320                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4321                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4322                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4323                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4324                         </actions>
4325                 </permacrud>
4326         </class>
4327         
4328         <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">
4329                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4330                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4331                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4332                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4333                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4334                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4335                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4336                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4337                 </fields>
4338                 <links>
4339                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4340                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4341                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4342                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4343                 </links>
4344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4345                         <actions>
4346                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4347                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4348                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4349                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4350                         </actions>
4351                 </permacrud>
4352         </class>
4353         
4354         <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">
4355                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4356                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4357                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4358                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4359                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4360                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4361                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4362                 </fields>
4363                 <links>
4364                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4365                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4366                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4367                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4368                 </links>
4369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4370                         <actions>
4371                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4372                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4373                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4374                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4375                         </actions>
4376                 </permacrud>
4377         </class>
4378         
4379         <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">
4380                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4381                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4382                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4383                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4384                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4385                 </fields>
4386                 <links>
4387                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4388                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4389                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4390                 </links>
4391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4392                         <actions>
4393                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4394                     <context link="resource" field="owner" />
4395                 </create>
4396                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4397                     <context link="resource" field="owner" />
4398                 </retrieve>
4399                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4400                     <context link="resource" field="owner" />
4401                 </update>
4402                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4403                     <context link="resource" field="owner" />
4404                 </delete>
4405                         </actions>
4406                 </permacrud>
4407         </class>
4408         
4409         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4410                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4411                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4412                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4413                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4414                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4415                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4416                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4417                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4419                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4420                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4421                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4422                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4423                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4424                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4425                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4426                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4427                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4428                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4429                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4430                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4431                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4432                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4433                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4434                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4435                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4436                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4437                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4438                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4439                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4440                 </fields>
4441                 <links>
4442                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4443                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4444                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4445                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4446                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4447                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4448                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4449                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4450                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4451                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4452                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4453                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4454                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4455                 </links>
4456                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4457                         <actions>
4458                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4459                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4460                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4461                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4462                         </actions>
4463                 </permacrud>
4464         </class>
4465         
4466         <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">
4467                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4468                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4469                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4470                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4471                 </fields>
4472                 <links>
4473                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4474                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4475                 </links>
4476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4477                         <actions>
4478                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4479                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4480                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4481                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4482                         </actions>
4483                 </permacrud>
4484         </class>
4485
4486         <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">
4487                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4488                         <field name="bucket" reporter:datatype="link"/>
4489                         <field name="id" reporter:datatype="id" />
4490                         <field name="target_call_number" reporter:datatype="link" />
4491                         <field name="create_time" reporter:datatype="timestamp" />
4492                         <field name="pos" reporter:datatype="int" />
4493                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4494                 </fields>
4495                 <links>
4496                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4497                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4498             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4499                 </links>
4500         </class>
4501         <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">
4502                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4503                         <field name="id" reporter:datatype="id" />
4504                         <field name="item" reporter:datatype="link"/>
4505                         <field name="note" reporter:datatype="text" />
4506                 </fields>
4507                 <links>
4508                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4509                 </links>
4510         </class>
4511         <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">
4512                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4513                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4514                         <field name="btype" reporter:datatype="text"/>
4515                         <field name="id" reporter:datatype="id" />
4516                         <field name="name" reporter:datatype="text"/>
4517                         <field name="description" reporter:datatype="text"/>
4518                         <field name="owner" reporter:datatype="link"/>
4519                         <field name="pub" reporter:datatype="bool"/>
4520                         <field name="create_time" reporter:datatype="timestamp" />
4521                 </fields>
4522                 <links>
4523                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4524                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4525                 </links>
4526         </class>
4527         <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">
4528                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4529                         <field name="id" reporter:datatype="id" />
4530                         <field name="bucket" reporter:datatype="link"/>
4531                         <field name="note" reporter:datatype="text" />
4532                 </fields>
4533                 <links>
4534                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4535                 </links>
4536         </class>
4537         <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">
4538                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4539                         <field name="hold" reporter:datatype="link"/>
4540                         <field name="id" reporter:datatype="id" />
4541                         <field name="target_copy" reporter:datatype="link"/>
4542                         <field name="proximity" reporter:datatype="number"/>
4543                 </fields>
4544                 <links>
4545                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4546                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4547                 </links>
4548         </class>
4549         <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4550                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4551                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4552                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4553                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4554                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4555                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4556                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4557                 </fields>
4558                 <links>
4559                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4560                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4561                 </links>
4562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4563             <actions>
4564                 <create permission="CREATE_HOLD_NOTIFICATION">
4565                                         <context link="hold" jump="usr" field="home_ou" />
4566                                 </create>
4567                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4568                                         <context link="hold" jump="usr" field="home_ou" />
4569                                 </retrieve>
4570                 <update permission="CREATE_HOLD_NOTIFICATION">
4571                                         <context link="hold" jump="usr" field="home_ou" />
4572                                 </update>
4573                 <delete permission="CREATE_HOLD_NOTIFICATION">
4574                                         <context link="hold" jump="usr" field="home_ou" />
4575                                 </delete>
4576             </actions>
4577         </permacrud>
4578         </class>
4579         <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"  oils_persist:field_safe="true">
4580                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4581                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4582                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4583                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4584                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4585                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4586                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4587                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4588                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4589                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4590                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4591                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4592                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4593                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4594                 </fields>
4595                 <links>
4596                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4597                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4598                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4599                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4600                 </links>
4601         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4602             <actions>
4603                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4604                 <retrieve/>
4605                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4606                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4607             </actions>
4608         </permacrud>
4609         </class>
4610         <class id="acplg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group" oils_persist:tablename="asset.copy_location_group" reporter:label="Copy/Shelving Location Group">
4611                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4612                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4613                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4614                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4615                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4616             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4617             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4618             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4619                 </fields>
4620                 <links>
4621                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4622                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4623                 </links>
4624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4625             <actions>
4626                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4627                 <retrieve/>
4628                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4629                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4630             </actions>
4631         </permacrud>
4632         </class>
4633         <class id="acplgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location_group_map" oils_persist:tablename="asset.copy_location_group_map" reporter:label="Copy/Shelving Location Group Map">
4634                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4635                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4636             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4637             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4638                 </fields>
4639                 <links>
4640                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4641                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4642                 </links>
4643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4644             <actions>
4645                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4646                                         <context link="lgroup" field="owner" />
4647                 </create>
4648                 <retrieve/>
4649                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4650                                         <context link="lgroup" field="owner" />
4651                 </update>
4652                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4653                                         <context link="lgroup" field="owner" />
4654                 </delete>
4655             </actions>
4656         </permacrud>
4657         </class>
4658
4659     <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">
4660         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4661             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4662             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4663             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4664             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4665         </fields>
4666         <links>
4667             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4668             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4669         </links>
4670         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4671             <actions>
4672                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4673                 <retrieve/>
4674                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4675                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4676             </actions>
4677         </permacrud>
4678     </class>
4679
4680         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4681                 <fields>
4682                         <field name="sre_id" oils_persist:virtual="true" />
4683                         <field name="location" oils_persist:virtual="true" />
4684                         <field name="owning_lib" oils_persist:virtual="true" />
4685                         <field name="basic_holdings" oils_persist:virtual="true" />
4686                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4687                         <field name="supplement_holdings" oils_persist:virtual="true" />
4688                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4689                         <field name="index_holdings" oils_persist:virtual="true" />
4690                         <field name="index_holdings_add" oils_persist:virtual="true" />
4691                         <field name="online" oils_persist:virtual="true" />
4692                         <field name="missing" oils_persist:virtual="true" />
4693                         <field name="incomplete" oils_persist:virtual="true" />
4694                 </fields>
4695         </class>
4696
4697         <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">
4698                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4699                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4700                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4701                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4702                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4703                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4704                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4705                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4706                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4707                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4708                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4709                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4710                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4711                 </fields>
4712                 <links>
4713                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4714                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4715                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4716                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4717                 </links>
4718                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4719                         <actions>
4720                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4721                                 <retrieve/>
4722                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4723                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4724                         </actions>
4725                 </permacrud>
4726         </class>
4727
4728         <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">
4729                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4730                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4731                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4732                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4733                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4734                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4735                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4736                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4737                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4738                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4739                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4740                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4741                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4742                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4743                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4744                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4745                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4746                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4747                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4748                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4749                 </fields>
4750                 <links>
4751                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4752                 </links>
4753                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4754                         <actions>
4755                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4756                                         <context link="subscription" field="owning_lib" />
4757                                 </create>
4758                                 <retrieve />
4759                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4760                                         <context link="subscription" field="owning_lib" />
4761                                 </update>
4762                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4763                                         <context link="subscription" field="owning_lib" />
4764                                 </delete>
4765                         </actions>
4766                 </permacrud>
4767         </class>
4768
4769         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4770                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4771                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4772                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4773                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4774                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4775                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4776                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4777                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4778                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4779                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4780                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4781                 </fields>
4782                 <links>
4783                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4784                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4785                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4786                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4787                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4788                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4789                 </links>
4790                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4791                         <actions>
4792                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4793                                 <retrieve />
4794                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4795                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4796                         </actions>
4797                 </permacrud>
4798         </class>
4799
4800         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4801                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4802                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4803                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4804                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4805                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4806                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4807                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4808                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4809                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4810                 </fields>
4811                 <links>
4812                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4813                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4814                 </links>
4815         </class>
4816
4817         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4818                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4819                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4820                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4821                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4822                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4823                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4824                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4825                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4826                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4827                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4828                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4829                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4830                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4831                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4832                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4833                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4834                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4835                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4836                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4837                 </fields>
4838                 <links>
4839                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4840                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4841                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4842                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4843                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4844                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4845                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4846                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4847                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4848                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4849                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4850                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4851                 </links>
4852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4853                         <actions>
4854                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4855                                 <retrieve />
4856                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4857                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4858                         </actions>
4859                 </permacrud>
4860         </class>
4861
4862         <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">
4863                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4864                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4865                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4866                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4867                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4868                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4869                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4870                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4871                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4872                 </fields>
4873                 <links>
4874                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4875                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4876                 </links>
4877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4878                         <actions>
4879                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4880                                         <context link="distribution" field="holding_lib" />
4881                                 </create>
4882                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4883                                         <context link="distribution" field="holding_lib" />
4884                                 </retrieve>
4885                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4886                                         <context link="distribution" field="holding_lib" />
4887                                 </update>
4888                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4889                                         <context link="distribution" field="holding_lib" />
4890                                 </delete>
4891                         </actions>
4892                 </permacrud>
4893         </class>
4894
4895         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4896                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4897                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4898                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4899                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4900                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4901                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4902                 </fields>
4903                 <links>
4904                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4905                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4906                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4907                 </links>
4908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4909                         <actions>
4910                                 <create permission="ADMIN_SERIAL_STREAM">
4911                                         <context link="distribution" field="holding_lib" />
4912                                 </create>
4913                                 <retrieve />
4914                                 <update permission="ADMIN_SERIAL_STREAM">
4915                                         <context link="distribution" field="holding_lib" />
4916                                 </update>
4917                                 <delete permission="ADMIN_SERIAL_STREAM">
4918                                         <context link="distribution" field="holding_lib" />
4919                                 </delete>
4920                         </actions>
4921                 </permacrud>
4922         </class>
4923
4924         <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">
4925                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4926                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4927                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4928                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4929                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4930                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4931                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4932                 </fields>
4933                 <links>
4934                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4935                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4936                 </links>
4937                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4938                         <actions>
4939                                 <create permission="ADMIN_SERIAL_STREAM">
4940                                         <context link="stream" jump="distribution" field="holding_lib" />
4941                                 </create>
4942                                 <retrieve permission="RECEIVE_SERIAL">
4943                                         <context link="stream" jump="distribution" field="holding_lib" />
4944                                 </retrieve>
4945                                 <update permission="ADMIN_SERIAL_STREAM">
4946                                         <context link="stream" jump="distribution" field="holding_lib" />
4947                                 </update>
4948                                 <delete permission="ADMIN_SERIAL_STREAM">
4949                                         <context link="stream" jump="distribution" field="holding_lib" />
4950                                 </delete>
4951                         </actions>
4952                 </permacrud>
4953         </class>
4954
4955         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4956                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4957                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4958                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4959                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4960                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4961                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4962                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4963                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4964                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4965                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4966                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4967                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4968                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4969                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4970                 </fields>
4971                 <links>
4972                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4973                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4974                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4975                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4976                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4977                 </links>
4978                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4979                         <actions>
4980                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4981                                         <context link="subscription" field="owning_lib" />
4982                                 </create>
4983                                 <retrieve/>
4984                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4985                                         <context link="subscription" field="owning_lib" />
4986                                 </update>
4987                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4988                                         <context link="subscription" field="owning_lib" />
4989                                 </delete>
4990                         </actions>
4991                 </permacrud>
4992         </class>
4993
4994         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4995                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4996                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4997                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4998                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4999                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5000                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5001                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5002                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5003                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5004                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5005                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5006                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5007                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5008                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5009                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5010                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5011                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5012                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5013                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5014                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5015                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5016                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5017                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5018                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5019                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5020                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5021                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5022                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5023                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5024                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5025                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5026                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5027                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5028                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5029                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5030                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5031                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5032                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5033                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5034                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5035                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5036                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5037                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5038                 </fields>
5039                 <links>
5040                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5041                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5042                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5043                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5044                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5045                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5046                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5047                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5048                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5049                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5050                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5051                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5052                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5053                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5054                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5055                 </links>
5056                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5057                         <actions>
5058                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5059                                 <retrieve/>
5060                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5061                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5062                         </actions>
5063                 </permacrud>
5064         </class>
5065
5066         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5067                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5068                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5069                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5070                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5071                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5072                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5073                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5074                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5075                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5076                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5077                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5078                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5079                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5080                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5081                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5082                 </fields>
5083                 <links>
5084                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5085                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5086                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5087                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5088                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5089                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5090                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5091                 </links>
5092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5093                         <actions>
5094                                 <create permission="ADMIN_SERIAL_ITEM">
5095                                         <context link="stream" jump="distribution" field="holding_lib" />
5096                                 </create>
5097                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5098                                         <context link="stream" jump="distribution" field="holding_lib" />
5099                                 </retrieve>
5100                                 <update permission="ADMIN_SERIAL_ITEM">
5101                                         <context link="stream" jump="distribution" field="holding_lib" />
5102                                 </update>
5103                                 <delete permission="ADMIN_SERIAL_ITEM">
5104                                         <context link="stream" jump="distribution" field="holding_lib" />
5105                                 </delete>
5106                         </actions>
5107                 </permacrud>
5108         </class>
5109
5110         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5111                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5112                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5113                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5114                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5115                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5116                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5117                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5118                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5119                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5120                 </fields>
5121                 <links>
5122                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5123                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5124                 </links>
5125                 <!-- Not available via PCRUD at this time -->
5126         </class>
5127         <class id="sasum" controller="open-ils.cstore" oils_obj:fieldmapper="serial::any_summary" oils_persist:tablename="serial.any_summary" reporter:label="All Issues' Summaries" oils_persist:readonly="true">
5128                 <fields>
5129                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5130                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5131                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5132                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5133                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5134                 </fields>
5135                 <links>
5136                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5137                 </links>
5138         </class>
5139         <class id="smhc" controller="open-ils.cstore" oils_obj:fieldmapper="serial::materialized_holding_code" oils_persist:tablename="serial.materialized_holding_code" reporter:label="Materialized Holding Code" oils_persist:readonly="true">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5141                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5142                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5143                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5144                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5145                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5146                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5147                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5148                 </fields>
5149                 <links>
5150                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5151                 </links>
5152         </class>
5153         <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">
5154                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5155                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5156                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5157                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5158                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5159                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5160                 </fields>
5161                 <links>
5162                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5163                 </links>
5164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5165                         <actions>
5166                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5167                                         <context link="distribution" field="holding_lib" />
5168                                 </create>
5169                                 <retrieve/>
5170                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5171                                         <context link="distribution" field="holding_lib" />
5172                                 </update>
5173                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5174                                         <context link="distribution" field="holding_lib" />
5175                                 </delete>
5176                         </actions>
5177                 </permacrud>
5178         </class>
5179
5180         <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">
5181                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5182                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5183                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5184                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5185                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5186                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5187                 </fields>
5188                 <links>
5189                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5190                 </links>
5191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5192                         <actions>
5193                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5194                                         <context link="distribution" field="holding_lib" />
5195                                 </create>
5196                                 <retrieve/>
5197                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5198                                         <context link="distribution" field="holding_lib" />
5199                                 </update>
5200                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5201                                         <context link="distribution" field="holding_lib" />
5202                                 </delete>
5203                         </actions>
5204                 </permacrud>
5205         </class>
5206
5207         <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">
5208                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5209                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5210                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5211                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5212                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5213                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5214                 </fields>
5215                 <links>
5216                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5217                 </links>
5218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5219                         <actions>
5220                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5221                                         <context link="distribution" field="holding_lib" />
5222                                 </create>
5223                                 <retrieve/>
5224                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5225                                         <context link="distribution" field="holding_lib" />
5226                                 </update>
5227                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5228                                         <context link="distribution" field="holding_lib" />
5229                                 </delete>
5230                         </actions>
5231                 </permacrud>
5232         </class>
5233
5234         <class id="ascecm" controller="open-ils.cstore open-ils.pcrud" 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">
5235                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5236                         <field name="id" reporter:datatype="id" />
5237                         <field name="owning_copy" reporter:datatype="link"/>
5238                         <field name="stat_cat" reporter:datatype="link"/>
5239                         <field name="stat_cat_entry" reporter:datatype="link"/>
5240                 </fields>
5241                 <links>
5242                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5243                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5244                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5245                 </links>
5246                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5247                         <actions>
5248                                 <retrieve/>
5249                         </actions>
5250                 </permacrud>
5251         </class>
5252         <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">
5253                 <fields oils_persist:primary="code">
5254                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5255                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5256                 </fields>
5257                 <links/>
5258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5259             <actions>
5260                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5261                 <retrieve/>
5262                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5263                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5264             </actions>
5265         </permacrud>
5266         </class>
5267         <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">
5268                 <fields oils_persist:primary="code">
5269                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5270                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5271                 </fields>
5272                 <links/>
5273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5274             <actions>
5275                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5276                 <retrieve/>
5277                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5278                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5279             </actions>
5280         </permacrud>
5281         </class>
5282         <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">
5283                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5284                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5285                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5286                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5287                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5288                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5289                 </fields>
5290                 <links>
5291             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5292         </links>
5293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5294             <actions>
5295                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5296                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5297                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5298                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5299             </actions>
5300         </permacrud>
5301         </class>
5302         <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">
5303                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5304                         <field name="id" reporter:datatype="id" />
5305                         <field name="name" reporter:datatype="text"/>
5306                 </fields>
5307                 <links/>
5308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5309             <actions>
5310                 <create permission="CREATE_LASSO" global_required="true"/>
5311                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5312                 <update permission="UPDATE_LASSO" global_required="true"/>
5313                 <delete permission="DELETE_LASSO" global_required="true"/>
5314             </actions>
5315         </permacrud>
5316         </class>
5317         <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">
5318                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5319                         <field name="id" reporter:datatype="id" />
5320                         <field name="lasso" reporter:datatype="link"/>
5321                         <field name="org_unit" reporter:datatype="org_unit"/>
5322                 </fields>
5323                 <links>
5324                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5325                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5326                 </links>
5327         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5328             <actions>
5329                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5330                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5331                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5332                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5333             </actions>
5334         </permacrud>
5335         </class>
5336         <class id="aoupa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_proximity_adjustment" oils_persist:tablename="actor.org_unit_proximity_adjustment" reporter:label="Org Unit Proximity Adjustment">
5337                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5338                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5339                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5340                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5341                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5342                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5343                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5344                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5345                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5346                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5347                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5348                 </fields>
5349                 <links>
5350                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5351                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5352                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5353                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5354                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5355                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5356                 </links>
5357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5358             <actions>
5359                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5360                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5361                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5362                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5363             </actions>
5364         </permacrud>
5365         </class>
5366         <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">
5367                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5368                         <field name="id" reporter:datatype="id" />
5369                         <field name="from_org" reporter:datatype="org_unit"/>
5370                         <field name="to_org" reporter:datatype="org_unit"/>
5371                         <field name="prox" reporter:datatype="int" />
5372                 </fields>
5373                 <links>
5374                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5375                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5376                 </links>
5377         </class>
5378         <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">
5379                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5380                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5381                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5382                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5383                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5384                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5385                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5386                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5387                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5388                 </fields>
5389                 <links/>
5390         </class>
5391         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5392                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5393                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5394                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5395                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5396                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5397                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5398                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5399                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5400                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5401                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5402                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5403                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5404                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5405                 </fields>
5406                 <links>
5407                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5408                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5409                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5410                 </links>
5411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5412             <actions>
5413                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5414                 <retrieve/>
5415                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5416                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5417             </actions>
5418         </permacrud>
5419         </class>
5420         <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">
5421                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5422                         <field name="address_type"  reporter:datatype="text"/>
5423                         <field name="city"  reporter:datatype="text"/>
5424                         <field name="country"  reporter:datatype="text"/>
5425                         <field name="county"  reporter:datatype="text"/>
5426                         <field name="id" reporter:datatype="id" />
5427                         <field name="org_unit" reporter:datatype="org_unit"/>
5428                         <field name="post_code"  reporter:datatype="text"/>
5429                         <field name="state"  reporter:datatype="text"/>
5430                         <field name="street1"  reporter:datatype="text"/>
5431                         <field name="street2"  reporter:datatype="text"/>
5432                         <field name="valid" reporter:datatype="bool"/>
5433                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5434                 </fields>
5435                 <links>
5436                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5437                 </links>
5438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5439             <actions>
5440                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5441                 <retrieve/>
5442                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5443                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5444             </actions>
5445         </permacrud>
5446         </class>
5447         <class id="asq" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_query" oils_persist:tablename="actor.search_query" reporter:label="Search Query" oils_persist:field_safe="true">
5448                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5449                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5450                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5451                         <field name="query_text" reporter:datatype="text"/>
5452                 </fields>
5453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5454             <actions>
5455                 <retrieve/>
5456             </actions>
5457         </permacrud>
5458         </class>
5459
5460         <class id="asfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group" oils_persist:tablename="actor.search_filter_group" reporter:label="Search Filter Group" oils_persist:field_safe="true">
5461                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5462                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5463                         <field name="owner" reporter:datatype="org_unit"/>
5464                         <field name="code" reporter:datatype="text"/>
5465                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5466                         <field name="create_date" reporter:datatype="timestamp"/>
5467                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5468                 </fields>
5469                 <links>
5470                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5471                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5472                 </links>
5473         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5474             <actions>
5475                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5476                 <retrieve/>
5477                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5478                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5479             </actions>
5480         </permacrud>
5481         </class>
5482         <class id="asfge" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::search_filter_group_entry" oils_persist:tablename="actor.search_filter_group_entry" reporter:label="Search Filter Group Entry" oils_persist:field_safe="true">
5483                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5484                         <field name="id" reporter:datatype="id"/>
5485                         <field name="grp" reporter:datatype="link"/>
5486                         <field name="pos" reporter:datatype="int"/>
5487                         <field name="query" reporter:datatype="link"/>
5488                 </fields>
5489                 <links>
5490                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5491                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5492                 </links>
5493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5494             <actions>
5495                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5496                     <context link="grp" field="owner"/>
5497                 </create>
5498                 <retrieve/>
5499                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5500                     <context link="grp" field="owner"/>
5501                 </update>
5502                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5503                     <context link="grp" field="owner"/>
5504                 </delete>
5505             </actions>
5506         </permacrud>
5507         </class>
5508
5509         <!-- A note: Please update alhr and ahopl when updating ahr -->
5510         <class id="ahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_request" oils_persist:tablename="action.hold_request" reporter:core="true" reporter:label="Hold Request">
5511                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5512                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5513                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5514                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5515                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5516                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5517                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5518                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5519                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5520                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5521                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5522                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5523                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5524                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5525                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5526                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5527                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5528                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5529                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5530                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5531                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5532                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5533                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5534                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5535                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5536                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5537                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5538                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5539                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5540                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5541                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5542                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5543                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5544                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5545                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5546                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5547                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5548                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5549                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5550                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5551                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5552                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5553                 </fields>
5554                 <links>
5555                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5556                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5557                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5558                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5559                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5560                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5561                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5562                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5563                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5564                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5565                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5566                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5567                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5568                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5569                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5570                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5571                 </links>
5572                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5573                         <actions>
5574                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5575                         </actions>
5576                 </permacrud>
5577         </class>
5578         <class id="ahopl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_on_pull_list" reporter:label="Hold On Pull List" oils_persist:readonly="true">
5579                 <oils_persist:source_definition><![CDATA[
5580                 SELECT
5581                         ahr.*,
5582                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5583                                 copy_location_order_position,
5584                         CASE WHEN au.alias IS NOT NULL THEN
5585                                 au.alias
5586                         ELSE
5587                                 au.first_given_name
5588                         END AS usr_alias_or_first_given_name,
5589                         au.first_given_name AS usr_first_given_name,
5590                         au.second_given_name AS usr_second_given_name,
5591                         au.family_name AS usr_family_name,
5592                         au.prefix AS usr_prefix,
5593                         au.suffix AS usr_suffix,
5594                         au.alias AS usr_alias,
5595                         CASE WHEN au.alias IS NOT NULL THEN
5596                                 au.alias
5597                         ELSE
5598                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5599                                         COALESCE(au.family_name, ''),
5600                                         COALESCE(au.suffix, ''),
5601                                         ', ',
5602                                         COALESCE(au.prefix, ''),
5603                                         COALESCE(au.first_given_name, ''),
5604                                         COALESCE(au.second_given_name, '')
5605                                 ], ' '), E'\\s+,', ',')
5606                         END AS usr_alias_or_display_name,
5607                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5608                                 COALESCE(au.family_name, ''),
5609                                 COALESCE(au.suffix, ''),
5610                                 ', ',
5611                                 COALESCE(au.prefix, ''),
5612                                 COALESCE(au.first_given_name, ''),
5613                                 COALESCE(au.second_given_name, '')
5614                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5615                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5616                                 AS call_number_label,
5617                         siss.label AS issuance_label,
5618                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5619                         ahcm_1.copy_count AS potential_copies
5620                 FROM action.hold_request ahr
5621                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5622                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5623                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5624                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5625                 JOIN actor.usr au ON (au.id = ahr.usr)
5626                 JOIN (
5627                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5628                         FROM asset.copy_location
5629                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5630                 LEFT JOIN actor.usr_standing_penalty ausp 
5631                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5632                 LEFT JOIN config.standing_penalty csp
5633                         ON (
5634                                 csp.id = ausp.standing_penalty AND 
5635                                 csp.block_list LIKE '%CAPTURE%' AND (
5636                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5637                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5638                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5639                                         )
5640                                 )
5641                         )
5642                 JOIN (
5643                         SELECT COUNT(target_copy) AS copy_count, hold
5644                         FROM action.hold_copy_map
5645                         GROUP BY 2
5646                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5647                 LEFT JOIN serial.issuance siss
5648                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5649                 LEFT JOIN asset.copy_location_order acplo
5650                         ON (acp.location = acplo.location AND
5651                                 acp.circ_lib = acplo.org)
5652                 WHERE
5653                         ahr.capture_time IS NULL AND
5654                         ahr.cancel_time IS NULL AND
5655                         csp.id IS NULL AND
5656                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5657                         acp.status IN (0,7)
5658                 ]]></oils_persist:source_definition>
5659                 <fields oils_persist:primary="id">
5660                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5661                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5662                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5663                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5664                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5665                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5666                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5667                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5668                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5669                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5670                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5671                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5672                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5673                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5674                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5675                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5676                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5677                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5678                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5679                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5680                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5681                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5682                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5683                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5684                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5685                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5686                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5687                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5688                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5689                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5690                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5691                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5692                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5693                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5694                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5695                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5696                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5697                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5698                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5699                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5700                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5701                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5702                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5703                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5704                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5705                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5706                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5707                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5708                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5709                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5710                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5711                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5712                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5713                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5714                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5715                 </fields>
5716                 <links>
5717                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5718                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5719                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5720                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5721                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5722                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5723                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5724                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5725                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5726                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5727                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5728                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5729                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5730                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5731                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5732                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5733                 </links>
5734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5735                         <actions>
5736                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5737                         </actions>
5738                 </permacrud>
5739         </class>
5740         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5741                 <oils_persist:source_definition>
5742                         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)
5743                 </oils_persist:source_definition>
5744                 <fields oils_persist:primary="id">
5745                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5746                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5747                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5748                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5749                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5750                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5751                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5752                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5753                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5754                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5755                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5756                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5757                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5758                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5759                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5760                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5761                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5762                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5763                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5764                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5765                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5766                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5767                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5768                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5769                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5770                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5771                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5772                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5773                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5774                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5775                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5776                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5777                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5778                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5779                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5780                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5781                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5782                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5783                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5784                 </fields>
5785                 <links>
5786                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5787                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5788                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5789                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5790                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5791                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5792                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5793                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5794                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5795                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5796                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5797                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5798                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5799                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5800                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5801                 </links>
5802         </class>
5803
5804         <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">
5805                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5806                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5807                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5808                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5809                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5810                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5811                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5812                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5813                 </fields>
5814                 <links>
5815                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5816                 </links>
5817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5818                         <actions>
5819                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5820                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5821                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5822                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5823                         </actions>
5824                 </permacrud>
5825         </class>
5826         <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">
5827                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5828                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5829                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5830                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5831                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5832                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5833                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5834                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5835                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5836                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5837                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5838                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5839                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5840                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5841                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5842                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5843                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5844                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5845                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5846                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5847                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5848                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5849                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5850                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5851                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5852                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5853                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5854                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5855                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5856                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5857                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5858                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5859                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5860                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5861                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5862                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5863                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5864                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5865                 </fields>
5866                 <links>
5867                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5868                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5869                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5870                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5871                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5872                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5873                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5874                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5875                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5876                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5877                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5878                 </links>
5879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5880                         <actions>
5881                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5882                         </actions>
5883                 </permacrud>
5884         </class>
5885         <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">
5886                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5887                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5888                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5889                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5890                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5891                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5892                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5893                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5894                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5895                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5896                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5897                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5898                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5899                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5900                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5901                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5902                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5903                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5904                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5905                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5906                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5907                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5908                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5909                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5910                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5911                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5912                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5913                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5914                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5915                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5916                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5917                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5918                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5919                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5920                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5921                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5922                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5923                 </fields>
5924                 <links>
5925                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5926                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5927                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5928                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5929                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5930                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5931                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5932                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5933                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5934                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5935                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5936                 </links>
5937                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5938                         <actions>
5939                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5940                         </actions>
5941                 </permacrud>
5942         </class>
5943
5944         <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">
5945                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5946                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5947                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5948                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5949                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5950                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5951                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5952                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5953                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5954                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5955                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5956                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5957                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5958                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5959                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5960                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5961                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5962                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5963                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5964                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5965                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5966                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5967                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5968                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5969                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5970                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5971                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5972                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5973                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5974                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5975                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5976                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5977                 </fields>
5978                 <links>
5979                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5980                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5981                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5982                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5983                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5984                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5985                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5986                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5987                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5988                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5989                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5990                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5991                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5992                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5993                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5994                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5995                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5996                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5997                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5998                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5999                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6000                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6001                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6002                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6003                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6004                 </links>
6005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6006             <actions>
6007                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6008                 <retrieve />
6009                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6010                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6011             </actions>
6012         </permacrud>
6013         </class>
6014         <class id="aouct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree" oils_persist:tablename="actor.org_unit_custom_tree" reporter:label="Org Unit Custom Tree">
6015                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6016                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6017                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6018                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6019                 </fields>
6020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6021                         <actions>
6022                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6023                                 <retrieve/>
6024                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6025                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6026                         </actions>
6027                 </permacrud>
6028         </class>
6029         <class id="aouctn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_custom_tree_node" oils_persist:tablename="actor.org_unit_custom_tree_node" reporter:label="Org Unit Custom Tree Node">
6030                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6031                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6032                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6033                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6034                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6035                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6036                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6037                 </fields>
6038                 <links>
6039                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6040                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6041                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6042                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6043                 </links>
6044                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6045                         <actions>
6046                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6047                                 <retrieve/>
6048                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6049                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6050                         </actions>
6051                 </permacrud>
6052         </class>
6053         <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">
6054                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6055                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6056                         <field name="btype" reporter:datatype="text"/>
6057                         <field name="id" reporter:datatype="id" />
6058                         <field name="name"  reporter:datatype="text"/>
6059                         <field name="description" reporter:datatype="text"/>
6060                         <field name="owner" reporter:datatype="link"/>
6061                         <field name="pub" reporter:datatype="bool"/>
6062                         <field name="create_time" reporter:datatype="timestamp" />
6063                 </fields>
6064                 <links>
6065                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6066                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6067                 </links>
6068         </class>
6069         <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">
6070                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6071                         <field name="id" reporter:datatype="id" />
6072                         <field name="bucket" reporter:datatype="link"/>
6073                         <field name="note" reporter:datatype="text" />
6074                 </fields>
6075                 <links>
6076                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6077                 </links>
6078         </class>
6079         <class id="asc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6080                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6081                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6082                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6083                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6084                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6085                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6086                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6087                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6088                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6089                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6090                 </fields>
6091                 <links>
6092                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6093                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6094                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6095                 </links>
6096                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6097                         <actions>
6098                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6099                         </actions>
6100                 </permacrud>
6101         </class>
6102         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6103                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6104                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6105                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6106                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6107                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6108                 </fields>
6109                 <links>
6110                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6111                 </links>
6112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6113                         <actions>
6114                                 <retrieve permission="VIEW_USER">
6115                                         <context link="usr" field="home_ou" />
6116                                 </retrieve>
6117                         </actions>
6118                 </permacrud>
6119         </class>
6120     <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">
6121         <fields oils_persist:primary="field">
6122             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6123             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6124             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6125         </fields>
6126         <links/>
6127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6128             <actions>
6129                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6130                 <retrieve />
6131                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6132                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6133             </actions>
6134         </permacrud>
6135     </class>
6136         <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">
6137                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6138                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6139                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6140                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6141                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6142                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6143                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6144                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6145                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6146                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6147                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6148                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6149                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6150                 </fields>
6151                 <links>
6152                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6153                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6154                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6155                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6156                 </links>
6157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6158             <actions>
6159                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6160                 <retrieve />
6161                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6162                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6163             </actions>
6164         </permacrud>
6165         </class>
6166         <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">
6167                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6168                         <field name="field" reporter:datatype="link"/>
6169                         <field name="id" reporter:datatype="id" />
6170                         <field name="source" reporter:datatype="link"/>
6171                         <field name="value"  reporter:datatype="text"/>
6172                 </fields>
6173                 <links>
6174                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6175                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6176                 </links>
6177         </class>
6178         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6179                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6180                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6181                         <field name="btype" reporter:datatype="text"/>
6182                         <field name="id" reporter:datatype="id" />
6183                         <field name="name"  reporter:datatype="text"/>
6184                         <field name="description" reporter:datatype="text"/>
6185                         <field name="owner" reporter:datatype="link"/>
6186                         <field name="pub" reporter:datatype="bool"/>
6187                         <field name="create_time" reporter:datatype="timestamp" />
6188                 </fields>
6189                 <links>
6190                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6191                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6192                 </links>
6193         </class>
6194         <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">
6195                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6196                         <field name="id" reporter:datatype="id" />
6197                         <field name="bucket" reporter:datatype="link"/>
6198                         <field name="note" reporter:datatype="text" />
6199                 </fields>
6200                 <links>
6201                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6202                 </links>
6203         </class>
6204         <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
6205                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6206                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6207                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6208                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6209                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6210                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6211                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6212                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6213                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6214                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6215                 </fields>
6216                 <links>
6217                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6218                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6219                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6220                 </links>
6221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6222             <actions>
6223                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6224                     <context link="xact" jump="usr" field="home_ou"/>
6225                 </retrieve>
6226                         </actions>
6227                 </permacrud>
6228         </class>
6229         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6230                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6231                         <field name="id" reporter:datatype="id" />
6232                         <field name="ind1" />
6233                         <field name="ind2" />
6234                         <field name="record" />
6235                         <field name="subfield" />
6236                         <field name="tag" />
6237                         <field name="value" />
6238                 </fields>
6239                 <links>
6240                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6241                 </links>
6242         </class>
6243         <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
6244                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6245                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6246                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6247                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6248                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6249                 </fields>
6250                 <links>
6251                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6252                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6253                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6254                 </links>
6255         </class>
6256         <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
6257                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6258                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6259                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6260                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6261                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6262                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6263                 </fields>
6264                 <links>
6265                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6266                 </links>
6267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6268             <actions>
6269                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6270                 <retrieve/>
6271                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6272                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6273             </actions>
6274         </permacrud>
6275
6276         </class>
6277         <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">
6278                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6279                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6280                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6281                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6282                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6283                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6284                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6285                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6286                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6287                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6288                 </fields>
6289                 <links>
6290                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6291                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6292                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6293                 </links>
6294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6295             <actions>
6296                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6297                 <retrieve/>
6298                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6299                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6300             </actions>
6301         </permacrud>
6302         </class>
6303         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6304                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6305                         <field name="create_date" reporter:datatype="timestamp"/>
6306                         <field name="creator" reporter:datatype="link"/>
6307                         <field name="edit_date" reporter:datatype="timestamp"/>
6308                         <field name="editor" reporter:datatype="link"/>
6309                         <field name="id" reporter:datatype="id" />
6310                         <field name="pub" reporter:datatype="bool"/>
6311                         <field name="record" reporter:datatype="link"/>
6312                         <field name="value"  reporter:datatype="text"/>
6313                 </fields>
6314                 <links>
6315                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6316                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6317                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6318                 </links>
6319         </class>
6320         <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">
6321                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6322                         <field name="balance_owed" reporter:datatype="money" />
6323                         <field name="total_owed" reporter:datatype="money" />
6324                         <field name="total_paid" reporter:datatype="money" />
6325                         <field name="usr" reporter:datatype="link"/>
6326                 </fields>
6327                 <links>
6328                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6329                 </links>
6330         </class>
6331         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6332                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6333                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6334                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6335                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6336                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6337                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6338                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6339                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6340                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6341                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6342                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6343                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6344                 </fields>
6345                 <links>
6346                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6347                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6348                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6349                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6350                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6351                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6352                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6353                 </links>
6354         </class>
6355         <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">
6356                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6357                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6358                         <field name="quality" reporter:datatype="int" />
6359                         <field name="source" reporter:datatype="text"/>
6360                         <field name="transcendant" reporter:datatype="bool"/>
6361                         <field name="can_have_copies" reporter:datatype="bool"/>
6362                 </fields>
6363                 <links/>
6364         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6365             <actions>
6366                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6367                 <retrieve/>
6368                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6369                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6370             </actions>
6371         </permacrud>
6372         </class>
6373         <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6374                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6375                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6376                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6377                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6378                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6379                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6380                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6381                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6382                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6383                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6384                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6385                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6386                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6387                 </fields>
6388                 <links>
6389                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6390                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6391                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6392                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6393                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6394                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6395                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6396                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6397                 </links>
6398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6399                         <actions>
6400                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6401                                         <context link="usr" field="home_ou" />
6402                                 </retrieve>
6403                         </actions>
6404                 </permacrud>
6405         </class>
6406         <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">
6407                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6408                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6409                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6410                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6411                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6412                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6413                 </fields>
6414                 <links>
6415                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6416                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6417                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6418                 </links>
6419         </class>
6420         <class id="actsced" controller="open-ils.cstore" oils_obj:fieldmapper="actor::stat_cat_entry_default" oils_persist:tablename="actor.stat_cat_entry_default" reporter:label="User Stat Cat Default Entry">
6421                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6422                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6423                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6424                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6425                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6426                 </fields>
6427                 <links>
6428                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6429                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6430                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6431                 </links>
6432         </class>
6433         <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">
6434                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6435                         <field name="bucket" reporter:datatype="link"/>
6436                         <field name="id" reporter:datatype="id" />
6437                         <field name="target_user" reporter:datatype="link"/>
6438                         <field name="create_time" reporter:datatype="timestamp" />
6439                         <field name="pos" reporter:datatype="int" />
6440                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6441                 </fields>
6442                 <links>
6443                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6444                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6445             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6446                 </links>
6447         </class>
6448         <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">
6449                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6450                         <field name="id" reporter:datatype="id" />
6451                         <field name="item" reporter:datatype="link"/>
6452                         <field name="note" reporter:datatype="text" />
6453                 </fields>
6454                 <links>
6455                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6456                 </links>
6457         </class>
6458         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6459                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6460                         <field name="balance_owed" reporter:datatype="money" />
6461                         <field name="total_owed" reporter:datatype="money" />
6462                         <field name="total_paid" reporter:datatype="money" />
6463                         <field name="usr" reporter:datatype="link"/>
6464                 </fields>
6465                 <links>
6466                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6467                 </links>
6468         </class>
6469         <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">
6470                 <fields oils_persist:primary="code" oils_persist:sequence="">
6471                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6472                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6473                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6474                 </fields>
6475                 <links/>
6476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6477             <actions>
6478                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6479                 <retrieve/>
6480                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6481                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6482             </actions>
6483         </permacrud>
6484         </class>
6485         <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6486                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6487                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6488                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6489                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6490                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6491                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6492                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6493                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6494                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6495                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6496                 </fields>
6497                 <links>
6498                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6499                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6500                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6501                 </links>
6502         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6503             <actions>
6504                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6505                     <context link="xact" jump="usr" field="home_ou"/>
6506                 </retrieve>
6507                         </actions>
6508                 </permacrud>
6509         </class>
6510         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6511                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6512                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6513                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6514                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6515                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6516                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6517                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6518                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6519                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6520                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6521                 </fields>
6522                 <links>
6523                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6524                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6525                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6526                 </links>
6527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6528             <actions>
6529                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6530                     <context link="xact" jump="usr" field="home_ou"/>
6531                 </retrieve>
6532                         </actions>
6533                 </permacrud>
6534         </class>
6535         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6536                 <fields oils_persist:primary="id" oils_persist:sequence="">
6537                         <field name="checkin_lib" reporter:datatype="link"/>
6538                         <field name="checkin_staff" reporter:datatype="link"/>
6539                         <field name="checkin_time" reporter:datatype="timestamp"/>
6540                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6541                         <field name="circ_staff" reporter:datatype="link"/>
6542                         <field name="desk_renewal" reporter:datatype="bool"/>
6543                         <field name="due_date" reporter:datatype="timestamp"/>
6544                         <field name="duration" reporter:datatype="interval"/>
6545                         <field name="duration_rule" reporter:datatype="link"/>
6546                         <field name="fine_interval" reporter:datatype="interval"/>
6547                         <field name="id" reporter:datatype="id" />
6548                         <field name="max_fine" reporter:datatype="money" />
6549                         <field name="max_fine_rule" reporter:datatype="link"/>
6550                         <field name="opac_renewal" reporter:datatype="bool"/>
6551                         <field name="phone_renewal" reporter:datatype="bool"/>
6552                         <field name="recurring_fine" reporter:datatype="money" />
6553                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6554                         <field name="renewal_remaining" reporter:datatype="int" />
6555             <field name="grace_period" reporter:datatype="interval" />
6556                         <field name="stop_fines" reporter:datatype="text"/>
6557                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6558                         <field name="target_copy" reporter:datatype="link"/>
6559                         <field name="usr" reporter:datatype="link"/>
6560                         <field name="xact_finish" reporter:datatype="timestamp" />
6561                         <field name="xact_start" reporter:datatype="timestamp" />
6562                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6563                 </fields>
6564                 <links>
6565                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6566                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6567                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6568                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6569                 </links>
6570         </class>
6571         <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">
6572                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6573                         <field name="field" reporter:datatype="link"/>
6574                         <field name="id" reporter:datatype="id" />
6575                         <field name="source" reporter:datatype="link"/>
6576                         <field name="value" reporter:datatype="text"/>
6577                 </fields>
6578                 <links>
6579                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6580                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6581                 </links>
6582         </class>
6583         <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">
6584                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6585                         <field name="high" reporter:datatype="money" />
6586                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6587                         <field name="low" reporter:datatype="money" />
6588                         <field name="name" reporter:datatype="text"/>
6589                         <field name="normal" reporter:datatype="money" />
6590                         <field name="recurrence_interval" reporter:datatype="interval"/>
6591             <field name="grace_period" reporter:datatype="interval" />
6592                 </fields>
6593                 <links/>
6594         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6595             <actions>
6596                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6597                 <retrieve/>
6598                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6599                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6600             </actions>
6601         </permacrud>
6602         </class>
6603         <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6604                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6605                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6606                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6607                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6608                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6609                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6610                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6611                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6612                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6613                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6614                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6615                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6616                 </fields>
6617                 <links>
6618                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6619                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6620                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6621                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6622                 </links>
6623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6624             <actions>
6625                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6626                     <context link="xact" jump="usr" field="home_ou"/>
6627                 </retrieve>
6628                         </actions>
6629                 </permacrud>
6630         </class>
6631         <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">
6632                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6633                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6634                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6635                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6636                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6637                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6638                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6639                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6640                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6641                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6642                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6643                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6644                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6645                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6646                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6647                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6648                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6649                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6650                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6651                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6652                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6653                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6654                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6655                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6656                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6657                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6658                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6659                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6660                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6661                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6662                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6663                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6664                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6665                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6666                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6667                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6668                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6669                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6670                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6671                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6672                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6673                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6674                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6675                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6676                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6677                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6678                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6679                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6680                 </fields>
6681                 <links>
6682                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6683                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6684                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6685                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6686                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6687                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6688                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6689                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6690                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6691                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6692                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6693                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6694                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6695                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6696                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6697                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6698                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6699                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6700                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6701                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6702                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6703                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6704                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6705                 </links>
6706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6707             <actions>
6708                 <create permission="CREATE_COPY">
6709                     <context link="call_number" field="owning_lib"/>
6710                 </create>
6711                 <retrieve/>
6712                 <update permission="UPDATE_COPY">
6713                     <context link="call_number" field="owning_lib"/>
6714                 </update>
6715                 <delete permission="DELETE_COPY">
6716                     <context link="call_number" field="owning_lib"/>
6717                 </delete>
6718             </actions>
6719         </permacrud>
6720         </class>
6721
6722         <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">
6723                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6724                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6725                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6726                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6727                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6728                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6729                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6730                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6731                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6732                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6733                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6734                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6735                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6736                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6737                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6738                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6739                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6740                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6741                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6742                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6743                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6744                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6745                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6746                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6747                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6748                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6749                 </fields>
6750                 <links>
6751                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6752                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6753                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6754                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6755                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6756                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6757                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6758                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6759                 </links>
6760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6761                         <actions>
6762                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6763                                 <retrieve />
6764                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6765                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6766                         </actions>
6767                 </permacrud>
6768         </class>
6769
6770         <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">
6771                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6772                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6773                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6774                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6775                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6776                 </fields>
6777                 <links/>
6778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6779             <actions>
6780                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6781                 <retrieve/>
6782                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6783                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6784             </actions>
6785         </permacrud>
6786         </class>
6787         <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">
6788                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6789                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6790                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6791                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6792                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6793                 </fields>
6794                 <links/>
6795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6796             <actions>
6797                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6798                 <retrieve/>
6799                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6800                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6801             </actions>
6802         </permacrud>
6803         </class>
6804         <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">
6805                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6806                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6807                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6808                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6809                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6810                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6811                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6812                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6813                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6814                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6815                 </fields>
6816                 <links>
6817                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6818                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6819                 </links>
6820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6821             <actions>
6822                 <create permission="CREATE_PERM" global_required="true"/>
6823                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6824                 <update permission="UPDATE_PERM" global_required="true"/>
6825                 <delete permission="DELETE_PERM" global_required="true"/>
6826             </actions>
6827         </permacrud>
6828         </class>
6829         <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">
6830                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6831                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6832                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6833                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6834                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6835                 </fields>
6836                 <links>
6837                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6838                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6839                 </links>
6840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6841             <actions>
6842                 <create permission="ADMIN_SURVEY">
6843                     <context link="question" jump="survey" field="owner"/>
6844                 </create>
6845                 <retrieve/>
6846                 <update permission="ADMIN_SURVEY">
6847                     <context link="question" jump="survey" field="owner"/>
6848                 </update>
6849                 <delete permission="ADMIN_SURVEY">
6850                     <context link="question" jump="survey" field="owner"/>
6851                 </delete>
6852             </actions>
6853         </permacrud>
6854         </class>
6855         <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6856                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6857                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6858                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6859                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6860                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6861                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6862                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6863                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6864                 </fields>
6865                 <links>
6866                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6867                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6868                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6869                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6870                 </links>
6871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6872                         <actions>
6873                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6874                         </actions>
6875                 </permacrud>
6876         </class>
6877         <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">
6878                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6879                         <field name="balance_owed" reporter:datatype="money" />
6880                         <field name="total_owed" reporter:datatype="money" />
6881                         <field name="total_paid" reporter:datatype="money" />
6882                         <field name="usr" reporter:datatype="link"/>
6883                 </fields>
6884                 <links>
6885                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6886                 </links>
6887         </class>
6888         <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">
6889                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6890                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6891                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6892                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6893                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6894                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6895                 </fields>
6896                 <links>
6897                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6898                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6899                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6900                 </links>
6901         </class>
6902         <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">
6903                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6904                         <field name="field" reporter:datatype="link"/>
6905                         <field name="id" reporter:datatype="id" />
6906                         <field name="source" reporter:datatype="link"/>
6907                         <field name="value" reporter:datatype="text"/>
6908                 </fields>
6909                 <links>
6910                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6911                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6912                 </links>
6913         </class>
6914         <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">
6915                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6916                         <field name="field" reporter:datatype="link"/>
6917                         <field name="id" reporter:datatype="id" />
6918                         <field name="source" reporter:datatype="link"/>
6919                         <field name="value" reporter:datatype="text"/>
6920                 </fields>
6921                 <links>
6922                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6923                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6924                 </links>
6925         </class>
6926         <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">
6927                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6928                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6929                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6930                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6931                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6932                 </fields>
6933                 <links>
6934                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6935                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6936                 </links>
6937         </class>
6938         <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">
6939                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6940                         <field name="depth" reporter:datatype="int" />
6941                         <field name="grantable" reporter:datatype="bool"/>
6942                         <field name="grp" reporter:datatype="link"/>
6943                         <field name="id" reporter:datatype="id" />
6944                         <field name="perm" reporter:datatype="link"/>
6945                 </fields>
6946                 <links>
6947                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6948                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6949                 </links>
6950         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6951             <actions>
6952                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6953                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6954                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6955                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6956             </actions>
6957         </permacrud>
6958         </class>
6959         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6960                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6961                         <field name="items" oils_persist:virtual="true" />
6962                         <field name="btype" reporter:datatype="text"/>
6963                         <field name="id" reporter:datatype="id" />
6964                         <field name="name" reporter:datatype="text"/>
6965                         <field name="description" reporter:datatype="text"/>
6966                         <field name="owner" reporter:datatype="link"/>
6967                         <field name="pub" reporter:datatype="bool"/>
6968                         <field name="create_time" reporter:datatype="timestamp" />
6969                 </fields>
6970                 <links>
6971                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6972                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6973                 </links>
6974         </class>
6975         <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">
6976                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6977                         <field name="id" reporter:datatype="id" />
6978                         <field name="bucket" reporter:datatype="link"/>
6979                         <field name="note" reporter:datatype="text" />
6980                 </fields>
6981                 <links>
6982                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6983                 </links>
6984         </class>
6985         <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">
6986                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6987                         <field name="id" reporter:datatype="int" />
6988                         <field name="usr" reporter:datatype="link"/>
6989                         <field name="work_ou" reporter:datatype="link"/>
6990                 </fields>
6991                 <links>
6992                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6993                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6994                 </links>
6995         </class>
6996         <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">
6997                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6998                         <field name="depth" reporter:datatype="int"/>
6999                         <field name="grantable" reporter:datatype="bool"/>
7000                         <field name="id" reporter:datatype="id" />
7001                         <field name="perm" reporter:datatype="link"/>
7002                         <field name="usr" reporter:datatype="link"/>
7003                 </fields>
7004                 <links>
7005                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7006                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7007                 </links>
7008         </class>
7009         <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">
7010                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7011                         <field name="object_id" reporter:datatype="text"/>
7012                         <field name="grantable" reporter:datatype="bool"/>
7013                         <field name="id" reporter:datatype="id" />
7014                         <field name="perm" reporter:datatype="link"/>
7015                         <field name="usr" reporter:datatype="link"/>
7016                         <field name="object_type" reporter:datatype="text"/>
7017                 </fields>
7018                 <links>
7019                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7020                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7021                 </links>
7022         </class>
7023         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
7024                 <fields oils_persist:primary="id" oils_persist:sequence="">
7025                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7026                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7027                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7028                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7029                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7030                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7031                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7032                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7033                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7034                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7035                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7036                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7037                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7038                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7039                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7040                 </fields>
7041                 <links>
7042                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7043                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7044                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7045                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7046                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7047                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7048                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7049                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7050                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7051                 </links>
7052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7053             <actions>
7054                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7055                     <context link="xact" jump="usr" field="home_ou"/>
7056                 </retrieve>
7057                         </actions>
7058                 </permacrud>
7059         </class>
7060         <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">
7061                 <fields oils_persist:primary="id" oils_persist:sequence="">
7062                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7063                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7064                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7065                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7066                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7067                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7068                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7069                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7070                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7071                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7072                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7073                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7074                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7075                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7076                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7077                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7078                 </fields>
7079                 <links>
7080                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7081                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7082                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7083                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7084                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7085                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7086                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7087                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7088                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7089                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7090                 </links>
7091         </class>
7092         <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">
7093                 <fields oils_persist:primary="id" oils_persist:sequence="">
7094                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7095                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7096                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7097                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7098                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7099                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7100                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7101                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7102                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7105                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7106                 </fields>
7107                 <links>
7108                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7109                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7110                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7111                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7112                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7113                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7114                 </links>
7115         </class>
7116         <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">
7117                 <fields oils_persist:primary="id" oils_persist:sequence="">
7118                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7119                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7120                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7121                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7122                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7123                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7124                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7125                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7126                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7127                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7128                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7129                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7130                 </fields>
7131                 <links>
7132                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7133                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7134                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7135                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7136                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7137                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7138                 </links>
7139         </class>
7140         <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">
7141                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7142                         <field name="bucket" reporter:datatype="link"/>
7143                         <field name="id" reporter:datatype="id" />
7144                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7145                         <field name="create_time" reporter:datatype="timestamp" />
7146                         <field name="pos" reporter:datatype="int" />
7147                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7148                 </fields>
7149                 <links>
7150                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7151                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7152             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7153                 </links>
7154         </class>
7155         <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">
7156                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7157                         <field name="id" reporter:datatype="id" />
7158                         <field name="item" reporter:datatype="link"/>
7159                         <field name="note" reporter:datatype="text" />
7160                 </fields>
7161                 <links>
7162                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7163                 </links>
7164         </class>
7165         <class id="asce" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
7166                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7167                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7168                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7169                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7170                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7171                 </fields>
7172                 <links>
7173                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7174                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7175                 </links>
7176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7177                         <actions>
7178                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7179                         </actions>
7180                 </permacrud>
7181         </class>
7182     <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">
7183         <fields oils_persist:primary="field">
7184             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7185             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7186             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7187         </fields>
7188         <links/>
7189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7190             <actions>
7191                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7192                 <retrieve />
7193                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7194                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7195             </actions>
7196         </permacrud>
7197     </class>
7198         <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">
7199                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7200                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7201                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7202                 </fields>
7203                 <links/>
7204         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7205             <actions>
7206                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7207                 <retrieve/>
7208                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7209                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7210             </actions>
7211         </permacrud>
7212         </class>
7213
7214
7215         <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">
7216                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7217                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7218                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7219                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7220                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7221                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7222                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7223                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7224                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7225                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7226                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7227                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7228                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7229                 </fields>
7230                 <links>
7231                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7232                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7233                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7234                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7235                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7236                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7237                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7238                 </links>
7239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7240             <actions>
7241                 <create permission="TRANSIT_COPY">
7242                     <context link="target_copy" field="owner"/>
7243                 </create>
7244                 <retrieve/>
7245                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7246                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7247             </actions>
7248         </permacrud>
7249         </class>
7250         <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">
7251                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7252                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7253                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7254                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7255                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7256                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7257                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7258                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7259                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7260                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7261                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7262                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7263                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7264                 </fields>
7265                 <links>
7266                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7267                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7268                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7269                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7270                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7271                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7272                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7273                 </links>
7274         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7275             <actions>
7276                 <create permission="TRANSIT_COPY" context_field="owner">
7277                     <context link="target_copy" field="circ_lib"/>
7278                 </create>
7279                 <retrieve/>
7280                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7281                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7282             </actions>
7283         </permacrud>
7284         </class>
7285         <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
7286                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7287                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7288                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7289                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7290                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7291                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7292                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7293                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7294                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7295                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7296                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7297                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7298                 </fields>
7299                 <links>
7300                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7301                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7302                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7303                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7304                 </links>
7305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7306             <actions>
7307                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7308                     <context link="xact" jump="usr" field="home_ou"/>
7309                 </retrieve>
7310                         </actions>
7311                 </permacrud>
7312         </class>
7313         <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">
7314                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7315                         <field name="grp" />
7316                         <field name="id" reporter:datatype="id" />
7317                         <field name="usr" />
7318                 </fields>
7319                 <links>
7320                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7321                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7322                 </links>
7323         </class>
7324         <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">
7325                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7326                         <field name="id" reporter:datatype="id" />
7327                         <field name="fq_field" reporter:datatype="text"/>
7328                         <field name="identity_value" reporter:datatype="text"/>
7329                         <field name="translation" reporter:datatype="text"/>
7330                         <field name="string" reporter:datatype="text"/>
7331                 </fields>
7332                 <links>
7333                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7334                 </links>
7335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7336             <actions>
7337                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7338                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7339                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7340                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7341             </actions>
7342         </permacrud>
7343         </class>
7344         <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">
7345                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7346                         <field name="id" reporter:datatype="id" />
7347                         <field name="fm_class" reporter:datatype="text"/>
7348                         <field name="field" reporter:datatype="text"/>
7349                         <field name="owner" reporter:datatype="org_unit"/>
7350                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7351                 </fields>
7352                 <links>
7353                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7354                 </links>
7355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7356             <actions>
7357                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7358                 <retrieve/>
7359                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7360                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7361             </actions>
7362         </permacrud>
7363         </class>
7364         <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">
7365                 <fields oils_persist:primary="code">
7366                         <field name="code" reporter:datatype="id" />
7367                         <field name="marc_code" reporter:datatype="text"/>
7368                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7369                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7370                 </fields>
7371                 <links/>
7372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7373             <actions>
7374                 <create permission="CREATE_LOCALE" global_required="true"/>
7375                 <retrieve/>
7376                 <update permission="UPDATE_LOCALE" global_required="true"/>
7377                 <delete permission="DELETE_LOCALE" global_required="true"/>
7378             </actions>
7379         </permacrud>
7380         </class>
7381         <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">
7382                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7383                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7384                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7385                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7386             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7387                 </fields>
7388                 <links>
7389                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7390                 </links>
7391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7392             <actions>
7393                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7394                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7395                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7396                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7397             </actions>
7398         </permacrud>
7399         </class>
7400
7401         <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">
7402                 <fields oils_persist:primary="id">
7403                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7404                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7405                 </fields>
7406                 <links/>
7407         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7408             <actions>
7409                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7410                 <retrieve/>
7411                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7412                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7413             </actions>
7414         </permacrud>
7415         </class>
7416
7417         <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">
7418                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7419                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7420                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7421                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7422                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7423                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7424                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7425                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7426                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7427                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7428                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7429                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7430                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7431                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7432                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7433                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7434                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7435                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7436                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7437                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7438                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7439                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7440                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7441                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7442                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7443                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7444                 </fields>
7445                 <links>
7446                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7447                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7448                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7449                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7450                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7451                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7452                 </links>
7453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7454             <actions>
7455                 <create permission="user_request.create">
7456                     <context link="usr" field="home_ou"/>
7457                                 </create>
7458                 <retrieve permission="user_request.view">
7459                     <context link="usr" field="home_ou"/>
7460                                 </retrieve>
7461                 <update permission="user_request.update">
7462                     <context link="usr" field="home_ou"/>
7463                                 </update>
7464                 <delete permission="user_request.delete">
7465                     <context link="usr" field="home_ou"/>
7466                                 </delete>
7467             </actions>
7468         </permacrud>
7469         </class>
7470
7471         <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">
7472                 <fields oils_persist:primary="code">
7473                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7474                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7475                 </fields>
7476                 <links/>
7477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7478             <actions>
7479                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7480                 <retrieve/>
7481                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7482                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7483             </actions>
7484         </permacrud>
7485         </class>
7486
7487         <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">
7488                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7489                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7490                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7491                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7492                         <field reporter:label="Ratio" name="ratio" />
7493                 </fields>
7494                 <links>
7495                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7496                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7497                 </links>
7498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7499                         <actions>
7500                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7501                                 <retrieve/>
7502                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7503                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7504                         </actions>
7505                 </permacrud>
7506         </class>
7507
7508         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7509                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7510                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7511                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7512                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7513                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7514                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7515                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7516                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7517                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7518                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7519                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7520                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7521                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7522                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7523                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7524                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7525                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7526                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7527                 </fields>
7528                 <links>
7529                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7530                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7531             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7532             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7533             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7534                 </links>
7535         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7536             <actions>
7537                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7538                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7539                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7540                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7541             </actions>
7542         </permacrud>
7543         </class>
7544
7545         <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">
7546                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7547                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7548                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7549                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7550                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7551                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7552                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7553                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7554                 </fields>
7555                 <links>
7556                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7557                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7558                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7559                 </links>
7560         </class>
7561
7562         <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">
7563                 <fields oils_persist:primary="code">
7564                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7565                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7566                 </fields>
7567                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7568             <actions>
7569                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7570                 <retrieve/>
7571                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7572                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7573             </actions>
7574                 </permacrud>
7575         </class>
7576
7577         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7578                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7579                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7580                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7581                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7582                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7583                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7584                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7585                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7586                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7587                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7588                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7589                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7590                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7591                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7592                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7593                 </fields>
7594                 <links>
7595                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7596                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7597                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7598                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7599                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7600                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7601                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7602                 </links>
7603         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7604             <actions>
7605                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7606                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7607                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7608                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7609             </actions>
7610         </permacrud>
7611         </class>
7612
7613         <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">
7614                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7615                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7616                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7617                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7618                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7619                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7620                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7621                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7622                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7623                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7624                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7625                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7626                 </fields>
7627                 <links>
7628                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7629                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7630                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7631                 </links>
7632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7633             <actions>
7634                 <create   permission="ADMIN_INVOICE">
7635                                         <context link="invoice" field="receiver"/>
7636                                 </create>
7637                 <retrieve permission="ADMIN_INVOICE">
7638                                         <context link="invoice" field="receiver"/>
7639                                 </retrieve>
7640                 <update   permission="ADMIN_INVOICE">
7641                                         <context link="invoice" field="receiver"/>
7642                                 </update>
7643                                 <delete   permission="ADMIN_INVOICE">
7644                                         <context link="invoice" field="receiver"/>
7645                                 </delete>
7646             </actions>
7647         </permacrud>
7648         </class>
7649
7650         <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">
7651                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7652                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7653                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7654                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7655                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7656                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7657                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7658                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7659                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7660                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7661                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7662                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7663                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7664                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7665                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7666                 </fields>
7667                 <links>
7668                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7669                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7670                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7671                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7672                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7673                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7674                 </links>
7675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7676             <actions>
7677                 <create   permission="ADMIN_INVOICE">
7678                                         <context link="invoice" field="receiver"/>
7679                                 </create>
7680                 <retrieve permission="ADMIN_INVOICE">
7681                                         <context link="invoice" field="receiver"/>
7682                                 </retrieve>
7683                 <update   permission="ADMIN_INVOICE">
7684                                         <context link="invoice" field="receiver"/>
7685                                 </update>
7686                                 <delete   permission="ADMIN_INVOICE">
7687                                         <context link="invoice" field="receiver"/>
7688                                 </delete>
7689             </actions>
7690         </permacrud>
7691         </class>
7692
7693         <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">
7694                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7695                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7696                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7697                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7698                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7699                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7700                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7701                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7702                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7703                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7704                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7705                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7706                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7707                 </fields>
7708                 <links>
7709                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7710                 </links>
7711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7712             <actions>
7713                 <create permission="ADMIN_PROVIDER">
7714                     <context link="provider" field="owner"/>
7715                 </create>
7716                 <retrieve permission="ADMIN_PROVIDER">
7717                     <context link="provider" field="owner"/>
7718                 </retrieve>
7719                 <update permission="ADMIN_PROVIDER">
7720                     <context link="provider" field="owner"/>
7721                 </update>
7722                 <delete permission="ADMIN_PROVIDER">
7723                     <context link="provider" field="owner"/>
7724                 </delete>
7725             </actions>
7726         </permacrud>
7727         </class>
7728
7729         <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">
7730                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7731                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7732                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7733                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7734                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7735                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7736                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7737         </fields>
7738                 <links>
7739                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7740                 </links>
7741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7742             <actions>
7743                 <create permission="ADMIN_PROVIDER">
7744                     <context link="provider" field="owner"/>
7745                 </create>
7746                 <retrieve permission="ADMIN_PROVIDER">
7747                     <context link="provider" field="owner"/>
7748                 </retrieve>
7749                 <update permission="ADMIN_PROVIDER">
7750                     <context link="provider" field="owner"/>
7751                 </update>
7752                 <delete permission="ADMIN_PROVIDER">
7753                     <context link="provider" field="owner"/>
7754                 </delete>
7755             </actions>
7756         </permacrud>
7757     </class>
7758         <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">
7759                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7760                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7761                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7762                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7763                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7764                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7765                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7766                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7767                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7768                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7769                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7770                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7771                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7772                 </fields>
7773                 <links>
7774                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7775                 </links>
7776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7777             <actions>
7778                 <create permission="ADMIN_PROVIDER">
7779                     <context link="contact" jump='provider' field="owner"/>
7780                 </create>
7781                 <retrieve permission="ADMIN_PROVIDER">
7782                     <context link="contact" jump='provider' field="owner"/>
7783                 </retrieve>
7784                 <update permission="ADMIN_PROVIDER">
7785                     <context link="contact" jump='provider' field="owner"/>
7786                 </update>
7787                 <delete permission="ADMIN_PROVIDER">
7788                     <context link="contact" jump='provider' field="owner"/>
7789                 </delete>
7790             </actions>
7791         </permacrud>
7792         </class>
7793
7794         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7795                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7796                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7797                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7798                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7799                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7800                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7801                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7802                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7803                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7804                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7805                 </fields>
7806                 <links>
7807                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7808                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7809                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7810                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7811                 </links>
7812         </class>
7813
7814         <class id="acqfc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_calendar" oils_persist:tablename="acq.fiscal_calendar" reporter:label="Fiscal Calendar">
7815                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7816                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7817                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7818                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7819                 </fields>
7820                 <links>
7821             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7822                 </links>
7823                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7824                         <actions>
7825                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7826                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7827                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7828                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7829                         </actions>
7830                 </permacrud>
7831         </class>
7832
7833         <class id="acqfy" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fiscal_year" oils_persist:tablename="acq.fiscal_year" reporter:label="Fiscal Year">
7834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7835                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7836                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7837                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7838                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7839                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7840                 </fields>
7841                 <links>
7842                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7843                 </links>
7844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7845                         <actions>
7846                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7847                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7848                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7849                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7850                         </actions>
7851                 </permacrud>
7852         </class>
7853
7854         <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">
7855                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7856                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7857                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7858                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7859                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7860                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7861                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7862                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7863                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7864                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7865                 </fields>
7866                 <links>
7867                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7868                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7869             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7870             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7871                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7872                 </links>
7873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7874             <actions>
7875                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7876                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7877                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7878                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7879             </actions>
7880         </permacrud>
7881         </class>
7882
7883         <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">
7884                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7885                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7886                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7887                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7888                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7889                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7890                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7891                 </fields>
7892                 <links>
7893                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7894                 </links>
7895                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7896                         <actions>
7897                                 <create permission="ADMIN_FUNDING_SOURCE">
7898                     <context link="funding_source" field="owner"/>
7899                 </create>
7900                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7901                     <context link="funding_source" field="owner"/>
7902                 </retrieve>
7903                                 <update permission="ADMIN_FUNDING_SOURCE">
7904                     <context link="funding_source" field="owner"/>
7905                 </update>
7906                                 <delete permission="ADMIN_FUNDING_SOURCE">
7907                     <context link="funding_source" field="owner"/>
7908                 </delete>
7909                         </actions>
7910                 </permacrud>
7911         </class>
7912
7913         <class id="acqofscred" controller="open-ils.cstore" oils_obj:fieldmapper="acq::ordered_funding_source_credit" oils_persist:tablename="acq.ordered_funding_source_credit" reporter:label="Ordered Funding Source Credit">
7914                 <fields oils_persist:primary="id">
7915                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7916                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7917                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7918                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7919                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7920                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7921                 </fields>
7922                 <links>
7923                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7924                 </links>
7925         </class>
7926
7927         <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">
7928                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7929                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7930                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7931                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7932                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7933                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7934                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7935                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7936                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7937                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
7938                 </fields>
7939                 <links>
7940                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7941                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7942                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
7943                 </links>
7944                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7945                         <actions>
7946                                 <create permission="ADMIN_ACQ_FUND">
7947                     <context link="fund" field="org"/>
7948                 </create>
7949                                 <retrieve permission="ADMIN_ACQ_FUND">
7950                     <context link="fund" field="org"/>
7951                 </retrieve>
7952                                 <update permission="ADMIN_ACQ_FUND">
7953                     <context link="fund" field="org"/>
7954                 </update>
7955                                 <delete permission="ADMIN_ACQ_FUND">
7956                     <context link="fund" field="org"/>
7957                 </delete>
7958                         </actions>
7959                 </permacrud>
7960         </class>
7961
7962         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7964                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7965                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7966                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7967                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7968                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7969                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7970                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7971                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7972                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7973                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7974                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7975                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7976                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7977                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7978                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7979                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7980                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7981                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7982                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7983                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7984                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7985                 </fields>
7986                 <links>
7987                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7988                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7989             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7990             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7991             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7992             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7993             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7994             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7995             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7996             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7997             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7998                 </links>
7999         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8000             <actions>
8001                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8002                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8003                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8004                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8005             </actions>
8006         </permacrud>
8007         </class>
8008
8009         <class id="acqfat" controller="open-ils.cstore open-ils.pcrud 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">
8010                 <fields oils_persist:primary="fund">
8011                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8012                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8013                 </fields>
8014                 <links>
8015                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8016                 </links>
8017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8018             <actions>
8019                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8020                                         <context link="fund" field="org" />
8021                 </retrieve>
8022             </actions>
8023         </permacrud>
8024         </class>
8025
8026         <class id="acqfdt" controller="open-ils.cstore open-ils.pcrud 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">
8027                 <fields oils_persist:primary="fund">
8028                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8029                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8030                 </fields>
8031                 <links>
8032                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8033                 </links>
8034         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8035             <actions>
8036                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8037                                         <context link="fund" field="org" />
8038                 </retrieve>
8039             </actions>
8040         </permacrud>
8041         </class>
8042
8043         <class id="acqfet" controller="open-ils.cstore open-ils.pcrud 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">
8044                 <fields oils_persist:primary="fund">
8045                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8046                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8047                 </fields>
8048                 <links>
8049                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8050                 </links>
8051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8052             <actions>
8053                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8054                                         <context link="fund" field="org" />
8055                 </retrieve>
8056             </actions>
8057         </permacrud>
8058         </class>
8059
8060         <class id="acqfst" controller="open-ils.cstore open-ils.pcrud 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">
8061                 <fields oils_persist:primary="fund">
8062                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8063                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8064                 </fields>
8065                 <links>
8066                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8067                 </links>
8068         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8069             <actions>
8070                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8071                                         <context link="fund" field="org" />
8072                 </retrieve>
8073             </actions>
8074         </permacrud>
8075         </class>
8076
8077         <class id="acqfcb" controller="open-ils.cstore open-ils.pcrud 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">
8078                 <fields oils_persist:primary="fund">
8079                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8080                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8081                 </fields>
8082                 <links>
8083                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8084                 </links>
8085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8086             <actions>
8087                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8088                                         <context link="fund" field="org" />
8089                 </retrieve>
8090             </actions>
8091         </permacrud>
8092         </class>
8093
8094    <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">
8095         <fields oils_persist:primary="fund">
8096             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8097             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8098         </fields>
8099         <links>
8100             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8101         </links>
8102     </class>
8103
8104    <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">
8105         <fields oils_persist:primary="fund">
8106             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8107             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8108         </fields>
8109         <links>
8110             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8111         </links>
8112     </class>
8113
8114    <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">
8115         <fields oils_persist:primary="fund">
8116             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8117             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8118         </fields>
8119         <links>
8120             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8121         </links>
8122     </class>
8123
8124    <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">
8125         <fields oils_persist:primary="fund">
8126             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8127             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8128         </fields>
8129         <links>
8130             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8131         </links>
8132     </class>
8133
8134    <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">
8135         <fields oils_persist:primary="fund">
8136             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8137             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8138         </fields>
8139         <links>
8140             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8141         </links>
8142     </class>
8143
8144         <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">
8145                 <fields oils_persist:primary="funding_source">
8146                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8147                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8148                 </fields>
8149                 <links>
8150                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8151                 </links>
8152         </class>
8153
8154         <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">
8155                 <fields oils_persist:primary="funding_source">
8156                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8157                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8158                 </fields>
8159                 <links>
8160                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8161                 </links>
8162         </class>
8163
8164         <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">
8165                 <fields oils_persist:primary="funding_source">
8166                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8167                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8168                 </fields>
8169                 <links>
8170                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8171                 </links>
8172         </class>
8173
8174         <class id="acqfsb" controller="open-ils.cstore open-ils.pcrud 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">
8175                 <fields oils_persist:primary="fund">
8176                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8177                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8178                 </fields>
8179                 <links>
8180                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8181                 </links>
8182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8183             <actions>
8184                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8185                                         <context link="fund" field="org" />
8186                 </retrieve>
8187             </actions>
8188         </permacrud>
8189     </class>
8190     <class id="acqfsum" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="acq::fund_summary" reporter:label="Fund Summary" reporter:core="true" oils_persist:readonly="true">
8191         <oils_persist:source_definition><![CDATA[
8192             SELECT
8193                 acqf.*,
8194                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8195                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8196                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8197                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8198             FROM
8199                 acq.fund acqf
8200                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8201                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8202                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8203                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8204         ]]></oils_persist:source_definition>
8205         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8206             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8207             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8208             <field reporter:label="Name" name="name" reporter:datatype="text" />
8209             <field reporter:label="Year" name="year" reporter:datatype="int" />
8210             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8211             <field reporter:label="Code" name="code" reporter:datatype="text" />
8212             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8213             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8214             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8215             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8216             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8217
8218             <!-- non fund-native fields -->
8219             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8220             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8221             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8222             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8223         </fields>
8224         <links>
8225             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8226             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8227             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8228         </links>
8229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8230             <actions>
8231                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8232             </actions>
8233         </permacrud>
8234         </class>
8235         <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">
8236                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8237                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8238                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8239                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8240                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8241                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8242                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8243                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8244                 </fields>
8245                 <links>
8246                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8247                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8248                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8249                 </links>
8250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8251                         <actions>
8252                                 <create permission="ADMIN_ACQ_FUND">
8253                     <context link="fund" field="org"/>
8254                 </create>
8255                                 <retrieve permission="ADMIN_ACQ_FUND">
8256                     <context link="fund" field="org"/>
8257                 </retrieve>
8258                                 <update permission="ADMIN_ACQ_FUND">
8259                     <context link="fund" field="org"/>
8260                 </update>
8261                                 <delete permission="ADMIN_ACQ_FUND">
8262                     <context link="fund" field="org"/>
8263                 </delete>
8264                         </actions>
8265                 </permacrud>
8266         </class>
8267
8268     <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">
8269         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8270             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8271             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8272             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8273             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8274             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8275             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8276             <field reporter:label="Note" name="note" reporter:datatype="text" />
8277             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8278         </fields>
8279         <links>
8280             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8281             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8282             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8283         </links>
8284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8285                         <actions>
8286                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8287                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8288                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8289                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8290                         </actions>
8291                 </permacrud>
8292     </class>
8293
8294         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8295                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8296                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8297                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8298                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8299                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8300                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8301                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8302                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8303                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8304                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8305                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8306                 </fields>
8307                 <links>
8308                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8309                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8310                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8311                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8312                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8313                 </links>
8314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8315                         <actions>
8316                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8317                         </actions>
8318                 </permacrud>
8319         </class>
8320
8321         <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">
8322                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8323                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8324                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8325                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8326                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8327                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8328                 </fields>
8329                 <links>
8330                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8331                 </links>
8332                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8333                         <actions>
8334                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8335                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8336                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8337                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8338                         </actions>
8339                 </permacrud>
8340         </class>
8341
8342         <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">
8343                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8344                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8345                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8346                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8347                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8348                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8349                         <field reporter:label="State" name="state" reporter:datatype="text" />
8350                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8351                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8352                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8353                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8354                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8355                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8356                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8357                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8358                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8359                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8360                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8361                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8362                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8363                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8364                 </fields>
8365                 <links>
8366                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8367                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8368                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8369                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8370                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8371                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8372                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8373                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8374                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8375                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8376                 </links>
8377                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8378                         <actions>
8379                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8380                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8381                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8382                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8383                         </actions>
8384                 </permacrud>
8385         </class>
8386
8387         <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">
8388                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8389                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8390                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8391                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8392                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8393                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8394                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8395                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8396                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8397                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8398                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8399                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8400                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8401                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8402                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8403                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8404                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8405                 </fields>
8406                 <links>
8407                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8408                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8409                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8410                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8411                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8412                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8413                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8414                 </links>
8415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8416             <actions>
8417                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8418             </actions>
8419                 </permacrud>
8420         </class>
8421
8422         <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">
8423                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8424                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8425                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8426                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8427                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8428                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8429                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8430                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8431                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8432                 </fields>
8433                 <links>
8434                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8435                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8436                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8437                 </links>
8438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8439             <actions>
8440                 <create permission="CREATE_PURCHASE_ORDER">
8441                     <context link="purchase_order" field="ordering_agency"/>
8442                 </create>
8443                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8444                     <context link="purchase_order" field="ordering_agency"/>
8445                 </retrieve>
8446                 <update permission="CREATE_PURCHASE_ORDER">
8447                     <context link="purchase_order" field="ordering_agency"/>
8448                 </update>
8449                 <delete permission="CREATE_PURCHASE_ORDER">
8450                     <context link="purchase_order" field="ordering_agency"/>
8451                 </delete>
8452             </actions>
8453                 </permacrud>
8454         </class>
8455
8456         <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">
8457                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8458                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8459                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8460                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8461                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8462                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8463                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8464                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8465                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8466                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8467                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8468                 </fields>
8469                 <links>
8470                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8471                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8472                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8473                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8474                 </links>
8475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8476             <actions>
8477                 <create permission="CREATE_PURCHASE_ORDER">
8478                     <context link="purchase_order" field="ordering_agency"/>
8479                 </create>
8480                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8481                     <context link="purchase_order" field="ordering_agency"/>
8482                 </retrieve>
8483                 <update permission="CREATE_PURCHASE_ORDER">
8484                     <context link="purchase_order" field="ordering_agency"/>
8485                 </update>
8486                 <delete permission="CREATE_PURCHASE_ORDER">
8487                     <context link="purchase_order" field="ordering_agency"/>
8488                 </delete>
8489             </actions>
8490                 </permacrud>
8491         </class>
8492
8493         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8494                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8495                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8496                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8497                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8498                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8499                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8500                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8501                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8502                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8503                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8504                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8505                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8506                         <field reporter:label="State" name="state" reporter:datatype="text" />
8507                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8508                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8509                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8510                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8511                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8512                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8513                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8514                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8515                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8516                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8517                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8518                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8519                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8520                 </fields>
8521                 <links>
8522                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8523                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8524                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8525                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8526                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8527                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8528                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8529                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8530                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8531                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8532                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8533                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8534                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8535                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8536                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8537                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8538                 </links>
8539                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8540                         <actions>
8541                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8542                                         <context link="purchase_order" field="ordering_agency"/>
8543                                         <context link="picklist" field="org_unit"/>
8544                                 </retrieve>
8545                         </actions>
8546                 </permacrud>
8547         </class>
8548
8549         <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">
8550                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8551                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8552                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8553                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8554                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8555                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8556                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8557                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8558                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8559                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8560                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8561                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8562                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8563                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8564                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8565                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8566                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8567                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8568                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8569                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8570                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8571                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8572                 </fields>
8573                 <links>
8574                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8575                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8576                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8577                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8578                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8579                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8580                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8581                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8582                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8583                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8584                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8585                 </links>
8586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8587                         <actions>
8588                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8589                                         <context link="purchase_order" field="ordering_agency"/>
8590                                         <context link="picklist" field="org_unit"/>
8591                                 </retrieve>
8592                         </actions>
8593                 </permacrud>
8594         </class>
8595
8596         <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">
8597                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8598                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8599                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8600                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8601                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8602                 </fields>
8603                 <links>
8604                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8605                 </links>
8606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8607                         <actions>
8608                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8609                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8610                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8611                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8612                         </actions>
8613                 </permacrud>
8614         </class>
8615
8616         <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">
8617                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8618                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8619                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8620                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8621                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8622                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8623                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8624                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8625                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8626                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8627                 </fields>
8628                 <links>
8629                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8630                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8631                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8632                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8633                 </links>
8634         </class>
8635
8636         <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">
8637                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8638                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8639                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8640                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8641                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8642                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8643                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8644                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8645                 </fields>
8646                 <links>
8647                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8648                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8649                 </links>
8650         </class>
8651
8652         <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">
8653                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8654                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8655                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8656                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8657                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8658                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8659                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8660                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8661                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8662                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8663                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8664                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8665                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8666                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8667                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8668                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8669                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8670                 </fields>
8671                 <links>
8672                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8673                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8674                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8675                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8676                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8677                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8678                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8679                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8680                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8681                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8682                 </links>
8683         </class>
8684
8685         <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">
8686                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8687                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8688                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8689                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8690                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8691                 </fields>
8692                 <links/>
8693                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8694                         <actions>
8695                                 <retrieve />
8696                         </actions>
8697                 </permacrud>
8698         </class>
8699
8700         <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">
8701                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8702                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8703                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8704                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8705                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8706                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8707             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8708                 </fields>
8709                 <links/>
8710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8711             <actions>
8712                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8713                 <retrieve />
8714                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8715                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8716             </actions>
8717         </permacrud>
8718         </class>
8719
8720         <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">
8721                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8722                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8723                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8724                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8725                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8726                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8727                 </fields>
8728                 <links/>
8729         </class>
8730         <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">
8731                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8732                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8733                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8734                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8735                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8736                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8737                 </fields>
8738                 <links>
8739                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8740                 </links>
8741         </class>
8742
8743         <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">
8744             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8745                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8746                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8747                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8748                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8749                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8750                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8751         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8752
8753             </fields>
8754             <links>
8755                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8756             </links>
8757             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8758                 <actions>
8759                     <create permission="ADMIN_PROVIDER">
8760                         <context link="provider" field="owner"/>
8761                     </create>
8762                     <retrieve permission="ADMIN_PROVIDER">
8763                         <context link="provider" field="owner"/>
8764                     </retrieve>
8765                     <update permission="ADMIN_PROVIDER">
8766                         <context link="provider" field="owner"/>
8767                     </update>
8768                     <delete permission="ADMIN_PROVIDER">
8769                         <context link="provider" field="owner"/>
8770                     </delete>
8771                 </actions>
8772             </permacrud>
8773         </class>
8774         
8775         <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">
8776             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8777                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8778                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8779                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8780                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8781             </fields>
8782             <links>
8783                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8784             </links>
8785             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8786                 <actions>
8787                     <create permission="ADMIN_PROVIDER">
8788                         <context link="provider" field="owner"/>
8789                     </create>
8790                     <retrieve permission="ADMIN_PROVIDER">
8791                         <context link="provider" field="owner"/>
8792                     </retrieve>
8793                     <update permission="ADMIN_PROVIDER">
8794                         <context link="provider" field="owner"/>
8795                     </update>
8796                     <delete permission="ADMIN_PROVIDER">
8797                         <context link="provider" field="owner"/>
8798                     </delete>
8799                 </actions>
8800             </permacrud>
8801         </class>
8802         
8803         <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">
8804             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8805                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8806                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8807                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8808                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8809                 </fields>
8810                 <links/>
8811         </class>
8812
8813         <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">
8814                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8815                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8816                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8817                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8818                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8819                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8820                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8821                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8822                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8823                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8824                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8825                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8826                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8827                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8828                 </fields>
8829                 <links>
8830                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8831                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8832                 </links>
8833         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8834             <actions>
8835                 <create permission="ADMIN_PROVIDER">
8836                     <context link="provider" field="owner"/>
8837                 </create>
8838                 <retrieve permission="ADMIN_PROVIDER">
8839                     <context link="provider" field="owner"/>
8840                 </retrieve>
8841                 <update permission="ADMIN_PROVIDER">
8842                     <context link="provider" field="owner"/>
8843                 </update>
8844                 <delete permission="ADMIN_PROVIDER">
8845                     <context link="provider" field="owner"/>
8846                 </delete>
8847             </actions>
8848         </permacrud>
8849         </class>
8850
8851         <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">
8852                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8853                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8854                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8855                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8856                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8857                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8858                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8859                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8860                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8861                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8862                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8863                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8864                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8865                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8866                 </fields>
8867                 <links>
8868                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8869                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8870                 </links>
8871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8872             <actions>
8873                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8874                     <context link="account" jump="provider" field="owner"/>
8875                 </retrieve>
8876                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8877                     <context link="account" jump="provider" field="owner"/>
8878                 </update>
8879                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8880                     <context link="account" jump="provider" field="owner"/>
8881                 </delete>
8882             </actions>
8883         </permacrud>
8884         </class>
8885
8886
8887         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8888                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8889                         <field name="id" reporter:datatype="id" />
8890                         <field name="parent" reporter:datatype="link"/>
8891                         <field name="owner" reporter:datatype="link"/>
8892                         <field name="create_time" reporter:datatype="timestamp"/>
8893                         <field name="name" reporter:datatype="text"/>
8894                         <field name="shared" reporter:datatype="bool"/>
8895                         <field name="share_with" reporter:datatype="link"/>
8896                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8897                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8898                 </fields>
8899                 <links>
8900                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8901                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8902                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8903                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8904                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8905                 </links>
8906         </class>
8907         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8908                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8909                         <field name="id" reporter:datatype="id" />
8910                         <field name="parent" reporter:datatype="link"/>
8911                         <field name="owner" reporter:datatype="link"/>
8912                         <field name="create_time" reporter:datatype="timestamp"/>
8913                         <field name="name" reporter:datatype="text"/>
8914                         <field name="shared" reporter:datatype="bool"/>
8915                         <field name="share_with" reporter:datatype="link"/>
8916                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8917                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8918                 </fields>
8919                 <links>
8920                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8921                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8922                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8923                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8924                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8925                 </links>
8926         </class>
8927         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8928                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8929                         <field name="id" reporter:datatype="id" />
8930                         <field name="parent" reporter:datatype="link"/>
8931                         <field name="owner" reporter:datatype="link"/>
8932                         <field name="create_time" reporter:datatype="timestamp"/>
8933                         <field name="name" reporter:datatype="text"/>
8934                         <field name="shared" reporter:datatype="bool"/>
8935                         <field name="share_with" reporter:datatype="link"/>
8936                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8937                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8938                 </fields>
8939                 <links>
8940                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8941                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8942                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8943                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8944                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8945                 </links>
8946         </class>
8947         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8948                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8949                         <field name="id" reporter:datatype="id" />
8950                         <field name="owner" reporter:datatype="link"/>
8951                         <field name="create_time" reporter:datatype="timestamp"/>
8952                         <field name="name" reporter:datatype="text"/>
8953                         <field name="data" reporter:datatype="text"/>
8954                         <field name="folder" reporter:datatype="link"/>
8955                         <field name="description" reporter:datatype="text"/>
8956                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8957                 </fields>
8958                 <links>
8959                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8960                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8961                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8962                 </links>
8963         </class>
8964         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8965                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8966                         <field name="id" reporter:datatype="id" />
8967                         <field name="owner" reporter:datatype="link"/>
8968                         <field name="create_time" reporter:datatype="timestamp"/>
8969                         <field name="template" reporter:datatype="link"/>
8970                         <field name="data" reporter:datatype="text"/>
8971                         <field name="folder" reporter:datatype="link"/>
8972                         <field name="recur" reporter:datatype="bool"/>
8973                         <field name="recurrence" reporter:datatype="interval"/>
8974                         <field name="name" reporter:datatype="text"/>
8975                         <field name="description" reporter:datatype="text"/>
8976                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8977                 </fields>
8978                 <links>
8979                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8980                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8981                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8982                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8983                 </links>
8984         </class>
8985         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8986                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8987                         <field name="id" reporter:datatype="id" />
8988                         <field name="runner" reporter:datatype="link"/>
8989                         <field name="start_time" reporter:datatype="timestamp"/>
8990                         <field name="complete_time" reporter:datatype="timestamp"/>
8991                         <field name="run_time" reporter:datatype="timestamp"/>
8992                         <field name="email" reporter:datatype="text"/>
8993                         <field name="excel_format" reporter:datatype="bool"/>
8994                         <field name="csv_format" reporter:datatype="bool"/>
8995                         <field name="html_format" reporter:datatype="bool"/>
8996                         <field name="error_code" reporter:datatype="int"/>
8997                         <field name="error_text" reporter:datatype="text"/>
8998                         <field name="report" reporter:datatype="link"/>
8999                         <field name="folder" reporter:datatype="link"/>
9000                         <field name="chart_pie" reporter:datatype="bool"/>
9001                         <field name="chart_bar" reporter:datatype="bool"/>
9002                         <field name="chart_line" reporter:datatype="bool"/>
9003                 </fields>
9004                 <links>
9005                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9006                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9007                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9008                 </links>
9009         </class>
9010         <class id="rmsr" controller="open-ils.reporter-store open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="reporter::materialized_simple_record" oils_persist:tablename="reporter.materialized_simple_record" reporter:label="Fast Simple Record Extracts">
9011                 <fields oils_persist:primary="id">
9012                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9013                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9014                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9015                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9016                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9017                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9018                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9019                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9020                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9021                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9022                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9023                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9024                 </fields>
9025                 <links>
9026                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9027                 </links>
9028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9029                         <actions>
9030                                 <retrieve />
9031                         </actions>
9032                 </permacrud>
9033         </class>
9034         <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">
9035                 <fields oils_persist:primary="id">
9036                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9037                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9038                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9039                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9040                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9041                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9042                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9043                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9044                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9045                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9046                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9047                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9048                 </fields>
9049                 <links>
9050                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9051                 </links>
9052         </class>
9053         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9054                 <fields oils_persist:primary="id">
9055                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9056                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9057                         <field reporter:label="Fingerprint" name="fingerprint" />
9058                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9059                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9060                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9061                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9062                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9063                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9064                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9065                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9066                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9067                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9068                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9069                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9070                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9071                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9072                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9073                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9074                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9075                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9076                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9077                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9078                 </fields>
9079                 <links>
9080                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9081                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9082                 </links>
9083         </class>
9084         <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">
9085                 <fields oils_persist:primary="id">
9086                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9087                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9088                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9089                 </fields>
9090                 <links>
9091                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9092                 </links>
9093         </class>
9094         <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">
9095                 <fields oils_persist:primary="id">
9096                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9097                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9098                 </fields>
9099                 <links>
9100                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9101                 </links>
9102         </class>
9103         <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">
9104                 <fields oils_persist:primary="id">
9105                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9106                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9107                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9108                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9109                 </fields>
9110                 <links>
9111                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9112                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9113                 </links>
9114         </class>
9115         <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">
9116                 <fields oils_persist:primary="xact">
9117                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9118                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9119                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9120                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9121                 </fields>
9122                 <links>
9123                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9124                 </links>
9125         </class>
9126         <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">
9127                 <fields oils_persist:primary="xact">
9128                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9129                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9130                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9131                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9132                 </fields>
9133                 <links>
9134                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9135                 </links>
9136         </class>
9137         <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)">
9138                 <fields oils_persist:primary="id">
9139                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9140                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9141                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9142                 </fields>
9143                 <links>
9144                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9145                 </links>
9146         </class>
9147         <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">
9148                 <fields oils_persist:primary="id">
9149                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9150                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9151                 </fields>
9152                 <links>
9153                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9154                 </links>
9155         </class>
9156         <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">
9157                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9158                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9159                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9160                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9161                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9162                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9163                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9164                 </fields>
9165                 <links>
9166                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9167                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9168                 </links>
9169                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9170                         <actions>
9171                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9172                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9173                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9174                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9175                         </actions>
9176                 </permacrud>
9177         </class>
9178         <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">
9179                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9180                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9181                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9182                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9183                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9184                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9185                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9186                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9187                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9188                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9189                 </fields>
9190                 <links>
9191                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9192                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9193                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9194                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9195                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9196                 </links>
9197                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9198                         <actions>
9199                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9200                                         <context link="formula" field="owner"/>
9201                                 </create>
9202                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9203                                         <context link="formula" field="owner"/>
9204                                 </retrieve>
9205                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9206                                         <context link="formula" field="owner"/>
9207                                 </update>
9208                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9209                                         <context link="formula" field="owner"/>
9210                                 </delete>
9211                         </actions>
9212                 </permacrud>
9213         </class>
9214
9215         <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">
9216                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9217                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9218                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9219                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9220                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9221                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9222                 </fields>
9223                 <links>
9224                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9225                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9226                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9227                 </links>
9228                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9229                         <actions>
9230                                 <create permission="CREATE_PURCHASE_ORDER">
9231                                         <context link="formula" field="owner"/>
9232                 </create>
9233                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9234                                         <context link="formula" field="owner"/>
9235                 </retrieve>
9236                                 <update permission="CREATE_PURCHASE_ORDER">
9237                                         <context link="formula" field="owner"/>
9238                 </update>
9239                                 <delete permission="CREATE_PURCHASE_ORDER">
9240                                         <context link="formula" field="owner"/>
9241                 </delete>
9242                         </actions>
9243                 </permacrud>
9244         </class>
9245
9246         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9247                 <fields oils_persist:primary="id">
9248                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9249                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9250                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9251                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9252                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9253                 </fields>
9254                 <links>
9255                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9256                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9257                 </links>
9258         </class>
9259
9260         <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">
9261                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9262                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9263                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9264                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9265                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9266                 </fields>
9267                 <links>
9268                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9269                 </links>
9270                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9271                         <actions>
9272                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9273                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9274                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9275                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9276                         </actions>
9277                 </permacrud>
9278         </class>
9279
9280         <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">
9281                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9282                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9283                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9284                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9285                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9286                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9287                 </fields>
9288                 <links>
9289                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9290                 </links>
9291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9292                         <actions>
9293                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9294                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9295                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9296                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9297                         </actions>
9298                 </permacrud>
9299         </class>
9300
9301         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9302                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9303                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9304                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9305                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9306                 </fields>
9307                 <links>
9308                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9309                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9310                 </links>
9311         </class>
9312
9313         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9314                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9315                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9316                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9317                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9318                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9319                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9320                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9321                 </fields>
9322                 <links>
9323                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9324                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9325                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9326                 </links>
9327         </class>
9328
9329         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9330                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9331                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9332                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9333                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9334                 </fields>
9335                 <links>
9336                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9337                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9338                 </links>
9339         </class>
9340
9341         <class id="acqscle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim_event" oils_persist:tablename="acq.serial_claim_event" reporter:label="Serial Claim Event">
9342                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9343                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9344                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9345                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9346                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9347                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9348                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9349                 </fields>
9350                 <links>
9351                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9352                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9353                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9354                 </links>
9355         </class>
9356
9357         <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">
9358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9359                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9360                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9361                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9362                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9363                 </fields>
9364                 <links>
9365                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9366                 </links>
9367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9368             <actions>
9369                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9370                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9371                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9372                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9373             </actions>
9374                 </permacrud>
9375         </class>
9376
9377         <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">
9378                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9379                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9380                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9381                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9382                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9383                 </fields>
9384                 <links>
9385                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9386                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9387                 </links>
9388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9389                         <actions>
9390                                 <create permission="ADMIN_CLAIM_POLICY">
9391                                         <context link="claim_policy" field="org_unit"/>
9392                 </create>
9393                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9394                                         <context link="claim_policy" field="org_unit"/>
9395                 </retrieve>
9396                                 <update permission="ADMIN_CLAIM_POLICY">
9397                                         <context link="claim_policy" field="org_unit"/>
9398                 </update>
9399                                 <delete permission="ADMIN_CLAIM_POLICY">
9400                                         <context link="claim_policy" field="org_unit"/>
9401                 </delete>
9402                         </actions>
9403                 </permacrud>
9404         </class>
9405
9406     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9407         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9408             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9409             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9410             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9411             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9412             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9413             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9414             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9415             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9416             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9417             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9418             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9419             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9420             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9421             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9422             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9423             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9424         </fields>
9425         <links>
9426             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9427         </links>
9428     </class>
9429
9430     <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">
9431         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9432             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9433             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9434             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9435             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9436             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9437         </fields>
9438     </class>
9439
9440     <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">
9441         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9442             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9443             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9444             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9445             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9446             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9447             <field reporter:label="City" name="city" reporter:datatype="text"/>
9448             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9449             <field reporter:label="State" name="state" reporter:datatype="text"/>
9450             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9451             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9452             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9453         </fields>
9454     </class>
9455
9456     <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">
9457         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9458             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9459             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9460             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9461             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9462             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9463             <field reporter:label="City" name="city" reporter:datatype="text"/>
9464             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9465             <field reporter:label="State" name="state" reporter:datatype="text"/>
9466             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9467             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9468             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9469         </fields>
9470     </class>
9471
9472     <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">
9473         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9474             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9475             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9476             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9477             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9478             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9479             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9480         </fields>
9481     </class>
9482
9483         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9484                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9485                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9486                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9487                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9488                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9489                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9490                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9491                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9492                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9493                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9494                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9495                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9496                 </fields>
9497                 <links>
9498                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9499                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9500                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9501                 </links>
9502         </class>
9503
9504         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9505                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9506                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9507                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9508                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9509                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9510                 </fields>
9511                 <links>
9512                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9513                 </links>
9514         </class>
9515
9516     <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">
9517         <fields>
9518             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9519             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9520             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9521         </fields>
9522                 <links>
9523                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9524                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9525                 </links>
9526     </class>
9527
9528     <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">
9529         <fields>
9530             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9531             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9532         </fields>
9533                 <links>
9534                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9535                 </links>
9536     </class>
9537
9538     <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">
9539         <fields>
9540             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9541             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9542             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9543         </fields>
9544                 <links>
9545                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9546                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9547                 </links>
9548     </class>
9549
9550     <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">
9551         <fields>
9552             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9553             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9554         </fields>
9555                 <links>
9556                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9557                 </links>
9558     </class>
9559
9560     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9561                 <oils_persist:source_definition>
9562
9563             SELECT  DISTINCT l.*
9564               FROM  action.unfulfilled_hold_loops l
9565                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9566               WHERE l.count = m.max
9567
9568                 </oils_persist:source_definition>
9569         <fields>
9570             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9571             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9572             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9573         </fields>
9574                 <links>
9575                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9576                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9577                 </links>
9578     </class>
9579
9580         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9581                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9582                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9583                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9584                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9585                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9586                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9587                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9588                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9589                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9590                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9591                 </fields>
9592                 <links>
9593                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9594                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9595                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9596                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9597                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9598                 </links>
9599         </class>
9600
9601         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9602                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9603                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9604                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9605                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9606                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9607                 </fields>
9608                 <links>
9609                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9610                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9611                 </links>
9612         </class>
9613
9614         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9615                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9616                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9617                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9618                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9619                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9620                 </fields>
9621                 <links>
9622                 </links>
9623         </class>
9624
9625         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9626                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9627                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9628                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9629                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9630                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9631                 </fields>
9632                 <links>
9633                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9634                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9635                 </links>
9636         </class>
9637         
9638         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9639                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9640                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9641                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9642                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9643                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9644                 </fields>
9645                 <links>
9646                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9647                 </links>
9648         </class>
9649         
9650         <class id="qfpd" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_param_def" oils_persist:tablename="query.function_param_def" reporter:label="Function Parameter Definition">
9651                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9652                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9653                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9654                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9655                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9656                 </fields>
9657                 <links>
9658                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9659                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9660                 </links>
9661         </class>
9662
9663         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9664                 <fields oils_persist:primary="name">
9665                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9666                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9667                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9668                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9669                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9670                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9671                 </fields>
9672                 <links>
9673                 </links>
9674         </class>
9675
9676         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9677                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9678                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9679                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9680                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9681                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9682                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9683                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9684                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9685                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9686                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9687                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9688                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9689                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9690                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9691                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9692                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9693                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9694                 </fields>
9695                 <links>
9696                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9697                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9698                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9699                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9700                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9701                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9702                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9703                 </links>
9704         </class>
9705
9706         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9707                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9708                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9709                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9710                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9711                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9712                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9713                 </fields>
9714                 <links>
9715                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9716                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9717                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9718                 </links>
9719         </class>
9720
9721         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9722                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9723                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9724                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9725                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9726                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9727                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9728                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9729                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9730                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9731                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9732                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9733                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9734                 </fields>
9735                 <links>
9736                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9737                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9738                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9739                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9740                 </links>
9741         </class>
9742
9743         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9744                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9745                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9746                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9747                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9748                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9749                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9750                 </fields>
9751                 <links>
9752                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9753                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9754                 </links>
9755         </class>
9756
9757         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9758                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9759                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9760                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9761                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9762                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9763                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9764                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9765                 </fields>
9766                 <links>
9767                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9768                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9769                 </links>
9770         </class>
9771
9772         <class id="qobi" controller="open-ils.cstore" oils_obj:fieldmapper="query::order_by_item" oils_persist:tablename="query.order_by_item" reporter:label="Order By Item">
9773                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9774                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9775                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9776                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9777                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9778                 </fields>
9779                 <links>
9780                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9781                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9782                 </links>
9783         </class>
9784
9785         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9786                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9787                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9788                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9789                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9790                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9791                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9792                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9793                 </fields>
9794                 <links>
9795                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9796                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9797                 </links>
9798         </class>
9799
9800         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9801                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9802                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9803                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9804                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9805                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9806                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9807                 </fields>
9808                 <links>
9809                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9810                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9811                 </links>
9812         </class>
9813
9814         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9815                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9816                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9817                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9818                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9819                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9820                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9821                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9822                 </fields>
9823                 <links>
9824                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9825                 </links>
9826         </class>
9827
9828         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9829                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9830                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9831                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9832                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9833                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9834                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9835                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9836                 </fields>
9837                 <links>
9838                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9839                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9840                 </links>
9841         </class>
9842
9843         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9844                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9845                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9846                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9847                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9848                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9849                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9850                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9851                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9852                 </fields>
9853                 <links>
9854                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9855                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9856                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9857                 </links>
9858         </class>
9859
9860         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9861                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9862                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9863                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9864                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9865                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9866                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9867                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9868                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9869                 </fields>
9870                 <links>
9871                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9872                 </links>
9873         </class>
9874
9875         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9876                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9877                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9878                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9879                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9880                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9881                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9882                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9883                 </fields>
9884                 <links>
9885                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9886                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9887                 </links>
9888         </class>
9889
9890         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9891                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9892                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9893                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9894                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9895                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9896                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9897                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9898                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9899                 </fields>
9900                 <links>
9901                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9902                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9903                 </links>
9904         </class>
9905
9906         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9907                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9908                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9909                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9910                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9911                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9912                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9913                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9914                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9915                 </fields>
9916                 <links>
9917                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9918                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9919                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9920                 </links>
9921         </class>
9922
9923         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9924                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9925                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9926                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9927                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9928                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9929                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9930                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9931                 </fields>
9932                 <links>
9933                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9934                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9935                 </links>
9936         </class>
9937
9938         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9939                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9940                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9941                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9942                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9943                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9944                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9945                 </fields>
9946                 <links>
9947                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9948                 </links>
9949         </class>
9950
9951         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9952                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9953                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9954                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9955                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9956                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9957                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9958                 </fields>
9959                 <links>
9960                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9961                 </links>
9962         </class>
9963
9964         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9965                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9966                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9967                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9968                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9969                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9970                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9971                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9972                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9973                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9974                 </fields>
9975                 <links>
9976                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9977                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9978                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9979                 </links>
9980         </class>
9981
9982         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9983                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9984                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9985                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9986                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9987                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9988                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9989                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9990                 </fields>
9991                 <links>
9992                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9993                 </links>
9994         </class>
9995
9996         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9997                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9998                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9999                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10000                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10001                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10002                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10003                 </fields>
10004                 <links>
10005                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10006                 </links>
10007         </class>
10008
10009         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10010                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10011                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10012                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10013                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10014                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10015                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10016                 </fields>
10017                 <links>
10018                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10019                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10020                 </links>
10021         </class>
10022
10023         <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">
10024                 <fields oils_persist:primary="id">
10025                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10026                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10027                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10028                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10029                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10030                 </fields>
10031                 <links>
10032                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10033                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10034                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10035                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10036                 </links>
10037         </class>
10038
10039         <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">
10040                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10041                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10042                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10043                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10044                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10045                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10046                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10047                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10048                 </fields>
10049                 <links/>
10050                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10051                         <actions>
10052                                 <retrieve/>
10053                         </actions>
10054                 </permacrud>
10055         </class>
10056
10057         <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">
10058                 <fields oils_persist:primary="ptype_key">
10059                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10060                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10061                 </fields>
10062                 <links/>
10063                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10064                         <actions>
10065                                 <retrieve/>
10066                         </actions>
10067                 </permacrud>
10068         </class>
10069
10070         <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">
10071                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10072                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10073                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10074                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10075                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10076                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10077                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10078                 </fields>
10079                 <links>
10080                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10081                 </links>
10082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10083                         <actions>
10084                                 <retrieve/>
10085                         </actions>
10086                 </permacrud>
10087         </class>
10088
10089         <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">
10090                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10091                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10092                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10093                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10094                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10095                 </fields>
10096                 <links>
10097                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10098                 </links>
10099                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10100                         <actions>
10101                                 <retrieve/>
10102                         </actions>
10103                 </permacrud>
10104         </class>
10105
10106     <class
10107         id="uvs"
10108         controller="open-ils.cstore open-ils.pcrud"
10109         oils_obj:fieldmapper="url_verify::session"
10110         oils_persist:tablename="url_verify.session"
10111         reporter:label="URL Verification Session"
10112     >
10113         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10114             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10115             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10116                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10117             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10118             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10119             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10120             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10121             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10122             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10123         </fields>
10124
10125         <links>
10126             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10127             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10128             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10129             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10130             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10131         </links>
10132
10133         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10134             <actions>
10135                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10136             </actions>
10137         </permacrud>
10138
10139     </class>
10140
10141     <class id="uvsbrem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="url_verify::session_biblio_record_entry_map" oils_persist:readonly="true" reporter:label="URL Verify Session Biblio Record Entry Map">
10142         <oils_persist:source_definition>
10143             SELECT
10144                 cbrebi.id AS id,  -- so we can have a pkey in our view
10145                 uvs.id AS session,
10146                 uvs.owning_lib,
10147                 cbrebi.target_biblio_record_entry
10148             FROM url_verify.session uvs
10149             JOIN container.biblio_record_entry_bucket cbreb
10150                 ON (uvs.container = cbreb.id)
10151             JOIN container.biblio_record_entry_bucket_item cbrebi
10152                 ON (cbrebi.bucket = cbreb.id)
10153         </oils_persist:source_definition>
10154         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10155             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10156             <field reporter:label="Session" name="session" reporter:datatype="link" />
10157             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10158             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10159         </fields>
10160         <links>
10161             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10162             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10163             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10164         </links>
10165         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10166             <actions>
10167                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10168             </actions>
10169         </permacrud>
10170     </class>
10171
10172     <class
10173         id="uvus"
10174         controller="open-ils.cstore open-ils.pcrud"
10175         oils_obj:fieldmapper="url_verify::url_selector"
10176         oils_persist:tablename="url_verify.url_selector"
10177         reporter:label="URL Verification URL Selector"
10178     >
10179         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10180             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10181             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10182                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10183             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10184         </fields>
10185
10186         <links>
10187             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10188             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10189         </links>
10190
10191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10192             <actions>
10193                 <create permission="URL_VERIFY">
10194                     <context link="session" field="owning_lib"/>
10195                 </create>
10196                 <retrieve permission="URL_VERIFY">
10197                     <context link="session" field="owning_lib"/>
10198                 </retrieve>
10199                 <update permission="URL_VERIFY">
10200                     <context link="session" field="owning_lib"/>
10201                 </update>
10202                 <delete permission="URL_VERIFY">
10203                     <context link="session" field="owning_lib"/>
10204                 </delete>
10205             </actions>
10206         </permacrud>
10207
10208     </class>
10209
10210     <class
10211         id="uvu"
10212         controller="open-ils.cstore open-ils.pcrud"
10213         oils_obj:fieldmapper="url_verify::url"
10214         oils_persist:tablename="url_verify.url"
10215         reporter:label="URL Verification URL"
10216     >
10217         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10218             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10219                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10220                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10221                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10222                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10223             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10224             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10225             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10226             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10227             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10228             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10229             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10230             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10231             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10232             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10233             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10234             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10235             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10236         </fields>
10237
10238         <links>
10239             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10240             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10241             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10242             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10243             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10244         </links>
10245
10246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10247             <actions>
10248                 <create permission="URL_VERIFY">
10249                     <context link="session" field="owning_lib"/>
10250                 </create>
10251                 <retrieve permission="URL_VERIFY">
10252                     <context link="session" field="owning_lib"/>
10253                 </retrieve>
10254                 <update permission="URL_VERIFY">
10255                     <context link="session" field="owning_lib"/>
10256                 </update>
10257                 <delete permission="URL_VERIFY">
10258                     <context link="session" field="owning_lib"/>
10259                 </delete>
10260             </actions>
10261         </permacrud>
10262
10263     </class>
10264
10265     <class
10266         id="uvva"
10267         controller="open-ils.cstore open-ils.pcrud"
10268         oils_obj:fieldmapper="url_verify::verification_attempt"
10269         oils_persist:tablename="url_verify.verification_attempt"
10270         reporter:label="URL Verification Attempt"
10271     >
10272         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10273             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10274                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10275                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10276             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10277             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10278         </fields>
10279
10280         <links>
10281             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10282             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10283         </links>
10284
10285         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10286             <actions>
10287                 <create permission="URL_VERIFY">
10288                     <context link="session" field="owning_lib"/>
10289                 </create>
10290                 <retrieve permission="URL_VERIFY">
10291                     <context link="session" field="owning_lib"/>
10292                 </retrieve>
10293                 <update permission="URL_VERIFY">
10294                     <context link="session" field="owning_lib"/>
10295                 </update>
10296                 <delete permission="URL_VERIFY">
10297                     <context link="session" field="owning_lib"/>
10298                 </delete>
10299             </actions>
10300         </permacrud>
10301
10302     </class>
10303
10304     <class
10305         id="uvuv"
10306         controller="open-ils.cstore open-ils.pcrud"
10307         oils_obj:fieldmapper="url_verify::url_verification"
10308         oils_persist:tablename="url_verify.url_verification"
10309         reporter:label="URL Verification"
10310     >
10311         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10312             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10313                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10314                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10315             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10316             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10317             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10318             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10319                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10320         </fields>
10321
10322         <links>
10323             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10324             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10325             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10326         </links>
10327
10328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10329             <actions>
10330                 <create permission="URL_VERIFY">
10331                     <context link="attempt" jump="session" field="owning_lib"/>
10332                 </create>
10333                 <retrieve permission="URL_VERIFY">
10334                     <context link="attempt" jump="session" field="owning_lib"/>
10335                 </retrieve>
10336                 <update permission="URL_VERIFY">
10337                     <context link="attempt" jump="session" field="owning_lib"/>
10338                 </update>
10339                 <delete permission="URL_VERIFY">
10340                     <context link="attempt" jump="session" field="owning_lib"/>
10341                 </delete>
10342             </actions>
10343         </permacrud>
10344
10345     </class>
10346
10347         <class
10348                 id="cfdi"
10349                 controller="open-ils.cstore open-ils.pcrud"
10350                 oils_obj:fieldmapper="config::filter_dialog_interface"
10351                 oils_persist:tablename="config.filter_dialog_interface"
10352                 reporter:label="FilterDialog Interface">
10353                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10354                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10355                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10356                 </fields>
10357                 <links>
10358                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10359                 </links>
10360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10361                         <actions>
10362                                 <retrieve />
10363                         </actions>
10364                 </permacrud>
10365         </class>
10366
10367         <class
10368                 id="cfdfs"
10369                 controller="open-ils.cstore open-ils.pcrud"
10370                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10371                 oils_persist:tablename="config.filter_dialog_filter_set"
10372                 reporter:label="FilterDialog Filter Set">
10373                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10374                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10375                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10376                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10377                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10378                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10379                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10380                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10381                 </fields>
10382                 <links>
10383                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10384                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10385                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10386                 </links>
10387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10388                         <actions>
10389                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10390                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10391                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10392                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10393                         </actions>
10394                 </permacrud>
10395
10396         </class>
10397
10398         <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">
10399                 <fields oils_persist:primary="code">
10400                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10401                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10402                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10403                 </fields>
10404                 <links/>
10405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10406                         <actions>
10407                                 <retrieve/>
10408                         </actions>
10409                 </permacrud>
10410         </class>
10411
10412         <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">
10413                 <oils_persist:source_definition>
10414
10415             SELECT  b.id,
10416                     MAX(dcp.edit_date) AS last_delete_date
10417              FROM   biblio.record_entry b
10418                     JOIN asset.call_number cn ON (cn.record = b.id)
10419                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10420              WHERE  NOT b.deleted
10421              GROUP BY b.id
10422              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10423
10424                 </oils_persist:source_definition>
10425                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10426                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10427                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10428                 </fields>
10429                 <links>
10430                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10431                 </links>
10432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10433                         <actions>
10434                                 <retrieve/>
10435                         </actions>
10436                 </permacrud>
10437         </class>
10438
10439         <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">
10440                 <oils_persist:source_definition>
10441
10442             -- -- 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.
10443             -- -- 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
10444             -- -- may not.
10445             -- SELECT
10446             --     bre.id AS "bib_id",
10447             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10448             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10449             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10450             -- FROM (
10451                 SELECT
10452                     y.bre AS "id",
10453                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10454                     y.hold_count AS "hold_count",
10455                     (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"
10456                 FROM (
10457                         SELECT
10458                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10459                             COUNT(*) AS "hold_count"
10460                         FROM action.hold_request h
10461                         WHERE
10462                             cancel_time IS NULL
10463                             AND fulfillment_time IS NULL
10464                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10465                         GROUP BY 1
10466                     )y LEFT JOIN (
10467                         SELECT 
10468                             (SELECT id
10469                                 FROM biblio.record_entry 
10470                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10471                             ) AS "bre", 
10472                             COUNT(*) AS "copy_count"
10473                         FROM asset.copy
10474                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10475                         WHERE copy.holdable 
10476                             AND NOT copy.deleted 
10477                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10478                         GROUP BY 1
10479                     )x ON x.bre = y.bre
10480                 -- )z RIGHT JOIN (
10481                 --     SELECT id
10482                 --     FROM biblio.record_entry
10483                 --     WHERE NOT deleted
10484                 -- )bre ON (z.bib_id = bre.id)
10485                 
10486
10487                 </oils_persist:source_definition>
10488                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10489                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10490                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10491                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10492                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10493                 </fields>
10494                 <links>
10495                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10496                 </links>
10497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10498                         <actions>
10499                                 <retrieve/>
10500                         </actions>
10501                 </permacrud>
10502         </class>
10503
10504         <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">
10505                 <oils_persist:source_definition>
10506             SELECT *,
10507                 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,
10508                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10509             FROM
10510                 (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
10511                     FROM
10512                         action.hold_request ahr
10513                         JOIN reporter.hold_request_record rhrr USING (id)
10514                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10515                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10516                     WHERE
10517                         ahr.cancel_time IS NULL
10518                         AND ahr.fulfillment_time IS NULL
10519                     GROUP BY bib_record, pickup_lib
10520                 )x
10521                 JOIN
10522                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10523                     FROM
10524                         action.hold_request ahr
10525                         JOIN reporter.hold_request_record rhrr USING (id)
10526                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10527                     WHERE
10528                         ahr.cancel_time IS NULL
10529                         AND ahr.fulfillment_time IS NULL
10530                     GROUP BY bib_record
10531                 )y
10532                 USING (id)
10533                 </oils_persist:source_definition>
10534                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10535                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10536                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10537                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10538                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10539                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10540                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10541                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10542                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10543                 </fields>
10544                 <links>
10545                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10546                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10547                 </links>
10548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10549                         <actions>
10550                                 <retrieve/>
10551                         </actions>
10552                 </permacrud>
10553         </class>
10554
10555         <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">
10556                 <oils_persist:source_definition>
10557             SELECT
10558                 ac.id,
10559                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10560                 MAX(actac.xact_start) AS last_circ
10561             FROM asset.copy ac
10562                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10563             GROUP BY ac.id
10564
10565             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10566             --SELECT
10567             --    ac.id,
10568             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10569             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10570             --FROM asset.copy ac
10571             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10572             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10573             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10574                 </oils_persist:source_definition>
10575                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10576                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10577                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10578                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10579                 </fields>
10580                 <links>
10581                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10582                 </links>
10583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10584                         <actions>
10585                                 <retrieve/>
10586                         </actions>
10587                 </permacrud>
10588         </class>
10589
10590         <class id="ctcl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::ts_config_list" oils_persist:tablename="config.ts_config_list" reporter:label="Text Search Configs">
10591                 <fields oils_persist:primary="id">
10592                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10593                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10594                 </fields>
10595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10596                         <actions>
10597                                 <retrieve/>
10598                         </actions>
10599                 </permacrud>
10600         </class>
10601
10602         <class id="cmcts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class_ts_map" oils_persist:tablename="config.metabib_class_ts_map" reporter:label="Metabib Class TS Map">
10603                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10604                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10605                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10606                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10607                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10608                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10609                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10610                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10611                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10612                 </fields>
10613                 <links>
10614                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10615                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10616                 </links>
10617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10618                         <actions>
10619                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10620                                 <retrieve/>
10621                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10622                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10623                         </actions>
10624                 </permacrud>
10625         </class>
10626
10627         <class id="cmfts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field_ts_map" oils_persist:tablename="config.metabib_field_ts_map" reporter:label="Metabib Field TS Map">
10628                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10629                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10630                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10631                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10632                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10633                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10634                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10635                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10636                 </fields>
10637                 <links>
10638                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10639                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10640                 </links>
10641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10642                         <actions>
10643                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10644                                 <retrieve/>
10645                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10646                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10647                         </actions>
10648                 </permacrud>
10649         </class>
10650
10651
10652         <!-- ********************************************************************************************************************* -->
10653         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10654         <!-- ********************************************************************************************************************* -->
10655         <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">
10656                 <fields oils_persist:primary="id">
10657                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10658                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10659                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10660                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10661                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10662                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10663                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10664                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10665                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10666                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10667                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10668                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10669                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10670                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10671                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10672                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10673                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10674                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10675                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10676                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10677                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10678                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10679                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10680                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10681                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10682                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10683                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10684                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10685                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10686                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10687                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10688                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10689                 </fields>
10690                 <links>
10691                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10692                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10693                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10694                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10695                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10696                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10697                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10698                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10699                 </links>
10700         </class>
10701
10702         <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">
10703                 <fields oils_persist:primary="id">
10704                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10705                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10706                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10707                 </fields>
10708                 <links>
10709                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10710                 </links>
10711         </class>
10712
10713         <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">
10714                 <fields oils_persist:primary="id">
10715                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10716                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10717                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10718                 </fields>
10719                 <links>
10720                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10721                 </links>
10722         </class>
10723
10724         <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">
10725                 <fields oils_persist:primary="id">
10726                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10727
10728                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10729                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10730                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10731
10732                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10733                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10734                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10735
10736                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10737                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10738
10739                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10740                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10741                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10742
10743                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10744                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10745
10746                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10747                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10748                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10749
10750                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10751                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10752                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10753
10754                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10755                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10756                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10757                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10758
10759                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10760                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10761
10762                 </fields>
10763                 <links>
10764                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10765                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10766                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10767                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10768                 </links>
10769         </class>
10770
10771         <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">
10772                 <oils_persist:source_definition>
10773
10774             SELECT
10775                 po.ordering_agency AS ordering_agency,
10776                 po.id AS purchase_order,
10777                 li.id AS lineitem,
10778                 lid.id AS lineitem_detail,
10779                 cpa.id AS claim_policy_action
10780             FROM
10781                 acq.lineitem_detail lid
10782                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10783                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10784                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10785                 JOIN acq.claim_policy_action cpa ON (
10786                     cpa.claim_policy = cp.id
10787
10788                     -- we only care about claim policy actions whose claim
10789                     -- interval we'd reached or exceeded
10790                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10791
10792                     -- filter out all claim policy actions where claim events
10793                     -- have occurred on or after the action's action_interval
10794                     AND NOT EXISTS (
10795                         SELECT 1
10796                         FROM
10797                             acq.claim_event evt
10798                             JOIN acq.claim claim ON (
10799                                 claim.id = evt.claim
10800                                 AND claim.lineitem_detail = lid.id
10801                             )
10802                         WHERE
10803                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10804                     )
10805                 )
10806             WHERE
10807                 lid.cancel_reason IS NULL
10808                 AND li.cancel_reason IS NULL -- belt/suspenders
10809                 AND po.cancel_reason IS NULL -- belt/suspenders
10810                 AND lid.recv_time IS NULL
10811                 AND po.state = 'on-order'
10812             ORDER BY 1, 2, 3, 4, 5
10813
10814                 </oils_persist:source_definition>
10815                 <fields>
10816                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10817                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10818                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10819                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10820                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10821                 </fields>
10822                 <links>
10823                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10824                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10825                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10826                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10827                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10828                 </links>
10829         </class>
10830         <class id="acqlisum" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary" oils_persist:readonly="true" reporter:label="Lineitem Summary" oils_persist:tablename="acq.lineitem_summary">
10831                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10832                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10833                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10834                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10835                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10836                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10837                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10838                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10839                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10840                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10841                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10842                 </fields>
10843                 <links>
10844                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10845                 </links>
10846     </class>
10847         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10848                 <oils_persist:source_definition>
10849             SELECT * FROM acq.lineitem_summary 
10850                                 WHERE item_count > (invoice_count + cancel_count)
10851         </oils_persist:source_definition>
10852                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10853                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10854                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10855                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10856                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10857                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10858                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10859                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10860                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10861                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10862                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10863                 </fields>
10864                 <links>
10865                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10866                 </links>
10867     </class>
10868         <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">
10869                 <oils_persist:source_definition>
10870
10871                         SELECT  t.*
10872                           FROM  action.transit_copy t
10873                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10874                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10875                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10876
10877                 </oils_persist:source_definition>
10878                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10879                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10880                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10881                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10882                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10883                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10884                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10885                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10886                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10887                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10888                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10889                 </fields>
10890                 <links>
10891                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10892                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10893                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10894                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10895                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10896                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10897                 </links>
10898         </class>
10899
10900     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10901                 <oils_persist:source_definition>
10902
10903         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10904                 SELECT
10905                         cp.id as copy,
10906                         COUNT(circ.id),
10907                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10908                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10909                 FROM
10910                         asset.copy cp
10911                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10912                 GROUP BY 1, 3, 4
10913                 UNION ALL
10914                 SELECT
10915                         cp.id as copy,
10916                         COUNT(circ.id),
10917                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10918                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10919                 FROM
10920                         asset.copy cp
10921                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10922                 GROUP BY 1, 3, 4
10923                 UNION ALL
10924                 SELECT
10925                         id as copy,
10926                         circ_count,
10927                         -1 AS year,
10928                         false as is_renewal
10929                 FROM
10930                         extend_reporter.legacy_circ_count
10931         )x GROUP BY 1, 3, 4
10932
10933                 </oils_persist:source_definition>
10934         <fields>
10935             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10936             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10937             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10938             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10939         </fields>
10940                 <links>
10941                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10942                 </links>
10943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10944                         <actions>
10945                                 <retrieve/>
10946                         </actions>
10947                 </permacrud>
10948     </class>
10949
10950         <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">
10951                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10952                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10953                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10954                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10955                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10956                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10957                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10958                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10959                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10960                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10961                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10962                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10963                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10964                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10965                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10966                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10967                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10968                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10969                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10970                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10971                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10972                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10973                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10974                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10975                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10976                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10977                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10978                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10979                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10980                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10981                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10982                 </fields>
10983                 <links>
10984                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10985                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10986                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10987                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10988                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10989                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10990                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10991                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10992                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10993                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10994                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10995                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10996                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10997                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10998                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10999                 </links>
11000         </class>
11001
11002     <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">
11003         <fields oils_persist:primary="id">
11004             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11005             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11006             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11007             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11008             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11009             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11010             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11011             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11012             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11013             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11014             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11015             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11016             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11017             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11018             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11019             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11020             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11021             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11022             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11023             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11024             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11025             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11026             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11027             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11028             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11029             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11030             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11031             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11032             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11033             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11034             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11035             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11036             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11037             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11038         </fields>
11039         <links>
11040             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11041             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11042             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11043             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11044             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11045             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11046             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11047             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11048         </links>
11049     </class>
11050
11051     <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">
11052         <fields oils_persist:primary="id">
11053             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11054             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11055             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11056             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11057         </fields>
11058         <links>
11059             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11060             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11061         </links>
11062     </class>
11063
11064     <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">
11065         <fields oils_persist:primary="owning_lib">
11066             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11067             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11068             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11069         </fields>
11070         <links>
11071             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11072         </links>
11073     </class>
11074
11075     <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">
11076         <fields oils_persist:primary="id">
11077             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11078             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11079             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11080             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11081             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11082         </fields>
11083         <links>
11084             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11085             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11086             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11087         </links>
11088     </class>
11089
11090     <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">
11091         <fields oils_persist:primary="circ_lib">
11092             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11093             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11094             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11095             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11096         </fields>
11097         <links>
11098             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11099             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11100         </links>
11101     </class>
11102
11103     <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">
11104         <fields oils_persist:primary="id">
11105             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11106             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11107             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11108             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11109             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11110         </fields>
11111         <links>
11112             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11113             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11114             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11115         </links>
11116     </class>
11117
11118     <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">
11119         <fields oils_persist:primary="home_ou">
11120             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11121             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11122             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11123             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11124         </fields>
11125         <links>
11126             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11127             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11128         </links>
11129     </class>
11130         <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">
11131                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11132                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11133                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11134                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11135                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11136                 </fields>
11137                 <links>
11138                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11139                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11140                 </links>
11141                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11142                         <actions>
11143                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11144                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11145                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11146                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11147                         </actions>
11148                 </permacrud>
11149         </class>
11150         <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">
11151                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11152                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11153                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11154                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11155                 </fields>
11156                 <links>
11157                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11158                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11159                         </links>
11160                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11161                 <actions>
11162                                 <create permission="ADMIN_ACQ_FUND_TAG">
11163                                         <context link="tag" field="owner"/>
11164                                 </create>
11165                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11166                                         <context link="tag" field="owner"/>
11167                                 </retrieve>
11168                                 <update permission="ADMIN_ACQ_FUND_TAG">
11169                                         <context link="tag" field="owner"/>
11170                                 </update>
11171                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11172                                         <context link="tag" field="owner"/>
11173                                 </delete>
11174                         </actions>
11175                 </permacrud>
11176         </class>
11177         <class id="acqmapinv" controller="open-ils.cstore" oils_obj:fieldmapper="acq::map_to_invoice" reporter:label="Acq Map to Invoice View" oils_persist:readonly="true">
11178                 <oils_persist:source_definition><![CDATA[
11179                 SELECT
11180                         poi.purchase_order AS purchase_order,
11181                         ii.invoice AS invoice,
11182                         NULL AS lineitem,
11183                         poi.id AS po_item,
11184                         NULL AS picklist
11185                 FROM
11186                         acq.po_item poi
11187                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11188                 UNION SELECT
11189                         jub.purchase_order AS purchase_order,
11190                         ie.invoice AS invoice,
11191                         jub.id AS lineitem,
11192                         NULL AS po_item,
11193                         jub.picklist AS picklist
11194                 FROM
11195                         acq.lineitem jub
11196                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11197                 UNION SELECT
11198                         ii.purchase_order AS purchase_order,
11199                         ii.invoice AS invoice,
11200                         NULL AS lineitem,
11201                         NULL AS po_item,
11202                         NULL AS picklist
11203                 FROM
11204                         acq.invoice_item ii
11205                 WHERE ii.po_item IS NULL
11206                 UNION SELECT
11207                         ie.purchase_order AS purchase_order,
11208                         ie.invoice AS invoice,
11209                         NULL AS lineitem,
11210                         NULL AS po_item,
11211                         NULL AS picklist
11212                 FROM
11213                         acq.invoice_entry ie
11214                 WHERE ie.lineitem IS NULL
11215                 UNION SELECT
11216                         NULL AS purchase_order,
11217                         NULL AS invoice,
11218                         jub.id AS lineitem,
11219                         NULL AS po_item,
11220                         jub.picklist AS picklist
11221                 FROM
11222                         acq.lineitem jub
11223                 WHERE jub.purchase_order IS NULL
11224                 ]]></oils_persist:source_definition>
11225                 <fields>
11226                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11227                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11228                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11229                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11230                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11231                 </fields>
11232                 <links>
11233                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11234                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11235                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11236                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11237                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11238                 </links>
11239         </class>
11240         <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">
11241                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11242                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11243                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11244                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11245                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11246                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11247                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11248                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11249                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11250                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11251                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11252                 </fields>
11253                 <links>
11254                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11255                 </links>
11256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11257                         <actions>
11258                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11259                                 <retrieve/>
11260                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11261                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11262                         </actions>
11263                 </permacrud>
11264         </class>
11265
11266         <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">
11267                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11268                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11269                         <field name="date_applied" reporter:datatype="timestamp"/>
11270                         <field name="org" reporter:datatype="org_unit"/>
11271                         <field name="original_value" reporter:datatype="text"/>
11272                         <field name="new_value" reporter:datatype="text"/>
11273                         <field name="field_name" reporter:datatype="link"/>
11274                 </fields>
11275                 <links>
11276                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11277                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11278                 </links>
11279                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11280                         <actions>
11281                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11282                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11283                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11284                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11285                         </actions>
11286                 </permacrud>
11287         </class>
11288         <class id="aaactsc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_actor_stat_cat" oils_persist:tablename="action.archive_actor_stat_cat" reporter:label="Circ-Archived Patron Statistical Category Entries">
11289                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11290                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11291                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11292                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11293                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11294                 </fields>
11295                 <links>
11296                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11297                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11298                 </links>
11299         </class>
11300         <class id="aaasc" controller="open-ils.reporter-store" oils_obj:fieldmapper="action::archive_asset_stat_cat" oils_persist:tablename="action.archive_asset_stat_cat" reporter:label="Circ-Archived Copy Statistical Category Entries">
11301                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11302                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11303                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11304                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11305                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11306                 </fields>
11307                 <links>
11308                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11309                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11310                 </links>
11311         </class>
11312         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
11313                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11314                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11315                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11316                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11317                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11318                 </fields>
11319                 <links>
11320                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11321                 </links>
11322                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11323                         <actions>
11324                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11325                                 <retrieve/>
11326                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11327                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11328                         </actions>
11329                 </permacrud>
11330         </class>
11331         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
11332                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11333                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11334                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11335                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11336                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11337                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11338                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11339                 </fields>
11340                 <links>
11341                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11342                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11343                 </links>
11344                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11345                         <actions>
11346                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11347                                 <retrieve/>
11348                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11349                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11350                         </actions>
11351                 </permacrud>
11352         </class>
11353         <class id="hasholdscount" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::has_holds_count" reporter:label="Copy Has Holds Count" oils_persist:readonly="true">
11354         <oils_persist:source_definition>
11355         SELECT ahcm.target_copy AS "id",count(*) AS "count"
11356          FROM
11357          action.hold_request ahr,
11358          action.hold_copy_map ahcm
11359          WHERE
11360          ahr.cancel_time IS NULL AND
11361          ahr.fulfillment_time IS NULL AND
11362          ahr.capture_time IS NULL AND
11363          ahr.id = ahcm.hold
11364          GROUP BY ahcm.target_copy
11365         </oils_persist:source_definition>
11366         <fields oils_persist:primary="id">
11367             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11368             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11369         </fields>
11370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11371             <actions>
11372                <retrieve/>
11373             </actions>
11374         </permacrud>
11375         </class>
11376
11377         <!-- ********************************************************************************************************************* -->
11378
11379 </IDL>
11380
11381 <!--
11382     vim:noet:ts=4:sw=4:
11383 -->