]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1380709 Fund debit links to invoice entry
[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/>
2302                 <update permission="ADMIN_SURVEY">
2303                     <context link="survey" field="owner"/>
2304                 </update>
2305                 <delete permission="ADMIN_SURVEY">
2306                     <context link="survey" field="owner"/>
2307                 </delete>
2308             </actions>
2309         </permacrud>
2310         </class>
2311         <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">
2312                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2313                         <field name="bucket" />
2314                         <field name="id" reporter:datatype="id" />
2315                         <field name="target_copy" reporter:datatype="link"/>
2316                         <field name="create_time" reporter:datatype="timestamp" />
2317                         <field name="pos" reporter:datatype="int" />
2318                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2319                 </fields>
2320                 <links>
2321                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2322                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2323             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2324                 </links>
2325         </class>
2326         <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">
2327                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2328                         <field name="id" reporter:datatype="id" />
2329                         <field name="item" reporter:datatype="link"/>
2330                         <field name="note" reporter:datatype="text" />
2331                 </fields>
2332                 <links>
2333                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2334                 </links>
2335         </class>
2336
2337         <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">
2338                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2339                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2340                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2341                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2342                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2343                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2344                 </fields>
2345                 <links>
2346                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2347                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2348                 </links>
2349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2350                         <actions>
2351                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2352                                 <retrieve/>
2353                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2354                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2355                         </actions>
2356                 </permacrud>
2357         </class>
2358
2359         <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">
2360                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2361                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2362                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2363                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2364                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2365                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2366                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2367                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2368                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2369                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2370                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2371                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2372                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2373                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2374                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2375                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2376                 </fields>
2377                 <links>
2378                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2379                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2380                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2381                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2382                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2383                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2384                 </links>
2385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2386                         <actions>
2387                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2388                                 <retrieve/>
2389                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2390                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2391                         </actions>
2392                 </permacrud>
2393         </class>
2394
2395         <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">
2396                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2397                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2398                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2399                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2400                 </fields>
2401                 <links>
2402                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2403                 </links>
2404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405                         <actions>
2406                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2407                                 <retrieve/>
2408                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2409                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2410                         </actions>
2411                 </permacrud>
2412         </class>
2413
2414         <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">
2415                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2416                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2417                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2418                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2419                 </fields>
2420                 <links>
2421                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2422                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2423                 </links>
2424                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2425                         <actions>
2426                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2427                                 <retrieve/>
2428                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2429                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2430                         </actions>
2431                 </permacrud>
2432         </class>
2433
2434         <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">
2435                 <fields oils_persist:primary="code">
2436                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2437                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2438                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2439                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2440                 </fields>
2441                 <links>
2442                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2443                 </links>
2444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2445                         <actions>
2446                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2447                                 <retrieve/>
2448                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2449                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2450                         </actions>
2451                 </permacrud>
2452         </class>
2453
2454         <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">
2455                 <fields oils_persist:primary="code">
2456                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2458                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2459                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2460                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2461                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2462                 </fields>
2463                 <links>
2464                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2465                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2466                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2467                 </links>
2468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2469                         <actions>
2470                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <retrieve/>
2472                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2473                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2474                         </actions>
2475                 </permacrud>
2476         </class>
2477
2478     <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">
2479         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2480             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2481             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2482             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2483         </fields>
2484         <links>
2485             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2486             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2487         </links>
2488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2489             <actions>
2490                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2491                 <retrieve/>
2492                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2493                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2494             </actions>
2495         </permacrud>
2496     </class>
2497
2498         <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">
2499                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2500                         <field name="active" reporter:datatype="bool"/>
2501                         <field name="create_date" reporter:datatype="timestamp"/>
2502                         <field name="creator" />
2503                         <field name="deleted" reporter:datatype="bool"/>
2504                         <field name="edit_date" reporter:datatype="timestamp"/>
2505                         <field name="editor" />
2506                         <field name="id" reporter:datatype="id" />
2507                         <field name="last_xact_id" />
2508                         <field name="marc" />
2509                         <field name="source" />
2510                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2511                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2512                         <field name="heading" />
2513                         <field name="simple_heading" />
2514                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2515                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2516                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2517                 </fields>
2518                 <links>
2519                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2520                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2521                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2522                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2523                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2524                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2525                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2526                 </links>
2527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2528                         <actions>
2529                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2530                                 <retrieve/>
2531                                 <update permission="UPDATE_MARC" global_required="true"/>
2532                                 <delete permission="UPDATE_MARC" global_required="true"/>
2533                         </actions>
2534                 </permacrud>
2535         </class>
2536         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2537                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2538                         <field name="char_encoding" />
2539                         <field name="id" />
2540                         <field name="record" />
2541                         <field name="record_status" />
2542                         <field name="thesaurus" />
2543                 </fields>
2544                 <links>
2545                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2546                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2547                 </links>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2551                         <field name="id" reporter:datatype="id" />
2552                         <field name="bib" reporter:datatype="link" />
2553                         <field name="authority" reporter:datatype="link" />
2554                 </fields>
2555                 <links>
2556                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2557                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2558                 </links>
2559         </class>
2560         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2561                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2562                         <field name="id" reporter:datatype="id" />
2563                         <field name="record" reporter:datatype="link" />
2564                         <field name="atag" reporter:datatype="link" />
2565                         <field name="value" reporter:datatype="text" />
2566                 </fields>
2567                 <links>
2568                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2569                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2570                 </links>
2571         </class>
2572         <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">
2573                 <fields oils_persist:primary="code" oils_persist:sequence="">
2574                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2575                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2576                 </fields>
2577                 <links/>
2578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2579             <actions>
2580                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2581                 <retrieve/>
2582                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2583                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2584             </actions>
2585         </permacrud>
2586         </class>
2587         <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">
2588                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2589                         <field name="accepting_usr" />
2590                         <field name="amount" reporter:datatype="money" />
2591                         <field name="amount_collected" reporter:datatype="money" />
2592                         <field name="approval_code" reporter:datatype="text"/>
2593                         <field name="cash_drawer" reporter:datatype="link"/>
2594                         <field name="cc_first_name" reporter:datatype="text"/>
2595                         <field name="cc_last_name" reporter:datatype="text"/>
2596                         <field name="cc_number" reporter:datatype="text"/>
2597                         <field name="cc_order_number" reporter:datatype="text"/>
2598                         <field name="cc_type" reporter:datatype="text"/>
2599                         <field name="cc_processor" reporter:datatype="text"/>
2600                         <field name="expire_month" reporter:datatype="int" />
2601                         <field name="expire_year" reporter:datatype="int" />
2602                         <field name="id" reporter:datatype="id" />
2603                         <field name="note" reporter:datatype="text"/>
2604                         <field name="payment_ts" reporter:datatype="timestamp"/>
2605                         <field name="xact" reporter:datatype="link"/>
2606                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2607                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2608                 </fields>
2609                 <links>
2610                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2611                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2612                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2613                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2614                 </links>
2615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2616             <actions>
2617                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2618                     <context link="xact" jump="usr" field="home_ou"/>
2619                 </retrieve>
2620                         </actions>
2621                 </permacrud>
2622         </class>
2623         <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">
2624                 <fields oils_persist:primary="name">
2625                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2626                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2627                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2628                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2629                 </fields>
2630                 <links/>
2631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2632             <actions>
2633                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2634                 <retrieve/>
2635                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2636                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2637             </actions>
2638         </permacrud>
2639         </class>
2640
2641         <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">
2642                 <fields oils_persist:primary="alias">
2643                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2644                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2645                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2646                 </fields>
2647                 <links>
2648                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2649                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2650                 </links>
2651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2652             <actions>
2653                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2654                 <retrieve/>
2655                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2656                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2657             </actions>
2658         </permacrud>
2659         </class>
2660
2661         <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">
2662                 <fields oils_persist:primary="name">
2663                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2664                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2665                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2666                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2667                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2668                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2669                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2670                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2671                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2672                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2673                 </fields>
2674                 <links>
2675                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2676                 </links>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2680                 <retrieve/>
2681                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2682                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2683             </actions>
2684         </permacrud>
2685         </class>
2686
2687         <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">
2688                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2689                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2690                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2691                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2692                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2693                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2694                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2695                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2696                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2697                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2698                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2699                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2700                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2701                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2702                 </fields>
2703                 <links>
2704                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2705                 </links>
2706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2707             <actions>
2708                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2709                 <retrieve/>
2710                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2711                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2712             </actions>
2713         </permacrud>
2714         </class>
2715         <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">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2717                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2718                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2719                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2720                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2721                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2722                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2723                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2724                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2725                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2726                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2727                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2728                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2729                 </fields>
2730                 <links>
2731                 </links>
2732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2733                         <actions>
2734                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2735                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2736                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2737                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2738                         </actions>
2739                 </permacrud>
2740         </class>
2741         <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">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2743                         <field name="id" reporter:datatype="id" />
2744                         <field name="name" reporter:datatype="text"/>
2745                         <field name="xpath" reporter:datatype="text"/>
2746                         <field name="format" reporter:datatype="link"/>
2747                         <field name="first_word" reporter:datatype="bool" />
2748                 </fields>
2749                 <links/>
2750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2751             <actions>
2752                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2753                 <retrieve/>
2754                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2755                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2756             </actions>
2757         </permacrud>
2758         </class>
2759         <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">
2760                 <fields oils_persist:primary="code" oils_persist:sequence="">
2761                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2762                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2763                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2764                 </fields>
2765                 <links/>
2766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2767             <actions>
2768                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2769                 <retrieve/>
2770                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2771                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2772             </actions>
2773         </permacrud>
2774         </class>
2775         <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">
2776                 <fields oils_persist:primary="code" oils_persist:sequence="">
2777                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2778                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2779                 </fields>
2780                 <links/>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2784                 <retrieve/>
2785                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2786                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2787             </actions>
2788         </permacrud>
2789         </class>
2790     <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">
2791         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2792             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2793             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2794             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2795             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2796         </fields>
2797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2798             <actions>
2799                 <retrieve/>
2800             </actions>
2801         </permacrud>
2802     </class>
2803         <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">
2804                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2805                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2806                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2807                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2808                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2809                 </fields>
2810                 <links>
2811                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2812                 </links>
2813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2814             <actions>
2815                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2816                 <retrieve/>
2817                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2818                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2819             </actions>
2820         </permacrud>
2821         </class>
2822         <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">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2824                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2825                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2826                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2827                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2828                 </fields>
2829                 <links>
2830                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2831                 </links>
2832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2833             <actions>
2834                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2835                 <retrieve/>
2836                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2837                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2838             </actions>
2839         </permacrud>
2840         </class>
2841         <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">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2843                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2844                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2845                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2846                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2847                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2848                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2849                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2850                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2851                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2852                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2853                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2854                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2855                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2856                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2857                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2858                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2859                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2860                 </fields>
2861                 <links>
2862                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2863                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2864                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2865                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2866                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2867                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2868                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2869                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2870                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2871                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2872                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2873                 </links>
2874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875             <actions>
2876                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2877                 <retrieve/>
2878                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2879                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2880             </actions>
2881         </permacrud>
2882         </class>
2883         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2885                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2886                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2887                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2888                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2889                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2890                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2891                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2892                 </fields>
2893                 <links>
2894                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2895                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2896         </links>
2897         </class>
2898         <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">
2899                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2901                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2902                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2903                 </fields>
2904                 <links>
2905                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2906                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2907                 </links>
2908         </class>
2909         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2911                         <field name="id" reporter:datatype="id" />
2912                         <field name="value" oils_persist:i18n="true" />
2913                 </fields>
2914                 <links/>
2915         </class>
2916         <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">
2917                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2918                         <field name="balance_owed" reporter:datatype="money" />
2919                         <field name="total_owed" reporter:datatype="money" />
2920                         <field name="total_paid" reporter:datatype="money" />
2921                         <field name="usr" reporter:datatype="link"/>
2922                 </fields>
2923                 <links>
2924                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2925         </links>
2926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2927             <actions>
2928                 <retrieve permission="VIEW_USER">
2929                     <context link="usr" field="home_ou"/>
2930                 </retrieve>
2931             </actions>
2932         </permacrud>
2933         </class>
2934         <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">
2935                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2936                         <field name="collector" />
2937                         <field name="enter_time" reporter:datatype="timestamp"/>
2938                         <field name="id" reporter:datatype="id" />
2939                         <field name="location" reporter:datatype="link"/>
2940                         <field name="usr" reporter:datatype="link"/>
2941                 </fields>
2942                 <links>
2943                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2944                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2945                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2946                 </links>
2947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2948             <actions>
2949                 <create permission="money.collections_tracker.create" context_field="location"/>
2950                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2951                 <delete permission="money.collections_tracker.create" context_field="location"/>
2952             </actions>
2953         </permacrud>
2954         </class>
2955         <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">
2956                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2957                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2960                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2961                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2962                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2963                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2964                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2965                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2966                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2967                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2968                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2969                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2970                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2971                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2972                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2973                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2974                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2975                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2979                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2980                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2981                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2982                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2984                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2985                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2986                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2987                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2988                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2989                 </fields>
2990                 <links>
2991                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2992                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2993                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2994                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2995                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2996                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2997                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2998                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2999                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3000                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3001                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3002                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3003                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3004                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3005                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3006                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3007                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3008                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3009                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3010                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3011                 </links>
3012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3013             <actions>
3014                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3015                 <retrieve/>
3016                 <update permission="UPDATE_MARC" global_required="true"/>
3017                 <!-- 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. -->
3018                 <delete permission="DELETE_RECORD" global_required="true"/>
3019             </actions>
3020         </permacrud>
3021         </class>
3022         <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">
3023                 <fields oils_persist:primary="id">
3024                         <field name="dow_0_close" />
3025                         <field name="dow_0_open" />
3026                         <field name="dow_1_close" />
3027                         <field name="dow_1_open" />
3028                         <field name="dow_2_close" />
3029                         <field name="dow_2_open" />
3030                         <field name="dow_3_close" />
3031                         <field name="dow_3_open" />
3032                         <field name="dow_4_close" />
3033                         <field name="dow_4_open" />
3034                         <field name="dow_5_close" />
3035                         <field name="dow_5_open" />
3036                         <field name="dow_6_close" />
3037                         <field name="dow_6_open" />
3038                         <field name="id" reporter:datatype="id" />
3039                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3040                 </fields>
3041                 <links>
3042                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3043                 </links>
3044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3045             <actions>
3046                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3047                 <retrieve/>
3048                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3049                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3050             </actions>
3051         </permacrud>
3052         </class>
3053         <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">
3054                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3055                         <field name="id" reporter:datatype="id" />
3056                         <field name="record" reporter:datatype="link"/>
3057                         <field name="label" reporter:datatype="text"/>
3058                         <field name="label_sortkey" reporter:datatype="text"/>
3059                         <field name="deleted" reporter:datatype="bool"/>
3060                 </fields>
3061                 <links>
3062                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3063                 </links>
3064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3065             <actions>
3066                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3067                 <retrieve/>
3068                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3069                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3070             </actions>
3071         </permacrud>
3072         </class>
3073         <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">
3074                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3075                         <field name="id" reporter:datatype="id" />
3076                         <field name="target_copy" reporter:datatype="link" />
3077                         <field name="part" reporter:datatype="link"/>
3078                 </fields>
3079                 <links>
3080                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3081                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3082                 </links>
3083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3084             <actions>
3085                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3086                 <retrieve/>
3087                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3088                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3089             </actions>
3090         </permacrud>
3091         </class>
3092         <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">
3093                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3094                         <field name="close_end" reporter:datatype="timestamp" />
3095                         <field name="close_start" reporter:datatype="timestamp" />
3096                         <field name="id" reporter:datatype="id" />
3097                         <field name="org_unit" reporter:datatype="org_unit"/>
3098                         <field name="reason" reporter:datatype="text"/>
3099                 </fields>
3100                 <links>
3101                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3102                 </links>
3103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3104             <actions>
3105                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3106                 <retrieve/>
3107                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3108                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3109             </actions>
3110         </permacrud>
3111         </class>
3112         <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">
3113                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3114                         <field name="extended" reporter:datatype="interval"/>
3115                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3116                         <field name="max_renewals" reporter:datatype="int" />
3117                         <field name="name" reporter:datatype="text"/>
3118                         <field name="normal" reporter:datatype="interval"/>
3119                         <field name="shrt" reporter:datatype="interval"/>
3120                 </fields>
3121                 <links>
3122                 </links>
3123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3124             <actions>
3125                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3126                 <retrieve/>
3127                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3128                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3129             </actions>
3130         </permacrud>
3131         </class>
3132
3133         <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">
3134                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3135                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3136                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3137             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3138                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3139             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3140                 </fields>
3141                 <links>
3142             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3143                 </links>
3144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3145             <actions>
3146                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3147                 <retrieve/>
3148                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3149                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3150             </actions>
3151                 </permacrud>
3152         </class>
3153
3154         <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">
3155                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3156                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3157                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3158                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3159             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3160                 </fields>
3161                 <links>
3162                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3163                 </links>
3164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3165             <actions>
3166                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3167                 <retrieve/>
3168                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3169                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3170             </actions>
3171                 </permacrud>
3172         </class>
3173
3174         <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">
3175                 <fields oils_persist:primary="id" oils_persist:sequence="">
3176                         <field name="balance_owed" reporter:datatype="money"/>
3177                         <field name="id" reporter:datatype="id" />
3178                         <field name="last_billing_note" reporter:datatype="text"/>
3179                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3180                         <field name="last_billing_type" reporter:datatype="text"/>
3181                         <field name="last_payment_note" reporter:datatype="text"/>
3182                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3183                         <field name="last_payment_type" reporter:datatype="text"/>
3184                         <field name="total_owed" reporter:datatype="money"/>
3185                         <field name="total_paid" reporter:datatype="money"/>
3186                         <field name="usr" reporter:datatype="link"/>
3187                         <field name="xact_finish" reporter:datatype="timestamp" />
3188                         <field name="xact_start" reporter:datatype="timestamp" />
3189                         <field name="xact_type" reporter:datatype="text"/>
3190                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3191                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3192                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field name="billing_location" reporter:datatype="link"/>
3195                 </fields>
3196                 <links>
3197                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3198                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3199                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3200                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3201                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3202                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3203                 </links>
3204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3205                         <actions>
3206                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3207                                         <context link="usr" field="home_ou" />
3208                                 </retrieve>
3209                         </actions>
3210                 </permacrud>
3211         </class>
3212         <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">
3213                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3214                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3219                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3220                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3221                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3222                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3223                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3224                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3225                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3226                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3227                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3228                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3229                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3230                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3231                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3232                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3233                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3234                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3235                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3236                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3237                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3238                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3239                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3240                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3241                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3242                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3243                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3244                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3245                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3246                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3247                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3248                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3249                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3250                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3251                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3252                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3253                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3254                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3255                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3256                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3257                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3258                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3259                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3260                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3261                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3262                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3263                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3264                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3265                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3266                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3267                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3268                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3269                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3272                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3274                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3275                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3276                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3277                 </fields>
3278                 <links>
3279                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3280                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3281                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3282                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3283                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3284                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3285                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3286                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3287                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3288                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3289                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3290                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3291                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3292                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3293                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3294                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3295                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3296                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3297                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3298                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3299                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3300                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3301                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3302                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3303                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3304                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3305                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3306                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3307                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3308                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3309                 </links>
3310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3311                         <actions>
3312                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3313                         </actions>
3314                 </permacrud>
3315         </class>
3316         <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">
3317                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3318                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3319                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3320                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3321                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3322                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3323                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3324                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3325                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3326         </fields>
3327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3328                         <actions>
3329                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3330                                 <retrieve/>
3331                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3332                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3333                         </actions>
3334                 </permacrud>
3335         </class>
3336         <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">
3337                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3338                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3339                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3340                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3341                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3342         </fields>
3343         <links>
3344                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3345                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3346                 </links>
3347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3348                         <actions>
3349                                 <retrieve permission="RUN_REPORTS">
3350                                         <context link="usr" field="home_ou" />
3351                                 </retrieve>
3352                         </actions>
3353                 </permacrud>
3354         </class>
3355         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3356                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3357                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3358                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3359                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3360                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3361                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3362                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3363         </fields>
3364         <links>
3365                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3366                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3367                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3368                 </links>
3369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3370                         <actions>
3371                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3372                                         <context link="usr" field="home_ou" />
3373                                         <context link="ws" field="owning_lib" />
3374                                 </retrieve>
3375                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3376                                         <context link="usr" field="home_ou" />
3377                                         <context link="ws" field="owning_lib" />
3378                                 </create>
3379                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3380                                         <context link="usr" field="home_ou" />
3381                                         <context link="ws" field="owning_lib" />
3382                                 </update>
3383                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3384                                         <context link="usr" field="home_ou" />
3385                                         <context link="ws" field="owning_lib" />
3386                                 </delete>
3387                         </actions>
3388                 </permacrud>
3389         </class>
3390         <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">
3391                 <fields oils_persist:primary="name">
3392                         <field name="name" reporter:datatype="text"/>
3393                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3394                 </fields>
3395                 <links/>
3396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3397                         <actions>
3398                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3399                                 <retrieve/>
3400                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3401                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3402                         </actions>
3403                 </permacrud>
3404         </class>
3405         <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">
3406                 <fields oils_persist:primary="name">
3407                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3408                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3409                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3410                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3411                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3412                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3413                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3414                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3415                 </fields>
3416                 <links>
3417                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3418                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3419                 </links>
3420                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3421                         <actions>
3422                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3423                                 <retrieve/>
3424                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3425                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3426                         </actions>
3427                 </permacrud>
3428         </class>
3429         <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">
3430                 <fields oils_persist:primary="name">
3431                         <field name="name" reporter:datatype="text"/>
3432                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3433                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3434                         <field name="datatype" reporter:datatype="text"/>
3435                         <field name="view_perm" reporter:datatype="link"/>
3436                         <field name="update_perm" reporter:datatype="link"/>
3437                         <field name="fm_class" reporter:datatype="text"/>
3438                         <field name="grp" reporter:datatype="link"/>
3439                 </fields>
3440                 <links>
3441                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3442                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3443                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3444                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3445                 </links>
3446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3447                         <actions>
3448                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3449                                 <retrieve/>
3450                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3451                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3452                         </actions>
3453                 </permacrud>
3454         </class>
3455         <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">
3456                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3457                         <field name="id" />
3458                         <field name="name"  reporter:datatype="text"/>
3459                         <field name="org_unit" reporter:datatype="org_unit"/>
3460                         <field name="value"  reporter:datatype="text"/>
3461                 </fields>
3462                 <links>
3463                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3464                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3465                 </links>
3466         </class>
3467         <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">
3468                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3469                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3470                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3471                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3472                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3473                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3474                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3475                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3476                 </fields>
3477                 <links>
3478                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3479                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3480                 </links>
3481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3482             <actions>
3483                 <create permission="CREATE_COPY_NOTE">
3484                     <context link="owning_copy" field="circ_lib"/>
3485                 </create>
3486                 <retrieve permission="VIEW_COPY_NOTES">
3487                     <context link="owning_copy" field="circ_lib"/>
3488                 </retrieve>
3489                 <update permission="UPDATE_COPY_NOTE">
3490                     <context link="owning_copy" field="circ_lib"/>
3491                 </update>
3492                 <delete permission="DELETE_COPY_NOTE">
3493                     <context link="owning_copy" field="circ_lib"/>
3494                 </delete>
3495             </actions>
3496         </permacrud>
3497         </class>
3498         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3499                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3500                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3501                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3502                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3503                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3504                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3505                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3506                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3507                 </fields>
3508                 <links>
3509                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3510                 </links>
3511         </class>
3512         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3513                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3514                         <field name="fingerprint"  reporter:datatype="text"/>
3515                         <field name="id" reporter:datatype="id" />
3516                         <field name="master_record" reporter:datatype="link"/>
3517                         <field name="mods"  reporter:datatype="text"/>
3518                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3519                 </fields>
3520                 <links>
3521                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3522                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3523                 </links>
3524         </class>
3525         <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">
3526                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3527                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3528                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3529                 </fields>
3530                 <links/>
3531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3532             <actions>
3533                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3534                 <retrieve/>
3535                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3536                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3537             </actions>
3538         </permacrud>
3539         </class>
3540         <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">
3541                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3542                         <field name="code"  reporter:datatype="text"/>
3543                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3544                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3545                 </fields>
3546                 <links/>
3547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3548             <actions>
3549                 <create permission="CREATE_PERM" global_required="true"/>
3550                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3551                 <update permission="UPDATE_PERM" global_required="true"/>
3552                 <delete permission="DELETE_PERM" global_required="true"/>
3553             </actions>
3554         </permacrud>
3555         </class>
3556         <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">
3557                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3558                         <field name="id" reporter:datatype="id" />
3559                         <field name="metarecord" reporter:datatype="link"/>
3560                         <field name="source" reporter:datatype="link"/>
3561                 </fields>
3562                 <links>
3563                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3564                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3565                 </links>
3566         </class>
3567         <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">
3568                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3569                         <field name="id" reporter:datatype="id" />
3570                         <field name="field" reporter:datatype="link"/>
3571                         <field name="source" reporter:datatype="link"/>
3572                         <field name="value"  reporter:datatype="text"/>
3573                 </fields>
3574                 <links>
3575                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3576                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3577                 </links>
3578         </class>
3579         <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">
3580                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3581                         <field name="id" reporter:datatype="id" />
3582                         <field name="value" reporter:datatype="text"/>
3583                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3584                 </fields>
3585                 <links>
3586                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3587                 </links>
3588         </class>
3589         <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">
3590                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3591                         <field name="id" reporter:datatype="id" />
3592                         <field name="entry" reporter:datatype="link"/>
3593                         <field name="def" reporter:datatype="link"/>
3594                         <field name="source" reporter:datatype="link"/>
3595                 </fields>
3596                 <links>
3597                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3598                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3599                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3600                 </links>
3601         </class>
3602         <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">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3604                         <field name="id" reporter:datatype="id" />
3605                         <field name="entry" reporter:datatype="link"/>
3606                         <field name="simple_heading" reporter:datatype="link"/>
3607                 </fields>
3608                 <links>
3609                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3610                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3611                 </links>
3612         </class>
3613         <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">
3614                 <oils_persist:source_definition>
3615                         SELECT * FROM metabib.author_field_entry
3616                                                 UNION ALL
3617                         SELECT * FROM metabib.keyword_field_entry
3618                                                 UNION ALL
3619                         SELECT * FROM metabib.identifier_field_entry
3620                                                 UNION ALL
3621                         SELECT * FROM metabib.title_field_entry
3622                                                 UNION ALL
3623                         SELECT * FROM metabib.subject_field_entry
3624                                                 UNION ALL
3625                         SELECT * FROM metabib.series_field_entry
3626                 </oils_persist:source_definition>
3627                 <fields>
3628                         <field name="field" reporter:datatype="link"/>
3629                         <field name="id" reporter:datatype="id" />
3630                         <field name="source" reporter:datatype="link"/>
3631                         <field name="value"  reporter:datatype="text"/>
3632                 </fields>
3633                 <links>
3634                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3635                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3636                 </links>
3637         </class>
3638         <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">
3639                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3640                         <field name="field" reporter:datatype="link"/>
3641                         <field name="id" reporter:datatype="id" />
3642                         <field name="source" reporter:datatype="link"/>
3643                         <field name="value"  reporter:datatype="text"/>
3644                 </fields>
3645                 <links>
3646                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3647                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3648                 </links>
3649         </class>
3650         <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">
3651                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3652                         <field name="accepting_usr" reporter:datatype="link"/>
3653                         <field name="amount" reporter:datatype="money" />
3654                         <field name="amount_collected" reporter:datatype="money" />
3655                         <field name="cash_drawer" reporter:datatype="link"/>
3656                         <field name="id" reporter:datatype="id" />
3657                         <field name="note"  reporter:datatype="text"/>
3658                         <field name="payment_ts" reporter:datatype="timestamp"/>
3659                         <field name="xact" reporter:datatype="link"/>
3660                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3661                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3662                 </fields>
3663                 <links>
3664                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3665                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3666                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3667                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3668                 </links>
3669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3670             <actions>
3671                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3672                     <context link="xact" jump="usr" field="home_ou"/>
3673                 </retrieve>
3674                         </actions>
3675                 </permacrud>
3676         </class>
3677         <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">
3678                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3679                         <field name="accepting_usr" reporter:datatype="link"/>
3680                         <field name="amount" reporter:datatype="money" />
3681                         <field name="amount_collected" reporter:datatype="money" />
3682                         <field name="id" reporter:datatype="id" />
3683                         <field name="note"  reporter:datatype="text"/>
3684                         <field name="payment_ts" reporter:datatype="timestamp"/>
3685                         <field name="xact" reporter:datatype="link"/>
3686                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3687                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3688                 </fields>
3689                 <links>
3690                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3691                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3692                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3693                 </links>
3694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3695             <actions>
3696                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3697                     <context link="xact" jump="usr" field="home_ou"/>
3698                 </retrieve>
3699                         </actions>
3700                 </permacrud>
3701         </class>
3702         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3703                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3704                         <field name="accepting_usr" reporter:datatype="link"/>
3705                         <field name="amount" reporter:datatype="money" />
3706                         <field name="amount_collected" reporter:datatype="money" />
3707                         <field name="id" reporter:datatype="id" />
3708                         <field name="note"  reporter:datatype="text"/>
3709                         <field name="payment_ts" reporter:datatype="timestamp"/>
3710                         <field name="xact" reporter:datatype="link"/>
3711                         <field name="billing" reporter:datatype="link"/>
3712                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3713                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3714                 </fields>
3715                 <links>
3716                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3717                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3718                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3719                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3720                 </links>
3721         </class>
3722         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3723                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3724                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3725                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3726                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3727                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3728                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3729                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3730                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3731                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3732                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3733                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3734                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3735                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3736                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3737                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3738                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3739                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3740                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3741                 </fields>
3742                 <links>
3743                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3744                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3745                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3746                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3747                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3748                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3749                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3750                 </links>
3751         </class>
3752
3753         <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">
3754                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3755                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3756                         <field name="name"  reporter:datatype="text"/>
3757                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3758                         <field name="block_list" reporter:datatype="text"/>
3759                         <field name="staff_alert" reporter:datatype="bool"/>
3760                         <field name="org_depth" reporter:datatype="int"/>
3761                         <field name="ignore_proximity" reporter:datatype="int"/>
3762                 </fields>
3763                 <links/>
3764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3765             <actions>
3766                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3767                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3768                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3769                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3770             </actions>
3771         </permacrud>
3772         </class>
3773         <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">
3774                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3775                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3776                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3777                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3778                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3779                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3780                 </fields>
3781                 <links>
3782                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3783                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3784                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3785         </links>
3786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3787             <actions>
3788                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3789                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3790                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3791                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3792             </actions>
3793         </permacrud>
3794         </class>
3795         <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">
3796                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3797                         <field name="holdable" reporter:datatype="bool"/>
3798                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3799                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3800                         <field name="opac_visible" reporter:datatype="bool"/>
3801             <field name="copy_active" reporter:datatype="bool"/>
3802             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3803                 </fields>
3804                 <links/>
3805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3806             <actions>
3807                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3808                 <retrieve/>
3809                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3810                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3811             </actions>
3812         </permacrud>
3813         </class>
3814         <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">
3815                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3816                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3817                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3818                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3819                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3820                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3821                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3822                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3823                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3824                 </fields>
3825                 <links>
3826                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3827                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3828                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3829                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3830                 </links>
3831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3832                         <actions>
3833                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3834                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3835                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3836                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3837                         </actions>
3838                 </permacrud>
3839         </class>
3840         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3842                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3843                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3844                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3845                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3846                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3847                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3848                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3849                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3850                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3851                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3852                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3853                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3854                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3855                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3856                 </fields>
3857                 <links>
3858                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3859                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3860                 </links>
3861         </class>
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3864                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3865                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3866                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3867                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3868                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3869                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3870                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3871                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3872                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3873                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3874                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3875                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3876                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3877                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3878                 </fields>
3879                 <links>
3880                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3881                 </links>
3882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3883                         <actions>
3884                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3885                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3886                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3887                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3888                         </actions>
3889                 </permacrud>
3890         </class>
3891
3892
3893         <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">
3894                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3896                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3897                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3898                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3899                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3900                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3901                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3902                 </fields>
3903                 <links>
3904                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3905                 </links>
3906         </class>
3907
3908         <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">
3909                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3910                         <field name="call_number" />
3911                         <field name="create_date" reporter:datatype="timestamp"/>
3912                         <field name="creator" reporter:datatype="link"/>
3913                         <field name="id" reporter:datatype="id" />
3914                         <field name="pub" reporter:datatype="bool"/>
3915                         <field name="title"  reporter:datatype="text"/>
3916                         <field name="value"  reporter:datatype="text"/>
3917                 </fields>
3918                 <links>
3919                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3920                 </links>
3921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3922             <actions>
3923                 <create permission="CREATE_VOLUME_NOTE">
3924                     <context link="call_number" field="owning_lib"/>
3925                 </create>
3926                 <retrieve permission="VIEW_VOLUME_NOTES">
3927                     <context link="call_number" field="owning_lib"/>
3928                 </retrieve>
3929                 <update permission="UPDATE_VOLUME_NOTE">
3930                     <context link="call_number" field="owning_lib"/>
3931                 </update>
3932                 <delete permission="DELETE_VOLUME_NOTE">
3933                     <context link="call_number" field="owning_lib"/>
3934                 </delete>
3935             </actions>
3936         </permacrud>
3937         </class>
3938         <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">
3939                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3940                         <field name="create_date" reporter:datatype="timestamp"/>
3941                         <field name="creator" reporter:datatype="link"/>
3942                         <field name="edit_date" reporter:datatype="timestamp"/>
3943                         <field name="editor" reporter:datatype="link"/>
3944                         <field name="id" reporter:datatype="id" />
3945                         <field name="record" reporter:datatype="link"/>
3946                         <field name="value" reporter:datatype="text"/>
3947                 </fields>
3948                 <links>
3949                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3950                 </links>
3951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3952             <actions>
3953                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3954                 <retrieve/>
3955                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3956                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3957             </actions>
3958         </permacrud>
3959         </class>
3960         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3961         <oils_persist:source_definition>
3962 SELECT  usr,
3963         SUM(
3964             CASE
3965                 WHEN (
3966                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3967                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3968                 ) THEN 1
3969                 ELSE 0
3970             END
3971         ) AS out,
3972
3973         SUM(
3974             CASE
3975                 WHEN (
3976                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3977                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3978                 ) THEN 1
3979                 ELSE 0
3980             END
3981         ) AS overdue,
3982
3983         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3984         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3985         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3986   FROM  action.circulation
3987   WHERE checkin_time IS NULL
3988   GROUP BY 1
3989         </oils_persist:source_definition>
3990         <fields oils_persist:primary="usr">
3991             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3992             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3993             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3994             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3995             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3996             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3997         </fields>
3998         <links>
3999             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4000         </links>
4001         </class>
4002         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4003         <oils_persist:source_definition>
4004 SELECT  usr,
4005         STRING_AGG(
4006             CASE
4007                 WHEN (
4008                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4009                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4010                 ) THEN id::TEXT
4011                 ELSE '0'
4012             END
4013         ,',') AS out,
4014
4015         STRING_AGG(
4016             CASE
4017                 WHEN (
4018                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4019                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4020                 ) THEN id::TEXT
4021                 ELSE '0'
4022             END
4023         ,',') AS overdue,
4024
4025         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4026         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4027         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4028   FROM  action.circulation
4029   WHERE checkin_time IS NULL
4030   GROUP BY 1
4031         </oils_persist:source_definition>
4032         <fields oils_persist:primary="usr">
4033             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4034             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4035             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4036             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4037             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4038             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4039         </fields>
4040         <links>
4041             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4042         </links>
4043         </class>
4044         <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">
4045                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4046                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4047                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4048                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4049                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4050                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4051                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4052                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4053                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4054                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4055                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4056                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4057                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4058                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4059                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4060                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4061                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4062                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4063                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4064                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4065                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4066                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4067                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4068                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4069                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4070                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4071                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4072                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4073                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4074                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4075                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4076                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4077                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4078                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4079                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4080                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4081                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4082                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4083                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4084                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4085                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4086                 </fields>
4087                 <links>
4088                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4089                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4090                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4091                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4092                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4093                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4094                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4095                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4096                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4097                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4098                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4099                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4100                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4101                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4102                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4103                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4104                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4105                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4106                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4107                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4108                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4109                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4110                 </links>
4111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4112                         <actions>
4113                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4114                         </actions>
4115                 </permacrud>
4116         </class>
4117         <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">
4118                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4119                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4120                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4121                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4122                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4123                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4124                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4125                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4126                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4127                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4128                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4129                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4130                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4131                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4132                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4133                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4134                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4135                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4136                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4137                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4138                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4139                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4140                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4141                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4142                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4143                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4144                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4145                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4146                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4147                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4148                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4149                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4150                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4151                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4152                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4153                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4154                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4155                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4156                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4157                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4158                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4159                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4160                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4161                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4162                 </fields>
4163                 <links>
4164                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4165                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4166                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4167                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4168                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4169                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4170                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4171                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4172                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4173                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4174                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4175                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4176                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4177                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4178                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4179                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4180                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4181                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4182                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4183                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4184                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4185                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4186                 </links>
4187         </class>
4188         <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">
4189                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4190                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4191                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4192                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4193                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4194                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4195                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4196                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4197                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4198                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4199                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4200                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4201                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4202                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4203                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4204                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4205                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4206                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4207                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4208                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4209                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4210                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4211                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4212                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4213                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4214                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4215                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4216                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4217                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4218                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4219                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4220                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4221                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4222                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4223                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4224                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4225                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4226                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4227                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4228                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4229                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4230                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4231                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4232                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4233                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4234                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4235                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4236                 </fields>
4237                 <links>
4238                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4239                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4240                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4241                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4242                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4243                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4244                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4245                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4246                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4247                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4248                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4249                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4250                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4251                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4252                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4253                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4254                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4255                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4256                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4257                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4258                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4259                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4260                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4261                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4262                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4263                 </links>
4264         </class>
4265
4266         <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">
4267                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4268                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4269                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4270                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4271                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4272                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4273                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4274                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4275                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4276                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4277                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4278                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4279                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4280                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4281                 </fields>
4282                 <links>
4283                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4284                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4285                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4286                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4287                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4288                 </links>
4289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4290                         <actions>
4291                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4292                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4293                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4294                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4295                         </actions>
4296                 </permacrud>
4297         </class>
4298
4299         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4300                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4301                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4302                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4303                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4304                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4305                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4306                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4307                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4308                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4309                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4310                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4311                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4312                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4313                 </fields>
4314                 <links>
4315                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4316                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4317                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4318                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4319                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4320                 </links>
4321                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4322                         <actions>
4323                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4324                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4325                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4326                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4327                         </actions>
4328                 </permacrud>
4329         </class>
4330         
4331         <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">
4332                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4333                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4334                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4335                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4336                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4337                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4338                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4339                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4340                 </fields>
4341                 <links>
4342                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4343                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4344                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4345                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4346                 </links>
4347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4348                         <actions>
4349                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4350                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4351                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4352                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4353                         </actions>
4354                 </permacrud>
4355         </class>
4356         
4357         <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">
4358                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4359                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4360                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4361                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4362                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4363                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4364                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4365                 </fields>
4366                 <links>
4367                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4368                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4369                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4370                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4371                 </links>
4372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4373                         <actions>
4374                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4375                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4376                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4377                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4378                         </actions>
4379                 </permacrud>
4380         </class>
4381         
4382         <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">
4383                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4384                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4385                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4386                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4387                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4388                 </fields>
4389                 <links>
4390                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4391                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4392                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4393                 </links>
4394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4395                         <actions>
4396                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4397                     <context link="resource" field="owner" />
4398                 </create>
4399                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4400                     <context link="resource" field="owner" />
4401                 </retrieve>
4402                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4403                     <context link="resource" field="owner" />
4404                 </update>
4405                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4406                     <context link="resource" field="owner" />
4407                 </delete>
4408                         </actions>
4409                 </permacrud>
4410         </class>
4411         
4412         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4413                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4414                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4415                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4416                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4417                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4418                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4419                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4420                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4421                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4422                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4423                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4424                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4425                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4426                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4427                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4428                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4429                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4430                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4431                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4432                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4433                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4434                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4435                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4436                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4437                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4438                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4439                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4440                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4441                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4442                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4443                 </fields>
4444                 <links>
4445                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4446                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4447                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4448                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4449                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4450                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4451                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4452                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4453                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4454                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4455                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4456                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4457                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4458                 </links>
4459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4460                         <actions>
4461                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4462                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4463                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4464                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4465                         </actions>
4466                 </permacrud>
4467         </class>
4468         
4469         <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">
4470                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4471                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4472                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4473                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4474                 </fields>
4475                 <links>
4476                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4477                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4478                 </links>
4479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4480                         <actions>
4481                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4482                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4483                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4484                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4485                         </actions>
4486                 </permacrud>
4487         </class>
4488
4489         <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">
4490                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4491                         <field name="bucket" reporter:datatype="link"/>
4492                         <field name="id" reporter:datatype="id" />
4493                         <field name="target_call_number" reporter:datatype="link" />
4494                         <field name="create_time" reporter:datatype="timestamp" />
4495                         <field name="pos" reporter:datatype="int" />
4496                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4497                 </fields>
4498                 <links>
4499                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4500                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4501             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4502                 </links>
4503         </class>
4504         <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">
4505                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4506                         <field name="id" reporter:datatype="id" />
4507                         <field name="item" reporter:datatype="link"/>
4508                         <field name="note" reporter:datatype="text" />
4509                 </fields>
4510                 <links>
4511                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4512                 </links>
4513         </class>
4514         <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">
4515                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4516                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4517                         <field name="btype" reporter:datatype="text"/>
4518                         <field name="id" reporter:datatype="id" />
4519                         <field name="name" reporter:datatype="text"/>
4520                         <field name="description" reporter:datatype="text"/>
4521                         <field name="owner" reporter:datatype="link"/>
4522                         <field name="pub" reporter:datatype="bool"/>
4523                         <field name="create_time" reporter:datatype="timestamp" />
4524                 </fields>
4525                 <links>
4526                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4527                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4528                 </links>
4529         </class>
4530         <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">
4531                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4532                         <field name="id" reporter:datatype="id" />
4533                         <field name="bucket" reporter:datatype="link"/>
4534                         <field name="note" reporter:datatype="text" />
4535                 </fields>
4536                 <links>
4537                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4538                 </links>
4539         </class>
4540         <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">
4541                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4542                         <field name="hold" reporter:datatype="link"/>
4543                         <field name="id" reporter:datatype="id" />
4544                         <field name="target_copy" reporter:datatype="link"/>
4545                         <field name="proximity" reporter:datatype="number"/>
4546                 </fields>
4547                 <links>
4548                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4549                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4550                 </links>
4551         </class>
4552         <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">
4553                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4554                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4555                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4556                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4557                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4558                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4559                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4560                 </fields>
4561                 <links>
4562                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4563                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4564                 </links>
4565         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4566             <actions>
4567                 <create permission="CREATE_HOLD_NOTIFICATION">
4568                                         <context link="hold" jump="usr" field="home_ou" />
4569                                 </create>
4570                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4571                                         <context link="hold" jump="usr" field="home_ou" />
4572                                 </retrieve>
4573                 <update permission="CREATE_HOLD_NOTIFICATION">
4574                                         <context link="hold" jump="usr" field="home_ou" />
4575                                 </update>
4576                 <delete permission="CREATE_HOLD_NOTIFICATION">
4577                                         <context link="hold" jump="usr" field="home_ou" />
4578                                 </delete>
4579             </actions>
4580         </permacrud>
4581         </class>
4582         <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">
4583                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4584                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4585                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4586                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4587                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4588                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4589                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4590                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4591                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4592                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4593                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4594                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4595                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4596                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4597                 </fields>
4598                 <links>
4599                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4600                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4601                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4602                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4603                 </links>
4604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4605             <actions>
4606                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4607                 <retrieve/>
4608                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4609                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4610             </actions>
4611         </permacrud>
4612         </class>
4613         <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">
4614                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4615                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4616                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4617                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4618                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4619             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4620             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4621             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4622                 </fields>
4623                 <links>
4624                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4625                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4626                 </links>
4627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4628             <actions>
4629                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4630                 <retrieve/>
4631                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4632                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4633             </actions>
4634         </permacrud>
4635         </class>
4636         <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">
4637                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4638                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4639             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4640             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4641                 </fields>
4642                 <links>
4643                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4644                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4645                 </links>
4646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4647             <actions>
4648                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4649                                         <context link="lgroup" field="owner" />
4650                 </create>
4651                 <retrieve/>
4652                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4653                                         <context link="lgroup" field="owner" />
4654                 </update>
4655                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4656                                         <context link="lgroup" field="owner" />
4657                 </delete>
4658             </actions>
4659         </permacrud>
4660         </class>
4661
4662     <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">
4663         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4664             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4665             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4666             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4667             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4668         </fields>
4669         <links>
4670             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4671             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4672         </links>
4673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4674             <actions>
4675                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4676                 <retrieve/>
4677                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4678                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4679             </actions>
4680         </permacrud>
4681     </class>
4682
4683         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4684                 <fields>
4685                         <field name="sre_id" oils_persist:virtual="true" />
4686                         <field name="location" oils_persist:virtual="true" />
4687                         <field name="owning_lib" oils_persist:virtual="true" />
4688                         <field name="basic_holdings" oils_persist:virtual="true" />
4689                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4690                         <field name="supplement_holdings" oils_persist:virtual="true" />
4691                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4692                         <field name="index_holdings" oils_persist:virtual="true" />
4693                         <field name="index_holdings_add" oils_persist:virtual="true" />
4694                         <field name="online" oils_persist:virtual="true" />
4695                         <field name="missing" oils_persist:virtual="true" />
4696                         <field name="incomplete" oils_persist:virtual="true" />
4697                 </fields>
4698         </class>
4699
4700         <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">
4701                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4702                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4703                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4704                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4705                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4706                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4707                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4708                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4709                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4710                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4711                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4712                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4713                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4714                 </fields>
4715                 <links>
4716                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4717                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4718                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4719                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4720                 </links>
4721                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4722                         <actions>
4723                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4724                                 <retrieve/>
4725                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4726                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4727                         </actions>
4728                 </permacrud>
4729         </class>
4730
4731         <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">
4732                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4733                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4734                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4735                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4736                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4737                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4738                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4739                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4740                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4741                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4742                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4743                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4744                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4745                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4746                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4747                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4748                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4749                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4750                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4751                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4752                 </fields>
4753                 <links>
4754                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4755                 </links>
4756                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4757                         <actions>
4758                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4759                                         <context link="subscription" field="owning_lib" />
4760                                 </create>
4761                                 <retrieve />
4762                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4763                                         <context link="subscription" field="owning_lib" />
4764                                 </update>
4765                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4766                                         <context link="subscription" field="owning_lib" />
4767                                 </delete>
4768                         </actions>
4769                 </permacrud>
4770         </class>
4771
4772         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4773                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4774                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4775                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4776                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4777                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4778                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4779                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4780                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4781                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4782                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4783                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4784                 </fields>
4785                 <links>
4786                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4787                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4788                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4789                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4790                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4791                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4792                 </links>
4793                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4794                         <actions>
4795                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4796                                 <retrieve />
4797                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4798                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4799                         </actions>
4800                 </permacrud>
4801         </class>
4802
4803         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4804                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4805                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4806                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4807                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4808                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4809                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4810                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4811                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4812                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4813                 </fields>
4814                 <links>
4815                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4816                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4817                 </links>
4818         </class>
4819
4820         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4821                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4822                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4823                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4824                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4825                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4826                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4827                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4828                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4829                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4830                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4831                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4832                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4833                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4834                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4835                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4836                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4837                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4838                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4839                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4840                 </fields>
4841                 <links>
4842                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4843                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4844                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4845                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4846                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4847                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4848                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4849                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4850                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4851                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4852                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4853                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4854                 </links>
4855                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4856                         <actions>
4857                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4858                                 <retrieve />
4859                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4860                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4861                         </actions>
4862                 </permacrud>
4863         </class>
4864
4865         <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">
4866                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4867                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4868                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4869                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4870                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4871                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4872                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4873                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4874                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4875                 </fields>
4876                 <links>
4877                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4878                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4879                 </links>
4880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4881                         <actions>
4882                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4883                                         <context link="distribution" field="holding_lib" />
4884                                 </create>
4885                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4886                                         <context link="distribution" field="holding_lib" />
4887                                 </retrieve>
4888                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4889                                         <context link="distribution" field="holding_lib" />
4890                                 </update>
4891                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4892                                         <context link="distribution" field="holding_lib" />
4893                                 </delete>
4894                         </actions>
4895                 </permacrud>
4896         </class>
4897
4898         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4899                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4901                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4902                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4903                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4904                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4905                 </fields>
4906                 <links>
4907                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4908                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4909                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4910                 </links>
4911                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4912                         <actions>
4913                                 <create permission="ADMIN_SERIAL_STREAM">
4914                                         <context link="distribution" field="holding_lib" />
4915                                 </create>
4916                                 <retrieve />
4917                                 <update permission="ADMIN_SERIAL_STREAM">
4918                                         <context link="distribution" field="holding_lib" />
4919                                 </update>
4920                                 <delete permission="ADMIN_SERIAL_STREAM">
4921                                         <context link="distribution" field="holding_lib" />
4922                                 </delete>
4923                         </actions>
4924                 </permacrud>
4925         </class>
4926
4927         <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">
4928                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4929                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4930                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4931                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4932                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4933                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4934                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4935                 </fields>
4936                 <links>
4937                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4938                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4939                 </links>
4940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4941                         <actions>
4942                                 <create permission="ADMIN_SERIAL_STREAM">
4943                                         <context link="stream" jump="distribution" field="holding_lib" />
4944                                 </create>
4945                                 <retrieve permission="RECEIVE_SERIAL">
4946                                         <context link="stream" jump="distribution" field="holding_lib" />
4947                                 </retrieve>
4948                                 <update permission="ADMIN_SERIAL_STREAM">
4949                                         <context link="stream" jump="distribution" field="holding_lib" />
4950                                 </update>
4951                                 <delete permission="ADMIN_SERIAL_STREAM">
4952                                         <context link="stream" jump="distribution" field="holding_lib" />
4953                                 </delete>
4954                         </actions>
4955                 </permacrud>
4956         </class>
4957
4958         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4959                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4960                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4961                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4962                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4963                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4964                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4965                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4966                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4967                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4968                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4969                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4970                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4971                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4972                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4973                 </fields>
4974                 <links>
4975                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4976                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4977                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4978                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4979                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4980                 </links>
4981                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4982                         <actions>
4983                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4984                                         <context link="subscription" field="owning_lib" />
4985                                 </create>
4986                                 <retrieve/>
4987                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4988                                         <context link="subscription" field="owning_lib" />
4989                                 </update>
4990                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4991                                         <context link="subscription" field="owning_lib" />
4992                                 </delete>
4993                         </actions>
4994                 </permacrud>
4995         </class>
4996
4997         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4998                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4999                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5000                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5001                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5002                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5003                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5004                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5005                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5006                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5007                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5008                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5009                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5010                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5011                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5012                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5013                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5014                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5015                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5016                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5017                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5018                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5019                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5020                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5021                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5022                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5023                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5024                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5025                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5026                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5027                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5028                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5029                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5030                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5031                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5032                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5033                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5034                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5035                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5036                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5037                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5038                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5039                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5040                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5041                 </fields>
5042                 <links>
5043                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5044                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5045                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5046                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5047                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5048                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5049                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5050                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5051                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5052                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5053                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5054                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5055                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5056                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5057                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5058                 </links>
5059                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5060                         <actions>
5061                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5062                                 <retrieve/>
5063                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5064                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5065                         </actions>
5066                 </permacrud>
5067         </class>
5068
5069         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5070                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5071                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5072                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5073                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5074                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5075                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5076                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5077                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5078                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5079                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5080                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5081                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5082                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5083                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5084                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5085                 </fields>
5086                 <links>
5087                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5088                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5089                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5090                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5091                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5092                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5093                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5094                 </links>
5095                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5096                         <actions>
5097                                 <create permission="ADMIN_SERIAL_ITEM">
5098                                         <context link="stream" jump="distribution" field="holding_lib" />
5099                                 </create>
5100                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5101                                         <context link="stream" jump="distribution" field="holding_lib" />
5102                                 </retrieve>
5103                                 <update permission="ADMIN_SERIAL_ITEM">
5104                                         <context link="stream" jump="distribution" field="holding_lib" />
5105                                 </update>
5106                                 <delete permission="ADMIN_SERIAL_ITEM">
5107                                         <context link="stream" jump="distribution" field="holding_lib" />
5108                                 </delete>
5109                         </actions>
5110                 </permacrud>
5111         </class>
5112
5113         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5114                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5115                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5116                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5117                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5118                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5119                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5120                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5121                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5122                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5123                 </fields>
5124                 <links>
5125                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5126                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5127                 </links>
5128                 <!-- Not available via PCRUD at this time -->
5129         </class>
5130         <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">
5131                 <fields>
5132                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5133                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5134                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5135                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5136                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5137                 </fields>
5138                 <links>
5139                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5140                 </links>
5141         </class>
5142         <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">
5143                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5144                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5145                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5146                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5147                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5148                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5149                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5150                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5151                 </fields>
5152                 <links>
5153                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5154                 </links>
5155         </class>
5156         <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">
5157                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5158                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5159                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5160                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5161                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5162                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5163                 </fields>
5164                 <links>
5165                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5166                 </links>
5167                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5168                         <actions>
5169                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5170                                         <context link="distribution" field="holding_lib" />
5171                                 </create>
5172                                 <retrieve/>
5173                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5174                                         <context link="distribution" field="holding_lib" />
5175                                 </update>
5176                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5177                                         <context link="distribution" field="holding_lib" />
5178                                 </delete>
5179                         </actions>
5180                 </permacrud>
5181         </class>
5182
5183         <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">
5184                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5185                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5186                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5187                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5188                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5189                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5190                 </fields>
5191                 <links>
5192                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5193                 </links>
5194                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5195                         <actions>
5196                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5197                                         <context link="distribution" field="holding_lib" />
5198                                 </create>
5199                                 <retrieve/>
5200                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5201                                         <context link="distribution" field="holding_lib" />
5202                                 </update>
5203                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5204                                         <context link="distribution" field="holding_lib" />
5205                                 </delete>
5206                         </actions>
5207                 </permacrud>
5208         </class>
5209
5210         <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">
5211                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5212                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5213                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5214                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5215                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5216                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5217                 </fields>
5218                 <links>
5219                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5220                 </links>
5221                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5222                         <actions>
5223                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5224                                         <context link="distribution" field="holding_lib" />
5225                                 </create>
5226                                 <retrieve/>
5227                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5228                                         <context link="distribution" field="holding_lib" />
5229                                 </update>
5230                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5231                                         <context link="distribution" field="holding_lib" />
5232                                 </delete>
5233                         </actions>
5234                 </permacrud>
5235         </class>
5236
5237         <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">
5238                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5239                         <field name="id" reporter:datatype="id" />
5240                         <field name="owning_copy" reporter:datatype="link"/>
5241                         <field name="stat_cat" reporter:datatype="link"/>
5242                         <field name="stat_cat_entry" reporter:datatype="link"/>
5243                 </fields>
5244                 <links>
5245                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5246                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5247                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5248                 </links>
5249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5250                         <actions>
5251                                 <retrieve/>
5252                         </actions>
5253                 </permacrud>
5254         </class>
5255         <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">
5256                 <fields oils_persist:primary="code">
5257                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5258                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5259                 </fields>
5260                 <links/>
5261         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5262             <actions>
5263                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5264                 <retrieve/>
5265                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5266                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5267             </actions>
5268         </permacrud>
5269         </class>
5270         <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">
5271                 <fields oils_persist:primary="code">
5272                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5273                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5274                 </fields>
5275                 <links/>
5276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5277             <actions>
5278                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5279                 <retrieve/>
5280                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5281                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5282             </actions>
5283         </permacrud>
5284         </class>
5285         <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">
5286                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5287                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5288                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5289                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5290                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5291                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5292                 </fields>
5293                 <links>
5294             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5295         </links>
5296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5297             <actions>
5298                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5299                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5300                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5301                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5302             </actions>
5303         </permacrud>
5304         </class>
5305         <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">
5306                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5307                         <field name="id" reporter:datatype="id" />
5308                         <field name="name" reporter:datatype="text"/>
5309                 </fields>
5310                 <links/>
5311         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5312             <actions>
5313                 <create permission="CREATE_LASSO" global_required="true"/>
5314                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5315                 <update permission="UPDATE_LASSO" global_required="true"/>
5316                 <delete permission="DELETE_LASSO" global_required="true"/>
5317             </actions>
5318         </permacrud>
5319         </class>
5320         <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">
5321                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5322                         <field name="id" reporter:datatype="id" />
5323                         <field name="lasso" reporter:datatype="link"/>
5324                         <field name="org_unit" reporter:datatype="org_unit"/>
5325                 </fields>
5326                 <links>
5327                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5328                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5329                 </links>
5330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5331             <actions>
5332                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5333                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5334                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5335                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5336             </actions>
5337         </permacrud>
5338         </class>
5339         <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">
5340                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5341                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5342                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5343                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5344                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5345                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5346                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5347                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5348                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5349                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5350                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5351                 </fields>
5352                 <links>
5353                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5354                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5355                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5356                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5357                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5358                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5359                 </links>
5360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5361             <actions>
5362                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5363                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5364                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5365                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5366             </actions>
5367         </permacrud>
5368         </class>
5369         <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">
5370                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5371                         <field name="id" reporter:datatype="id" />
5372                         <field name="from_org" reporter:datatype="org_unit"/>
5373                         <field name="to_org" reporter:datatype="org_unit"/>
5374                         <field name="prox" reporter:datatype="int" />
5375                 </fields>
5376                 <links>
5377                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5378                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5379                 </links>
5380         </class>
5381         <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">
5382                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5383                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5384                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5385                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5386                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5387                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5388                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5389                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5390                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5391                 </fields>
5392                 <links/>
5393         </class>
5394         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5395                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5396                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5397                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5398                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5399                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5400                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5401                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5402                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5403                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5404                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5405                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5406                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5407                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5408                 </fields>
5409                 <links>
5410                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5411                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5412                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5413                 </links>
5414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5415             <actions>
5416                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5417                 <retrieve/>
5418                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5419                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5420             </actions>
5421         </permacrud>
5422         </class>
5423         <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">
5424                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5425                         <field name="address_type"  reporter:datatype="text"/>
5426                         <field name="city"  reporter:datatype="text"/>
5427                         <field name="country"  reporter:datatype="text"/>
5428                         <field name="county"  reporter:datatype="text"/>
5429                         <field name="id" reporter:datatype="id" />
5430                         <field name="org_unit" reporter:datatype="org_unit"/>
5431                         <field name="post_code"  reporter:datatype="text"/>
5432                         <field name="state"  reporter:datatype="text"/>
5433                         <field name="street1"  reporter:datatype="text"/>
5434                         <field name="street2"  reporter:datatype="text"/>
5435                         <field name="valid" reporter:datatype="bool"/>
5436                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5437                 </fields>
5438                 <links>
5439                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5440                 </links>
5441         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5442             <actions>
5443                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5444                 <retrieve/>
5445                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5446                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5447             </actions>
5448         </permacrud>
5449         </class>
5450         <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">
5451                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5452                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5453                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5454                         <field name="query_text" reporter:datatype="text"/>
5455                 </fields>
5456         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5457             <actions>
5458                 <retrieve/>
5459             </actions>
5460         </permacrud>
5461         </class>
5462
5463         <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">
5464                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5465                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5466                         <field name="owner" reporter:datatype="org_unit"/>
5467                         <field name="code" reporter:datatype="text"/>
5468                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5469                         <field name="create_date" reporter:datatype="timestamp"/>
5470                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5471                 </fields>
5472                 <links>
5473                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5474                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5475                 </links>
5476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5477             <actions>
5478                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5479                 <retrieve/>
5480                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5481                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5482             </actions>
5483         </permacrud>
5484         </class>
5485         <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">
5486                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5487                         <field name="id" reporter:datatype="id"/>
5488                         <field name="grp" reporter:datatype="link"/>
5489                         <field name="pos" reporter:datatype="int"/>
5490                         <field name="query" reporter:datatype="link"/>
5491                 </fields>
5492                 <links>
5493                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5494                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5495                 </links>
5496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5497             <actions>
5498                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5499                     <context link="grp" field="owner"/>
5500                 </create>
5501                 <retrieve/>
5502                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5503                     <context link="grp" field="owner"/>
5504                 </update>
5505                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5506                     <context link="grp" field="owner"/>
5507                 </delete>
5508             </actions>
5509         </permacrud>
5510         </class>
5511
5512         <!-- A note: Please update alhr and ahopl when updating ahr -->
5513         <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">
5514                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5515                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5516                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5517                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5518                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5519                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5520                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5521                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5522                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5523                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5524                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5525                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5526                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5527                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5528                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5529                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5530                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5531                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5532                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5533                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5534                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5535                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5536                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5537                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5538                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5539                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5540                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5541                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5542                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5543                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5544                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5545                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5546                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5547                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5548                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5549                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5550                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5551                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5552                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5553                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5554                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5555                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5556                 </fields>
5557                 <links>
5558                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5559                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5560                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5561                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5562                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5563                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5564                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5565                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5566                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5567                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5568                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5569                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5570                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5571                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5572                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5573                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5574                 </links>
5575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5576                         <actions>
5577                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5578                         </actions>
5579                 </permacrud>
5580         </class>
5581         <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">
5582                 <oils_persist:source_definition><![CDATA[
5583                 SELECT
5584                         ahr.*,
5585                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5586                                 copy_location_order_position,
5587                         CASE WHEN au.alias IS NOT NULL THEN
5588                                 au.alias
5589                         ELSE
5590                                 au.first_given_name
5591                         END AS usr_alias_or_first_given_name,
5592                         au.first_given_name AS usr_first_given_name,
5593                         au.second_given_name AS usr_second_given_name,
5594                         au.family_name AS usr_family_name,
5595                         au.prefix AS usr_prefix,
5596                         au.suffix AS usr_suffix,
5597                         au.alias AS usr_alias,
5598                         CASE WHEN au.alias IS NOT NULL THEN
5599                                 au.alias
5600                         ELSE
5601                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5602                                         COALESCE(au.family_name, ''),
5603                                         COALESCE(au.suffix, ''),
5604                                         ', ',
5605                                         COALESCE(au.prefix, ''),
5606                                         COALESCE(au.first_given_name, ''),
5607                                         COALESCE(au.second_given_name, '')
5608                                 ], ' '), E'\\s+,', ',')
5609                         END AS usr_alias_or_display_name,
5610                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5611                                 COALESCE(au.family_name, ''),
5612                                 COALESCE(au.suffix, ''),
5613                                 ', ',
5614                                 COALESCE(au.prefix, ''),
5615                                 COALESCE(au.first_given_name, ''),
5616                                 COALESCE(au.second_given_name, '')
5617                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5618                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5619                                 AS call_number_label,
5620                         siss.label AS issuance_label,
5621                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5622                         ahcm_1.copy_count AS potential_copies
5623                 FROM action.hold_request ahr
5624                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5625                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5626                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5627                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5628                 JOIN actor.usr au ON (au.id = ahr.usr)
5629                 JOIN (
5630                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5631                         FROM asset.copy_location
5632                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5633                 LEFT JOIN actor.usr_standing_penalty ausp 
5634                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5635                 LEFT JOIN config.standing_penalty csp
5636                         ON (
5637                                 csp.id = ausp.standing_penalty AND 
5638                                 csp.block_list LIKE '%CAPTURE%' AND (
5639                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5640                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5641                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5642                                         )
5643                                 )
5644                         )
5645                 JOIN (
5646                         SELECT COUNT(target_copy) AS copy_count, hold
5647                         FROM action.hold_copy_map
5648                         GROUP BY 2
5649                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5650                 LEFT JOIN serial.issuance siss
5651                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5652                 LEFT JOIN asset.copy_location_order acplo
5653                         ON (acp.location = acplo.location AND
5654                                 acp.circ_lib = acplo.org)
5655                 WHERE
5656                         ahr.capture_time IS NULL AND
5657                         ahr.cancel_time IS NULL AND
5658                         csp.id IS NULL AND
5659                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5660                         acp.status IN (0,7)
5661                 ]]></oils_persist:source_definition>
5662                 <fields oils_persist:primary="id">
5663                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5664                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5665                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5666                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5667                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5668                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5669                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5670                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5671                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5672                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5673                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5674                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5675                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5676                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5677                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5678                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5679                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5680                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5681                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5682                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5683                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5684                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5685                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5686                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5687                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5688                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5689                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5690                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5691                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5692                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5693                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5694                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5695                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5696                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5697                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5698                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5699                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5700                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5701                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5702                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5703                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5704                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5705                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5706                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5707                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5708                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5709                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5710                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5711                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5712                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5713                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5714                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5715                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5716                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5717                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5718                 </fields>
5719                 <links>
5720                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5721                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5722                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5723                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5724                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5725                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5726                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5727                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5728                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5729                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5730                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5731                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5732                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5733                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5734                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5735                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5736                 </links>
5737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5738                         <actions>
5739                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5740                         </actions>
5741                 </permacrud>
5742         </class>
5743         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5744                 <oils_persist:source_definition>
5745                         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)
5746                 </oils_persist:source_definition>
5747                 <fields oils_persist:primary="id">
5748                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5749                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5750                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5751                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5752                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5753                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5754                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5755                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5756                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5757                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5758                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5759                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5760                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5761                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5762                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5763                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5764                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5765                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5766                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5767                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5768                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5769                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5770                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5771                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5772                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5773                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5774                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5775                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5776                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5777                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5778                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5779                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5780                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5781                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5782                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5783                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5784                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5785                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5786                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5787                 </fields>
5788                 <links>
5789                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5790                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5791                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5792                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5793                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5794                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5795                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5796                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5797                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5798                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5799                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5800                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5801                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5802                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5803                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5804                 </links>
5805         </class>
5806
5807         <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">
5808                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5809                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5810                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5811                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5812                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5813                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5814                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5815                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5816                 </fields>
5817                 <links>
5818                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5819                 </links>
5820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5821                         <actions>
5822                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5823                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5824                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5825                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5826                         </actions>
5827                 </permacrud>
5828         </class>
5829         <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">
5830                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5831                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5832                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5833                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5834                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5835                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5836                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5837                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5838                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5839                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5840                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5841                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5842                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5843                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5844                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5845                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5846                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5847                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5848                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5849                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5850                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5851                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5852                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5853                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5854                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5855                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5856                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5857                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5858                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5859                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5860                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5861                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5862                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5863                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5864                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5865                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5866                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5867                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5868                 </fields>
5869                 <links>
5870                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5871                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5872                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5873                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5874                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5875                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5876                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5877                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5878                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5879                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5880                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5881                 </links>
5882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5883                         <actions>
5884                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5885                         </actions>
5886                 </permacrud>
5887         </class>
5888         <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">
5889                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5890                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5891                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5892                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5893                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5894                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5895                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5896                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5897                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5898                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5899                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5900                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5901                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5902                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5903                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5904                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5905                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5906                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5907                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5908                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5909                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5910                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5911                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5912                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5913                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5914                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5915                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5916                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5917                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5918                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5919                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5920                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5921                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5922                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5923                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5924                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5925                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5926                 </fields>
5927                 <links>
5928                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5929                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5930                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5931                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5932                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5933                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5934                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5935                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5936                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5937                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5938                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5939                 </links>
5940                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5941                         <actions>
5942                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5943                         </actions>
5944                 </permacrud>
5945         </class>
5946
5947         <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">
5948                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5949                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5950                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5951                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5952                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5953                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5954                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5955                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5956                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5957                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5958                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5959                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5960                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5961                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5962                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5963                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5964                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5965                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5966                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5967                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5968                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5969                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5970                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5971                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5972                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5973                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5974                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5975                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5976                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5977                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5978                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5979                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5980                 </fields>
5981                 <links>
5982                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5983                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5984                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5985                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5986                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5987                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5988                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5989                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5990                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5991                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5992                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5993                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5994                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5995                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5996                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5997                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5998                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5999                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6000                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6001                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6002                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6003                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6004                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6005                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6006                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6007                 </links>
6008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6009             <actions>
6010                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6011                 <retrieve />
6012                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6013                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6014             </actions>
6015         </permacrud>
6016         </class>
6017         <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">
6018                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6019                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6020                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6021                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6022                 </fields>
6023                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6024                         <actions>
6025                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6026                                 <retrieve/>
6027                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6028                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6029                         </actions>
6030                 </permacrud>
6031         </class>
6032         <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">
6033                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6034                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6035                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6036                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6037                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6038                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6039                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6040                 </fields>
6041                 <links>
6042                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6043                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6044                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6045                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6046                 </links>
6047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6048                         <actions>
6049                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6050                                 <retrieve/>
6051                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6052                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6053                         </actions>
6054                 </permacrud>
6055         </class>
6056         <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">
6057                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6058                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6059                         <field name="btype" reporter:datatype="text"/>
6060                         <field name="id" reporter:datatype="id" />
6061                         <field name="name"  reporter:datatype="text"/>
6062                         <field name="description" reporter:datatype="text"/>
6063                         <field name="owner" reporter:datatype="link"/>
6064                         <field name="pub" reporter:datatype="bool"/>
6065                         <field name="create_time" reporter:datatype="timestamp" />
6066                 </fields>
6067                 <links>
6068                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6069                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6070                 </links>
6071         </class>
6072         <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">
6073                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6074                         <field name="id" reporter:datatype="id" />
6075                         <field name="bucket" reporter:datatype="link"/>
6076                         <field name="note" reporter:datatype="text" />
6077                 </fields>
6078                 <links>
6079                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6080                 </links>
6081         </class>
6082         <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">
6083                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6084                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6085                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6086                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6087                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6088                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6089                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6090                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6091                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6092                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6093                 </fields>
6094                 <links>
6095                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6096                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6097                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6098                 </links>
6099                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6100                         <actions>
6101                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6102                         </actions>
6103                 </permacrud>
6104         </class>
6105         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6106                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6107                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6108                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6109                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6110                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6111                 </fields>
6112                 <links>
6113                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6114                 </links>
6115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6116                         <actions>
6117                                 <retrieve permission="VIEW_USER">
6118                                         <context link="usr" field="home_ou" />
6119                                 </retrieve>
6120                         </actions>
6121                 </permacrud>
6122         </class>
6123     <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">
6124         <fields oils_persist:primary="field">
6125             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6126             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6127             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6128         </fields>
6129         <links/>
6130         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6131             <actions>
6132                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6133                 <retrieve />
6134                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6135                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6136             </actions>
6137         </permacrud>
6138     </class>
6139         <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">
6140                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6141                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6142                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6143                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6144                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6145                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6146                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6147                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6148                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6149                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6150                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6151                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6152                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6153                 </fields>
6154                 <links>
6155                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6156                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6157                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6158                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6159                 </links>
6160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6161             <actions>
6162                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6163                 <retrieve />
6164                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6165                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6166             </actions>
6167         </permacrud>
6168         </class>
6169         <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">
6170                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6171                         <field name="field" reporter:datatype="link"/>
6172                         <field name="id" reporter:datatype="id" />
6173                         <field name="source" reporter:datatype="link"/>
6174                         <field name="value"  reporter:datatype="text"/>
6175                 </fields>
6176                 <links>
6177                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6178                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6179                 </links>
6180         </class>
6181         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6182                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6183                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6184                         <field name="btype" reporter:datatype="text"/>
6185                         <field name="id" reporter:datatype="id" />
6186                         <field name="name"  reporter:datatype="text"/>
6187                         <field name="description" reporter:datatype="text"/>
6188                         <field name="owner" reporter:datatype="link"/>
6189                         <field name="pub" reporter:datatype="bool"/>
6190                         <field name="create_time" reporter:datatype="timestamp" />
6191                 </fields>
6192                 <links>
6193                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6194                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6195                 </links>
6196         </class>
6197         <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">
6198                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6199                         <field name="id" reporter:datatype="id" />
6200                         <field name="bucket" reporter:datatype="link"/>
6201                         <field name="note" reporter:datatype="text" />
6202                 </fields>
6203                 <links>
6204                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6205                 </links>
6206         </class>
6207         <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">
6208                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6209                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6210                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6211                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6212                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6213                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6214                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6215                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6216                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6217                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6218                 </fields>
6219                 <links>
6220                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6221                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6222                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6223                 </links>
6224         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6225             <actions>
6226                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6227                     <context link="xact" jump="usr" field="home_ou"/>
6228                 </retrieve>
6229                         </actions>
6230                 </permacrud>
6231         </class>
6232         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6233                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6234                         <field name="id" reporter:datatype="id" />
6235                         <field name="ind1" />
6236                         <field name="ind2" />
6237                         <field name="record" />
6238                         <field name="subfield" />
6239                         <field name="tag" />
6240                         <field name="value" />
6241                 </fields>
6242                 <links>
6243                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6244                 </links>
6245         </class>
6246         <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">
6247                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6248                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6249                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6250                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6251                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6252                 </fields>
6253                 <links>
6254                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6255                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6256                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6257                 </links>
6258         </class>
6259         <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">
6260                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6261                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6262                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6263                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6264                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6265                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6266                 </fields>
6267                 <links>
6268                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6269                 </links>
6270         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6271             <actions>
6272                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6273                 <retrieve/>
6274                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6275                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6276             </actions>
6277         </permacrud>
6278
6279         </class>
6280         <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">
6281                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6282                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6283                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6284                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6285                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6286                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6287                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6288                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6289                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6290                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6291                 </fields>
6292                 <links>
6293                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6294                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6295                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6296                 </links>
6297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6298             <actions>
6299                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6300                 <retrieve/>
6301                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6302                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6303             </actions>
6304         </permacrud>
6305         </class>
6306         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6307                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6308                         <field name="create_date" reporter:datatype="timestamp"/>
6309                         <field name="creator" reporter:datatype="link"/>
6310                         <field name="edit_date" reporter:datatype="timestamp"/>
6311                         <field name="editor" reporter:datatype="link"/>
6312                         <field name="id" reporter:datatype="id" />
6313                         <field name="pub" reporter:datatype="bool"/>
6314                         <field name="record" reporter:datatype="link"/>
6315                         <field name="value"  reporter:datatype="text"/>
6316                 </fields>
6317                 <links>
6318                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6319                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6320                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6321                 </links>
6322         </class>
6323         <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">
6324                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6325                         <field name="balance_owed" reporter:datatype="money" />
6326                         <field name="total_owed" reporter:datatype="money" />
6327                         <field name="total_paid" reporter:datatype="money" />
6328                         <field name="usr" reporter:datatype="link"/>
6329                 </fields>
6330                 <links>
6331                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6332                 </links>
6333         </class>
6334         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6335                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6336                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6337                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6338                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6339                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6340                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6341                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6342                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6343                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6344                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6345                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6346                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6347                 </fields>
6348                 <links>
6349                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6350                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6351                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6352                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6353                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6354                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6355                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6356                 </links>
6357         </class>
6358         <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">
6359                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6360                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6361                         <field name="quality" reporter:datatype="int" />
6362                         <field name="source" reporter:datatype="text"/>
6363                         <field name="transcendant" reporter:datatype="bool"/>
6364                         <field name="can_have_copies" reporter:datatype="bool"/>
6365                 </fields>
6366                 <links/>
6367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6368             <actions>
6369                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6370                 <retrieve/>
6371                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6372                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6373             </actions>
6374         </permacrud>
6375         </class>
6376         <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">
6377                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6378                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6379                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6380                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6381                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6382                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6383                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6384                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6385                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6386                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6387                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6388                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6389                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6390                 </fields>
6391                 <links>
6392                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6393                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6394                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6395                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6396                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6397                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6398                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6399                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6400                 </links>
6401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6402                         <actions>
6403                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6404                                         <context link="usr" field="home_ou" />
6405                                 </retrieve>
6406                         </actions>
6407                 </permacrud>
6408         </class>
6409         <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">
6410                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6411                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6412                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6413                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6414                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6415                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6416                 </fields>
6417                 <links>
6418                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6419                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6420                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6421                 </links>
6422         </class>
6423         <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">
6424                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6425                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6426                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6427                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6428                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6429                 </fields>
6430                 <links>
6431                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6432                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6433                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6434                 </links>
6435         </class>
6436         <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">
6437                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6438                         <field name="bucket" reporter:datatype="link"/>
6439                         <field name="id" reporter:datatype="id" />
6440                         <field name="target_user" reporter:datatype="link"/>
6441                         <field name="create_time" reporter:datatype="timestamp" />
6442                         <field name="pos" reporter:datatype="int" />
6443                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6444                 </fields>
6445                 <links>
6446                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6447                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6448             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6449                 </links>
6450         </class>
6451         <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">
6452                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6453                         <field name="id" reporter:datatype="id" />
6454                         <field name="item" reporter:datatype="link"/>
6455                         <field name="note" reporter:datatype="text" />
6456                 </fields>
6457                 <links>
6458                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6459                 </links>
6460         </class>
6461         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6462                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6463                         <field name="balance_owed" reporter:datatype="money" />
6464                         <field name="total_owed" reporter:datatype="money" />
6465                         <field name="total_paid" reporter:datatype="money" />
6466                         <field name="usr" reporter:datatype="link"/>
6467                 </fields>
6468                 <links>
6469                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6470                 </links>
6471         </class>
6472         <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">
6473                 <fields oils_persist:primary="code" oils_persist:sequence="">
6474                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6475                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6476                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6477                 </fields>
6478                 <links/>
6479         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6480             <actions>
6481                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6482                 <retrieve/>
6483                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6484                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6485             </actions>
6486         </permacrud>
6487         </class>
6488         <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">
6489                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6490                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6491                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6492                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6493                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6494                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6495                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6496                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6497                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6498                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6499                 </fields>
6500                 <links>
6501                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6502                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6503                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6504                 </links>
6505         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6506             <actions>
6507                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6508                     <context link="xact" jump="usr" field="home_ou"/>
6509                 </retrieve>
6510                         </actions>
6511                 </permacrud>
6512         </class>
6513         <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">
6514                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6515                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6516                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6517                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6518                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6519                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6520                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6521                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6522                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6523                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6524                 </fields>
6525                 <links>
6526                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6527                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6528                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6529                 </links>
6530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6531             <actions>
6532                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6533                     <context link="xact" jump="usr" field="home_ou"/>
6534                 </retrieve>
6535                         </actions>
6536                 </permacrud>
6537         </class>
6538         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6539                 <fields oils_persist:primary="id" oils_persist:sequence="">
6540                         <field name="checkin_lib" reporter:datatype="link"/>
6541                         <field name="checkin_staff" reporter:datatype="link"/>
6542                         <field name="checkin_time" reporter:datatype="timestamp"/>
6543                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6544                         <field name="circ_staff" reporter:datatype="link"/>
6545                         <field name="desk_renewal" reporter:datatype="bool"/>
6546                         <field name="due_date" reporter:datatype="timestamp"/>
6547                         <field name="duration" reporter:datatype="interval"/>
6548                         <field name="duration_rule" reporter:datatype="link"/>
6549                         <field name="fine_interval" reporter:datatype="interval"/>
6550                         <field name="id" reporter:datatype="id" />
6551                         <field name="max_fine" reporter:datatype="money" />
6552                         <field name="max_fine_rule" reporter:datatype="link"/>
6553                         <field name="opac_renewal" reporter:datatype="bool"/>
6554                         <field name="phone_renewal" reporter:datatype="bool"/>
6555                         <field name="recurring_fine" reporter:datatype="money" />
6556                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6557                         <field name="renewal_remaining" reporter:datatype="int" />
6558             <field name="grace_period" reporter:datatype="interval" />
6559                         <field name="stop_fines" reporter:datatype="text"/>
6560                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6561                         <field name="target_copy" reporter:datatype="link"/>
6562                         <field name="usr" reporter:datatype="link"/>
6563                         <field name="xact_finish" reporter:datatype="timestamp" />
6564                         <field name="xact_start" reporter:datatype="timestamp" />
6565                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6566                 </fields>
6567                 <links>
6568                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6569                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6570                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6571                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6572                 </links>
6573         </class>
6574         <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">
6575                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6576                         <field name="field" reporter:datatype="link"/>
6577                         <field name="id" reporter:datatype="id" />
6578                         <field name="source" reporter:datatype="link"/>
6579                         <field name="value" reporter:datatype="text"/>
6580                 </fields>
6581                 <links>
6582                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6583                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6584                 </links>
6585         </class>
6586         <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">
6587                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6588                         <field name="high" reporter:datatype="money" />
6589                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6590                         <field name="low" reporter:datatype="money" />
6591                         <field name="name" reporter:datatype="text"/>
6592                         <field name="normal" reporter:datatype="money" />
6593                         <field name="recurrence_interval" reporter:datatype="interval"/>
6594             <field name="grace_period" reporter:datatype="interval" />
6595                 </fields>
6596                 <links/>
6597         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6598             <actions>
6599                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6600                 <retrieve/>
6601                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6602                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6603             </actions>
6604         </permacrud>
6605         </class>
6606         <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">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6608                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6609                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6610                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6611                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6612                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6613                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6614                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6615                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6616                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6617                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6618                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6619                 </fields>
6620                 <links>
6621                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6622                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6623                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6624                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6625                 </links>
6626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6627             <actions>
6628                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6629                     <context link="xact" jump="usr" field="home_ou"/>
6630                 </retrieve>
6631                         </actions>
6632                 </permacrud>
6633         </class>
6634         <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">
6635                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6636                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6637                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6638                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6639                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6640                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6641                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6642                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6643                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6644                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6645                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6646                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6647                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6648                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6649                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6650                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6651                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6652                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6653                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6654                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6655                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6656                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6657                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6658                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6659                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6660                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6661                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6662                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6663                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6664                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6665                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6666                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6667                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6668                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6669                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6670                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6671                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6672                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6673                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6674                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6675                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6676                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6677                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6678                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6679                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6680                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6681                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6682                 </fields>
6683                 <links>
6684                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6685                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6686                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6687                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6688                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6689                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6690                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6691                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6692                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6693                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6694                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6695                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6696                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6697                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6698                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6699                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6700                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6701                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6702                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6703                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6704                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6705                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6706                 </links>
6707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6708             <actions>
6709                 <create permission="CREATE_COPY">
6710                     <context link="call_number" field="owning_lib"/>
6711                 </create>
6712                 <retrieve/>
6713                 <update permission="UPDATE_COPY">
6714                     <context link="call_number" field="owning_lib"/>
6715                 </update>
6716                 <delete permission="DELETE_COPY">
6717                     <context link="call_number" field="owning_lib"/>
6718                 </delete>
6719             </actions>
6720         </permacrud>
6721         </class>
6722
6723         <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">
6724                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6725                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6726                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6727                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6728                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6729                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6730                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6731                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6732                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6733                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6734                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6735                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6736                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6737                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6738                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6739                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6740                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6741                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6742                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6743                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6744                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6745                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6746                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6747                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6748                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6749                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6750                 </fields>
6751                 <links>
6752                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6753                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6754                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6755                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6756                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6757                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6758                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6759                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6760                 </links>
6761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6762                         <actions>
6763                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6764                                 <retrieve />
6765                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6766                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6767                         </actions>
6768                 </permacrud>
6769         </class>
6770
6771         <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">
6772                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6773                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6774                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6775                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6776                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6777                 </fields>
6778                 <links/>
6779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6780             <actions>
6781                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6782                 <retrieve/>
6783                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6784                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6785             </actions>
6786         </permacrud>
6787         </class>
6788         <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">
6789                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6790                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6791                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6792                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6793                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6794                 </fields>
6795                 <links/>
6796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6797             <actions>
6798                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6799                 <retrieve/>
6800                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6801                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6802             </actions>
6803         </permacrud>
6804         </class>
6805         <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">
6806                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6807                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6808                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6809                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6810                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6811                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6812                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6813                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6814                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6815                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6816                 </fields>
6817                 <links>
6818                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6819                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6820                 </links>
6821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6822             <actions>
6823                 <create permission="CREATE_PERM" global_required="true"/>
6824                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6825                 <update permission="UPDATE_PERM" global_required="true"/>
6826                 <delete permission="DELETE_PERM" global_required="true"/>
6827             </actions>
6828         </permacrud>
6829         </class>
6830         <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">
6831                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6832                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6833                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6834                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6835                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6836                 </fields>
6837                 <links>
6838                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6839                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6840                 </links>
6841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6842             <actions>
6843                 <create permission="ADMIN_SURVEY">
6844                     <context link="question" jump="survey" field="owner"/>
6845                 </create>
6846                 <retrieve/>
6847                 <update permission="ADMIN_SURVEY">
6848                     <context link="question" jump="survey" field="owner"/>
6849                 </update>
6850                 <delete permission="ADMIN_SURVEY">
6851                     <context link="question" jump="survey" field="owner"/>
6852                 </delete>
6853             </actions>
6854         </permacrud>
6855         </class>
6856         <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">
6857                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6858                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6859                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6860                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6861                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6862                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6863                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6864                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6865                 </fields>
6866                 <links>
6867                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6868                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6869                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6870                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6871                 </links>
6872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6873                         <actions>
6874                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6875                         </actions>
6876                 </permacrud>
6877         </class>
6878         <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">
6879                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6880                         <field name="balance_owed" reporter:datatype="money" />
6881                         <field name="total_owed" reporter:datatype="money" />
6882                         <field name="total_paid" reporter:datatype="money" />
6883                         <field name="usr" reporter:datatype="link"/>
6884                 </fields>
6885                 <links>
6886                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6887                 </links>
6888         </class>
6889         <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">
6890                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6891                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6892                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6893                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6894                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6895                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6896                 </fields>
6897                 <links>
6898                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6899                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6900                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6901                 </links>
6902         </class>
6903         <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">
6904                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6905                         <field name="field" reporter:datatype="link"/>
6906                         <field name="id" reporter:datatype="id" />
6907                         <field name="source" reporter:datatype="link"/>
6908                         <field name="value" reporter:datatype="text"/>
6909                 </fields>
6910                 <links>
6911                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6912                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6913                 </links>
6914         </class>
6915         <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">
6916                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6917                         <field name="field" reporter:datatype="link"/>
6918                         <field name="id" reporter:datatype="id" />
6919                         <field name="source" reporter:datatype="link"/>
6920                         <field name="value" reporter:datatype="text"/>
6921                 </fields>
6922                 <links>
6923                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6924                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6925                 </links>
6926         </class>
6927         <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">
6928                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6929                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6930                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6931                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6932                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6933                 </fields>
6934                 <links>
6935                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6936                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6937                 </links>
6938         </class>
6939         <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">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6941                         <field name="depth" reporter:datatype="int" />
6942                         <field name="grantable" reporter:datatype="bool"/>
6943                         <field name="grp" reporter:datatype="link"/>
6944                         <field name="id" reporter:datatype="id" />
6945                         <field name="perm" reporter:datatype="link"/>
6946                 </fields>
6947                 <links>
6948                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6949                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6950                 </links>
6951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6952             <actions>
6953                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6954                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6955                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6956                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6957             </actions>
6958         </permacrud>
6959         </class>
6960         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6961                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6962                         <field name="items" oils_persist:virtual="true" />
6963                         <field name="btype" reporter:datatype="text"/>
6964                         <field name="id" reporter:datatype="id" />
6965                         <field name="name" reporter:datatype="text"/>
6966                         <field name="description" reporter:datatype="text"/>
6967                         <field name="owner" reporter:datatype="link"/>
6968                         <field name="pub" reporter:datatype="bool"/>
6969                         <field name="create_time" reporter:datatype="timestamp" />
6970                 </fields>
6971                 <links>
6972                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6973                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6974                 </links>
6975         </class>
6976         <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">
6977                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6978                         <field name="id" reporter:datatype="id" />
6979                         <field name="bucket" reporter:datatype="link"/>
6980                         <field name="note" reporter:datatype="text" />
6981                 </fields>
6982                 <links>
6983                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6984                 </links>
6985         </class>
6986         <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">
6987                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6988                         <field name="id" reporter:datatype="int" />
6989                         <field name="usr" reporter:datatype="link"/>
6990                         <field name="work_ou" reporter:datatype="link"/>
6991                 </fields>
6992                 <links>
6993                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6994                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6995                 </links>
6996         </class>
6997         <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">
6998                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6999                         <field name="depth" reporter:datatype="int"/>
7000                         <field name="grantable" reporter:datatype="bool"/>
7001                         <field name="id" reporter:datatype="id" />
7002                         <field name="perm" reporter:datatype="link"/>
7003                         <field name="usr" reporter:datatype="link"/>
7004                 </fields>
7005                 <links>
7006                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7007                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7008                 </links>
7009         </class>
7010         <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">
7011                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7012                         <field name="object_id" reporter:datatype="text"/>
7013                         <field name="grantable" reporter:datatype="bool"/>
7014                         <field name="id" reporter:datatype="id" />
7015                         <field name="perm" reporter:datatype="link"/>
7016                         <field name="usr" reporter:datatype="link"/>
7017                         <field name="object_type" reporter:datatype="text"/>
7018                 </fields>
7019                 <links>
7020                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7021                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7022                 </links>
7023         </class>
7024         <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">
7025                 <fields oils_persist:primary="id" oils_persist:sequence="">
7026                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7027                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7028                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7029                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7030                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7031                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7032                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7033                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7034                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7035                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7036                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7037                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7038                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7039                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7040                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7041                 </fields>
7042                 <links>
7043                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7044                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7045                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7046                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7047                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7048                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7049                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7050                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7051                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7052                 </links>
7053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7054             <actions>
7055                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7056                     <context link="xact" jump="usr" field="home_ou"/>
7057                 </retrieve>
7058                         </actions>
7059                 </permacrud>
7060         </class>
7061         <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">
7062                 <fields oils_persist:primary="id" oils_persist:sequence="">
7063                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7064                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7065                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7066                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7067                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7068                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7069                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7070                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7071                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7072                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7073                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7074                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7075                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7076                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7077                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7078                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7079                 </fields>
7080                 <links>
7081                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7082                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7083                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7084                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7085                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7086                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7087                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7088                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7089                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7090                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7091                 </links>
7092         </class>
7093         <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">
7094                 <fields oils_persist:primary="id" oils_persist:sequence="">
7095                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7096                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7097                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7098                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7099                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7100                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7101                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7102                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7105                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7106                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7107                 </fields>
7108                 <links>
7109                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7110                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7111                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7112                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7113                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7114                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7115                 </links>
7116         </class>
7117         <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">
7118                 <fields oils_persist:primary="id" oils_persist:sequence="">
7119                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7120                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7121                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7122                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7123                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7124                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7125                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7126                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7127                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7128                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7129                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7130                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7131                 </fields>
7132                 <links>
7133                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7134                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7135                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7136                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7137                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7138                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7139                 </links>
7140         </class>
7141         <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">
7142                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7143                         <field name="bucket" reporter:datatype="link"/>
7144                         <field name="id" reporter:datatype="id" />
7145                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7146                         <field name="create_time" reporter:datatype="timestamp" />
7147                         <field name="pos" reporter:datatype="int" />
7148                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7149                 </fields>
7150                 <links>
7151                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7152                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7153             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7154                 </links>
7155         </class>
7156         <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">
7157                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7158                         <field name="id" reporter:datatype="id" />
7159                         <field name="item" reporter:datatype="link"/>
7160                         <field name="note" reporter:datatype="text" />
7161                 </fields>
7162                 <links>
7163                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7164                 </links>
7165         </class>
7166         <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">
7167                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7168                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7169                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7170                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7171                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7172                 </fields>
7173                 <links>
7174                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7175                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7176                 </links>
7177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7178                         <actions>
7179                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7180                         </actions>
7181                 </permacrud>
7182         </class>
7183     <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">
7184         <fields oils_persist:primary="field">
7185             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7186             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7187             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7188         </fields>
7189         <links/>
7190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7191             <actions>
7192                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7193                 <retrieve />
7194                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7195                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7196             </actions>
7197         </permacrud>
7198     </class>
7199         <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">
7200                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7201                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7202                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7203                 </fields>
7204                 <links/>
7205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7206             <actions>
7207                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7208                 <retrieve/>
7209                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7210                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7211             </actions>
7212         </permacrud>
7213         </class>
7214
7215
7216         <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">
7217                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7218                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7219                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7220                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7221                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7222                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7223                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7224                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7225                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7226                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7227                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7228                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7229                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7230                 </fields>
7231                 <links>
7232                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7233                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7234                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7235                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7236                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7237                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7238                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7239                 </links>
7240         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7241             <actions>
7242                 <create permission="TRANSIT_COPY">
7243                     <context link="target_copy" field="owner"/>
7244                 </create>
7245                 <retrieve/>
7246                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7247                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7248             </actions>
7249         </permacrud>
7250         </class>
7251         <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">
7252                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7253                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7254                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7255                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7256                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7257                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7258                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7259                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7260                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7261                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7262                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7263                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7264                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7265                 </fields>
7266                 <links>
7267                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7268                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7269                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7270                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7271                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7272                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7273                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7274                 </links>
7275         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7276             <actions>
7277                 <create permission="TRANSIT_COPY" context_field="owner">
7278                     <context link="target_copy" field="circ_lib"/>
7279                 </create>
7280                 <retrieve/>
7281                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7282                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7283             </actions>
7284         </permacrud>
7285         </class>
7286         <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">
7287                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7288                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7289                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7290                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7291                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7292                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7293                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7294                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7295                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7296                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7297                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7298                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7299                 </fields>
7300                 <links>
7301                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7302                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7303                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7304                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7305                 </links>
7306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7307             <actions>
7308                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7309                     <context link="xact" jump="usr" field="home_ou"/>
7310                 </retrieve>
7311                         </actions>
7312                 </permacrud>
7313         </class>
7314         <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">
7315                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7316                         <field name="grp" />
7317                         <field name="id" reporter:datatype="id" />
7318                         <field name="usr" />
7319                 </fields>
7320                 <links>
7321                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7322                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7323                 </links>
7324         </class>
7325         <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">
7326                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7327                         <field name="id" reporter:datatype="id" />
7328                         <field name="fq_field" reporter:datatype="text"/>
7329                         <field name="identity_value" reporter:datatype="text"/>
7330                         <field name="translation" reporter:datatype="text"/>
7331                         <field name="string" reporter:datatype="text"/>
7332                 </fields>
7333                 <links>
7334                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7335                 </links>
7336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7337             <actions>
7338                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7339                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7340                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7341                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7342             </actions>
7343         </permacrud>
7344         </class>
7345         <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">
7346                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7347                         <field name="id" reporter:datatype="id" />
7348                         <field name="fm_class" reporter:datatype="text"/>
7349                         <field name="field" reporter:datatype="text"/>
7350                         <field name="owner" reporter:datatype="org_unit"/>
7351                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7352                 </fields>
7353                 <links>
7354                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7355                 </links>
7356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7357             <actions>
7358                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7359                 <retrieve/>
7360                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7361                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7362             </actions>
7363         </permacrud>
7364         </class>
7365         <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">
7366                 <fields oils_persist:primary="code">
7367                         <field name="code" reporter:datatype="id" />
7368                         <field name="marc_code" reporter:datatype="text"/>
7369                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7370                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7371                 </fields>
7372                 <links/>
7373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7374             <actions>
7375                 <create permission="CREATE_LOCALE" global_required="true"/>
7376                 <retrieve/>
7377                 <update permission="UPDATE_LOCALE" global_required="true"/>
7378                 <delete permission="DELETE_LOCALE" global_required="true"/>
7379             </actions>
7380         </permacrud>
7381         </class>
7382         <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">
7383                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7384                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7385                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7386                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7387             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7388                 </fields>
7389                 <links>
7390                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7391                 </links>
7392         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7393             <actions>
7394                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7395                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7396                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7397                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7398             </actions>
7399         </permacrud>
7400         </class>
7401
7402         <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">
7403                 <fields oils_persist:primary="id">
7404                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7405                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7406                 </fields>
7407                 <links/>
7408         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7409             <actions>
7410                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7411                 <retrieve/>
7412                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7413                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7414             </actions>
7415         </permacrud>
7416         </class>
7417
7418         <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">
7419                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7420                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7421                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7422                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7423                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7424                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7425                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7426                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7427                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7428                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7429                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7430                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7431                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7432                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7433                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7434                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7435                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7436                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7437                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7438                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7439                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7440                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7441                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7442                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7443                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7444                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7445                 </fields>
7446                 <links>
7447                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7448                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7449                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7450                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7451                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7452                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7453                 </links>
7454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7455             <actions>
7456                 <create permission="user_request.create">
7457                     <context link="usr" field="home_ou"/>
7458                                 </create>
7459                 <retrieve permission="user_request.view">
7460                     <context link="usr" field="home_ou"/>
7461                                 </retrieve>
7462                 <update permission="user_request.update">
7463                     <context link="usr" field="home_ou"/>
7464                                 </update>
7465                 <delete permission="user_request.delete">
7466                     <context link="usr" field="home_ou"/>
7467                                 </delete>
7468             </actions>
7469         </permacrud>
7470         </class>
7471
7472         <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">
7473                 <fields oils_persist:primary="code">
7474                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7475                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7476                 </fields>
7477                 <links/>
7478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7479             <actions>
7480                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7481                 <retrieve/>
7482                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7483                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7484             </actions>
7485         </permacrud>
7486         </class>
7487
7488         <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">
7489                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7490                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7491                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7492                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7493                         <field reporter:label="Ratio" name="ratio" />
7494                 </fields>
7495                 <links>
7496                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7497                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7498                 </links>
7499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7500                         <actions>
7501                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7502                                 <retrieve/>
7503                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7504                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7505                         </actions>
7506                 </permacrud>
7507         </class>
7508
7509         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7510                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7511                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7512                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7513                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7514                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7515                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7516                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7517                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7518                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7519                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7520                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7521                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7522                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7523                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7524                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7525                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7526                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7527                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7528                 </fields>
7529                 <links>
7530                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7531                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7532             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7533             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7534             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7535                 </links>
7536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7537             <actions>
7538                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7539                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7540                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7541                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7542             </actions>
7543         </permacrud>
7544         </class>
7545
7546         <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">
7547                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7548                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7549                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7550                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7551                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7552                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7553                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7554                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7555                 </fields>
7556                 <links>
7557                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7558                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7559                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7560                 </links>
7561         </class>
7562
7563         <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">
7564                 <fields oils_persist:primary="code">
7565                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7566                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7567                 </fields>
7568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7569             <actions>
7570                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7571                 <retrieve/>
7572                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7573                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7574             </actions>
7575                 </permacrud>
7576         </class>
7577
7578         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7579                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7580                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7581                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7582                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7583                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7584                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7585                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7586                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7587                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7588                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7589                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7590                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7591                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7592                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7593                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7594                 </fields>
7595                 <links>
7596                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7597                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7598                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7599                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7600                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7601                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7602                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7603                 </links>
7604         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7605             <actions>
7606                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7607                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7608                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7609                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7610             </actions>
7611         </permacrud>
7612         </class>
7613
7614         <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">
7615                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7616                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7617                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7618                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7619                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7620                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7621                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7622                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7623                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7624                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7625                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7626                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7627                 </fields>
7628                 <links>
7629                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7630                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7631                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7632                 </links>
7633         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7634             <actions>
7635                 <create   permission="ADMIN_INVOICE">
7636                                         <context link="invoice" field="receiver"/>
7637                                 </create>
7638                 <retrieve permission="ADMIN_INVOICE">
7639                                         <context link="invoice" field="receiver"/>
7640                                 </retrieve>
7641                 <update   permission="ADMIN_INVOICE">
7642                                         <context link="invoice" field="receiver"/>
7643                                 </update>
7644                                 <delete   permission="ADMIN_INVOICE">
7645                                         <context link="invoice" field="receiver"/>
7646                                 </delete>
7647             </actions>
7648         </permacrud>
7649         </class>
7650
7651         <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">
7652                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7653                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7654                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7655                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7656                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7657                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7658                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7659                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7660                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7661                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7662                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7663                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7664                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7665                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7666                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7667                 </fields>
7668                 <links>
7669                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7670                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7671                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7672                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7673                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7674                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7675                 </links>
7676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7677             <actions>
7678                 <create   permission="ADMIN_INVOICE">
7679                                         <context link="invoice" field="receiver"/>
7680                                 </create>
7681                 <retrieve permission="ADMIN_INVOICE">
7682                                         <context link="invoice" field="receiver"/>
7683                                 </retrieve>
7684                 <update   permission="ADMIN_INVOICE">
7685                                         <context link="invoice" field="receiver"/>
7686                                 </update>
7687                                 <delete   permission="ADMIN_INVOICE">
7688                                         <context link="invoice" field="receiver"/>
7689                                 </delete>
7690             </actions>
7691         </permacrud>
7692         </class>
7693
7694         <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">
7695                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7696                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7697                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7698                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7699                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7700                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7701                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7702                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7703                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7704                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7705                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7706                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7707                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7708                 </fields>
7709                 <links>
7710                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7711                 </links>
7712         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7713             <actions>
7714                 <create permission="ADMIN_PROVIDER">
7715                     <context link="provider" field="owner"/>
7716                 </create>
7717                 <retrieve permission="ADMIN_PROVIDER">
7718                     <context link="provider" field="owner"/>
7719                 </retrieve>
7720                 <update permission="ADMIN_PROVIDER">
7721                     <context link="provider" field="owner"/>
7722                 </update>
7723                 <delete permission="ADMIN_PROVIDER">
7724                     <context link="provider" field="owner"/>
7725                 </delete>
7726             </actions>
7727         </permacrud>
7728         </class>
7729
7730         <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">
7731                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7732                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7733                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7734                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7735                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7736                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7737                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7738         </fields>
7739                 <links>
7740                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7741                 </links>
7742         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7743             <actions>
7744                 <create permission="ADMIN_PROVIDER">
7745                     <context link="provider" field="owner"/>
7746                 </create>
7747                 <retrieve permission="ADMIN_PROVIDER">
7748                     <context link="provider" field="owner"/>
7749                 </retrieve>
7750                 <update permission="ADMIN_PROVIDER">
7751                     <context link="provider" field="owner"/>
7752                 </update>
7753                 <delete permission="ADMIN_PROVIDER">
7754                     <context link="provider" field="owner"/>
7755                 </delete>
7756             </actions>
7757         </permacrud>
7758     </class>
7759         <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">
7760                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7761                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7762                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7763                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7764                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7765                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7766                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7767                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7768                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7769                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7770                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7771                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7772                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7773                 </fields>
7774                 <links>
7775                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7776                 </links>
7777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7778             <actions>
7779                 <create permission="ADMIN_PROVIDER">
7780                     <context link="contact" jump='provider' field="owner"/>
7781                 </create>
7782                 <retrieve permission="ADMIN_PROVIDER">
7783                     <context link="contact" jump='provider' field="owner"/>
7784                 </retrieve>
7785                 <update permission="ADMIN_PROVIDER">
7786                     <context link="contact" jump='provider' field="owner"/>
7787                 </update>
7788                 <delete permission="ADMIN_PROVIDER">
7789                     <context link="contact" jump='provider' field="owner"/>
7790                 </delete>
7791             </actions>
7792         </permacrud>
7793         </class>
7794
7795         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7796                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7797                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7798                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7799                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7800                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7801                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7802                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7803                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7804                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7805                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7806                 </fields>
7807                 <links>
7808                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7809                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7810                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7811                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7812                 </links>
7813         </class>
7814
7815         <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">
7816                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7817                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7818                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7819                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7820                 </fields>
7821                 <links>
7822             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7823                 </links>
7824                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7825                         <actions>
7826                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7827                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7828                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7829                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7830                         </actions>
7831                 </permacrud>
7832         </class>
7833
7834         <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">
7835                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7836                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7837                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7838                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7839                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7840                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7841                 </fields>
7842                 <links>
7843                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7844                 </links>
7845                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7846                         <actions>
7847                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7848                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7849                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7850                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7851                         </actions>
7852                 </permacrud>
7853         </class>
7854
7855         <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">
7856                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7857                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7858                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7859                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7860                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7861                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7862                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7863                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7864                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7865                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7866                 </fields>
7867                 <links>
7868                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7869                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7870             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7871             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7872                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7873                 </links>
7874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7875             <actions>
7876                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7877                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7878                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7879                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7880             </actions>
7881         </permacrud>
7882         </class>
7883
7884         <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">
7885                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7886                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7887                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7888                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7889                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7890                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7891                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7892                 </fields>
7893                 <links>
7894                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7895                 </links>
7896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7897                         <actions>
7898                                 <create permission="ADMIN_FUNDING_SOURCE">
7899                     <context link="funding_source" field="owner"/>
7900                 </create>
7901                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7902                     <context link="funding_source" field="owner"/>
7903                 </retrieve>
7904                                 <update permission="ADMIN_FUNDING_SOURCE">
7905                     <context link="funding_source" field="owner"/>
7906                 </update>
7907                                 <delete permission="ADMIN_FUNDING_SOURCE">
7908                     <context link="funding_source" field="owner"/>
7909                 </delete>
7910                         </actions>
7911                 </permacrud>
7912         </class>
7913
7914         <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">
7915                 <fields oils_persist:primary="id">
7916                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7917                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7918                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7919                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7920                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7921                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7922                 </fields>
7923                 <links>
7924                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7925                 </links>
7926         </class>
7927
7928         <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">
7929                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7930                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7931                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7932                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7933                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7934                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7935                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7936                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7937                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7938                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
7939                 </fields>
7940                 <links>
7941                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7942                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7943                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
7944                 </links>
7945                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7946                         <actions>
7947                                 <create permission="ADMIN_ACQ_FUND">
7948                     <context link="fund" field="org"/>
7949                 </create>
7950                                 <retrieve permission="ADMIN_ACQ_FUND">
7951                     <context link="fund" field="org"/>
7952                 </retrieve>
7953                                 <update permission="ADMIN_ACQ_FUND">
7954                     <context link="fund" field="org"/>
7955                 </update>
7956                                 <delete permission="ADMIN_ACQ_FUND">
7957                     <context link="fund" field="org"/>
7958                 </delete>
7959                         </actions>
7960                 </permacrud>
7961         </class>
7962
7963         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7964                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7965                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7966                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7967                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7968                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7969                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7970                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7971                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7972                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7973                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7974                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7975                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7976                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7977                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7978                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7979                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7980                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7981                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7982                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7983                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7984                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7985                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7986                 </fields>
7987                 <links>
7988                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7989                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7990             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7991             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7992             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7993             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7994             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7995             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7996             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7997             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7998             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7999                 </links>
8000         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8001             <actions>
8002                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8003                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8004                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8005                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8006             </actions>
8007         </permacrud>
8008         </class>
8009
8010         <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">
8011                 <fields oils_persist:primary="fund">
8012                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8013                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8014                 </fields>
8015                 <links>
8016                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8017                 </links>
8018         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8019             <actions>
8020                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8021                                         <context link="fund" field="org" />
8022                 </retrieve>
8023             </actions>
8024         </permacrud>
8025         </class>
8026
8027         <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">
8028                 <fields oils_persist:primary="fund">
8029                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8030                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8031                 </fields>
8032                 <links>
8033                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8034                 </links>
8035         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8036             <actions>
8037                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8038                                         <context link="fund" field="org" />
8039                 </retrieve>
8040             </actions>
8041         </permacrud>
8042         </class>
8043
8044         <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">
8045                 <fields oils_persist:primary="fund">
8046                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8047                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8048                 </fields>
8049                 <links>
8050                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8051                 </links>
8052         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8053             <actions>
8054                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8055                                         <context link="fund" field="org" />
8056                 </retrieve>
8057             </actions>
8058         </permacrud>
8059         </class>
8060
8061         <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">
8062                 <fields oils_persist:primary="fund">
8063                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8064                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8065                 </fields>
8066                 <links>
8067                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8068                 </links>
8069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8070             <actions>
8071                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8072                                         <context link="fund" field="org" />
8073                 </retrieve>
8074             </actions>
8075         </permacrud>
8076         </class>
8077
8078         <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">
8079                 <fields oils_persist:primary="fund">
8080                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8081                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8082                 </fields>
8083                 <links>
8084                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8085                 </links>
8086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8087             <actions>
8088                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8089                                         <context link="fund" field="org" />
8090                 </retrieve>
8091             </actions>
8092         </permacrud>
8093         </class>
8094
8095    <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">
8096         <fields oils_persist:primary="fund">
8097             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8098             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8099         </fields>
8100         <links>
8101             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8102         </links>
8103     </class>
8104
8105    <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">
8106         <fields oils_persist:primary="fund">
8107             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8108             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8109         </fields>
8110         <links>
8111             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8112         </links>
8113     </class>
8114
8115    <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">
8116         <fields oils_persist:primary="fund">
8117             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8118             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8119         </fields>
8120         <links>
8121             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8122         </links>
8123     </class>
8124
8125    <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">
8126         <fields oils_persist:primary="fund">
8127             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8128             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8129         </fields>
8130         <links>
8131             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8132         </links>
8133     </class>
8134
8135    <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">
8136         <fields oils_persist:primary="fund">
8137             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8138             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8139         </fields>
8140         <links>
8141             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8142         </links>
8143     </class>
8144
8145         <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">
8146                 <fields oils_persist:primary="funding_source">
8147                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8148                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8149                 </fields>
8150                 <links>
8151                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8152                 </links>
8153         </class>
8154
8155         <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">
8156                 <fields oils_persist:primary="funding_source">
8157                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8158                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8159                 </fields>
8160                 <links>
8161                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8162                 </links>
8163         </class>
8164
8165         <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">
8166                 <fields oils_persist:primary="funding_source">
8167                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8168                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8169                 </fields>
8170                 <links>
8171                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8172                 </links>
8173         </class>
8174
8175         <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">
8176                 <fields oils_persist:primary="fund">
8177                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8178                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8179                 </fields>
8180                 <links>
8181                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8182                 </links>
8183         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8184             <actions>
8185                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8186                                         <context link="fund" field="org" />
8187                 </retrieve>
8188             </actions>
8189         </permacrud>
8190     </class>
8191     <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">
8192         <oils_persist:source_definition><![CDATA[
8193             SELECT
8194                 acqf.*,
8195                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8196                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8197                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8198                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8199             FROM
8200                 acq.fund acqf
8201                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8202                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8203                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8204                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8205         ]]></oils_persist:source_definition>
8206         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8207             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8208             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8209             <field reporter:label="Name" name="name" reporter:datatype="text" />
8210             <field reporter:label="Year" name="year" reporter:datatype="int" />
8211             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8212             <field reporter:label="Code" name="code" reporter:datatype="text" />
8213             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8214             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8215             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8216             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8217             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8218
8219             <!-- non fund-native fields -->
8220             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8221             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8222             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8223             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8224         </fields>
8225         <links>
8226             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8227             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8228             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8229         </links>
8230         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8231             <actions>
8232                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8233             </actions>
8234         </permacrud>
8235         </class>
8236         <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">
8237                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8238                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8239                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8240                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8241                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8242                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8243                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8244                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8245                 </fields>
8246                 <links>
8247                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8248                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8249                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8250                 </links>
8251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8252                         <actions>
8253                                 <create permission="ADMIN_ACQ_FUND">
8254                     <context link="fund" field="org"/>
8255                 </create>
8256                                 <retrieve permission="ADMIN_ACQ_FUND">
8257                     <context link="fund" field="org"/>
8258                 </retrieve>
8259                                 <update permission="ADMIN_ACQ_FUND">
8260                     <context link="fund" field="org"/>
8261                 </update>
8262                                 <delete permission="ADMIN_ACQ_FUND">
8263                     <context link="fund" field="org"/>
8264                 </delete>
8265                         </actions>
8266                 </permacrud>
8267         </class>
8268
8269     <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">
8270         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8271             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8272             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8273             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8274             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8275             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8276             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8277             <field reporter:label="Note" name="note" reporter:datatype="text" />
8278             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8279         </fields>
8280         <links>
8281             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8282             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8283             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8284         </links>
8285                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8286                         <actions>
8287                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8288                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8289                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8290                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8291                         </actions>
8292                 </permacrud>
8293     </class>
8294
8295         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8296                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8297                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8298                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8299                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8300                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8301                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8302                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8303                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8304                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8305                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8306                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8307                 </fields>
8308                 <links>
8309                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8310                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8311                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8312                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8313                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8314                 </links>
8315                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8316                         <actions>
8317                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8318                         </actions>
8319                 </permacrud>
8320         </class>
8321
8322         <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">
8323                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8324                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8325                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8326                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8327                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8328                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8329                 </fields>
8330                 <links>
8331                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8332                 </links>
8333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8334                         <actions>
8335                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8336                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8337                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8338                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8339                         </actions>
8340                 </permacrud>
8341         </class>
8342
8343         <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">
8344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8345                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8346                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8347                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8348                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8349                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8350                         <field reporter:label="State" name="state" reporter:datatype="text" />
8351                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8352                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8353                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8354                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8355                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8356                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8357                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8358                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8359                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8360                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8361                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8362                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8363                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8364                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8365                 </fields>
8366                 <links>
8367                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8368                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8369                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8370                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8371                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8372                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8373                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8374                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8375                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8376                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8377                 </links>
8378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8379                         <actions>
8380                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8381                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8382                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8383                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8384                         </actions>
8385                 </permacrud>
8386         </class>
8387
8388         <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">
8389                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8390                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8391                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8392                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8393                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8394                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8395                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8396                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8397                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8398                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8399                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8400                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8401                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8402                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8403                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8404                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8405                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8406                 </fields>
8407                 <links>
8408                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8409                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8410                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8411                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8412                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8413                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8414                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8415                 </links>
8416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8417             <actions>
8418                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8419             </actions>
8420                 </permacrud>
8421         </class>
8422
8423         <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">
8424                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8425                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8426                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8427                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8428                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8429                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8430                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8431                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8432                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8433                 </fields>
8434                 <links>
8435                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8436                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8437                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8438                 </links>
8439                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8440             <actions>
8441                 <create permission="CREATE_PURCHASE_ORDER">
8442                     <context link="purchase_order" field="ordering_agency"/>
8443                 </create>
8444                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8445                     <context link="purchase_order" field="ordering_agency"/>
8446                 </retrieve>
8447                 <update permission="CREATE_PURCHASE_ORDER">
8448                     <context link="purchase_order" field="ordering_agency"/>
8449                 </update>
8450                 <delete permission="CREATE_PURCHASE_ORDER">
8451                     <context link="purchase_order" field="ordering_agency"/>
8452                 </delete>
8453             </actions>
8454                 </permacrud>
8455         </class>
8456
8457         <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">
8458                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8459                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8460                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8461                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8462                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8463                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8464                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8465                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8466                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8467                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8468                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8469                 </fields>
8470                 <links>
8471                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8472                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8473                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8474                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8475                 </links>
8476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8477             <actions>
8478                 <create permission="CREATE_PURCHASE_ORDER">
8479                     <context link="purchase_order" field="ordering_agency"/>
8480                 </create>
8481                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8482                     <context link="purchase_order" field="ordering_agency"/>
8483                 </retrieve>
8484                 <update permission="CREATE_PURCHASE_ORDER">
8485                     <context link="purchase_order" field="ordering_agency"/>
8486                 </update>
8487                 <delete permission="CREATE_PURCHASE_ORDER">
8488                     <context link="purchase_order" field="ordering_agency"/>
8489                 </delete>
8490             </actions>
8491                 </permacrud>
8492         </class>
8493
8494         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8495                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8496                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8497                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8498                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8499                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8500                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8501                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8502                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8503                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8504                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8505                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8506                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8507                         <field reporter:label="State" name="state" reporter:datatype="text" />
8508                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8509                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8510                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8511                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8512                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8513                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8514                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8515                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8516                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8517                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8518                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8519                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8520                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8521                 </fields>
8522                 <links>
8523                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8524                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8525                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8526                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8527                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8528                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8529                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8530                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8531                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8532                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8533                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8534                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8535                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8536                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8537                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8538                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8539                 </links>
8540                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8541                         <actions>
8542                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8543                                         <context link="purchase_order" field="ordering_agency"/>
8544                                         <context link="picklist" field="org_unit"/>
8545                                 </retrieve>
8546                         </actions>
8547                 </permacrud>
8548         </class>
8549
8550         <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">
8551                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8552                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8553                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8554                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8555                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8556                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8557                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8558                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8559                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8560                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8561                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8562                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8563                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8564                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8565                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8566                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8567                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8568                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8569                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8570                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8571                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8572                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8573                 </fields>
8574                 <links>
8575                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8576                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8577                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8578                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8579                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8580                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8581                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8582                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8583                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8584                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8585                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8586                 </links>
8587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8588                         <actions>
8589                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8590                                         <context link="purchase_order" field="ordering_agency"/>
8591                                         <context link="picklist" field="org_unit"/>
8592                                 </retrieve>
8593                         </actions>
8594                 </permacrud>
8595         </class>
8596
8597         <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">
8598                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8599                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8600                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8601                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8602                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8603                 </fields>
8604                 <links>
8605                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8606                 </links>
8607                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8608                         <actions>
8609                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8610                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8611                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8612                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8613                         </actions>
8614                 </permacrud>
8615         </class>
8616
8617         <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">
8618                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8619                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8620                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8621                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8622                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8623                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8624                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8625                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8626                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8627                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8628                 </fields>
8629                 <links>
8630                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8631                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8632                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8633                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8634                 </links>
8635         </class>
8636
8637         <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">
8638                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8639                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8640                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8641                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8642                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8643                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8644                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8645                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8646                 </fields>
8647                 <links>
8648                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8649                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8650                 </links>
8651         </class>
8652
8653         <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">
8654                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8655                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8656                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8657                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8658                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8659                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8660                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8661                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8662                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8663                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8664                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8665                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8666                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8667                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8668                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8669                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8670                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8671                 </fields>
8672                 <links>
8673                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8674                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8675                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8676                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8677                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8678                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8679                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8680                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8681                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8682                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8683                 </links>
8684         </class>
8685
8686         <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">
8687                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8688                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8689                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8690                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8691                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8692                 </fields>
8693                 <links/>
8694                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8695                         <actions>
8696                                 <retrieve />
8697                         </actions>
8698                 </permacrud>
8699         </class>
8700
8701         <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">
8702                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8703                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8704                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8705                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8706                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8707                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8708             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8709                 </fields>
8710                 <links/>
8711         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8712             <actions>
8713                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8714                 <retrieve />
8715                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8716                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8717             </actions>
8718         </permacrud>
8719         </class>
8720
8721         <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">
8722                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8723                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8724                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8725                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8726                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8727                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8728                 </fields>
8729                 <links/>
8730         </class>
8731         <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">
8732                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8733                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8734                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8735                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8736                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8737                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8738                 </fields>
8739                 <links>
8740                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8741                 </links>
8742         </class>
8743
8744         <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">
8745             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8746                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8747                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8748                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8749                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8750                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8751                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8752         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8753
8754             </fields>
8755             <links>
8756                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8757             </links>
8758             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8759                 <actions>
8760                     <create permission="ADMIN_PROVIDER">
8761                         <context link="provider" field="owner"/>
8762                     </create>
8763                     <retrieve permission="ADMIN_PROVIDER">
8764                         <context link="provider" field="owner"/>
8765                     </retrieve>
8766                     <update permission="ADMIN_PROVIDER">
8767                         <context link="provider" field="owner"/>
8768                     </update>
8769                     <delete permission="ADMIN_PROVIDER">
8770                         <context link="provider" field="owner"/>
8771                     </delete>
8772                 </actions>
8773             </permacrud>
8774         </class>
8775         
8776         <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">
8777             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8778                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8779                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8780                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8781                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8782             </fields>
8783             <links>
8784                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8785             </links>
8786             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8787                 <actions>
8788                     <create permission="ADMIN_PROVIDER">
8789                         <context link="provider" field="owner"/>
8790                     </create>
8791                     <retrieve permission="ADMIN_PROVIDER">
8792                         <context link="provider" field="owner"/>
8793                     </retrieve>
8794                     <update permission="ADMIN_PROVIDER">
8795                         <context link="provider" field="owner"/>
8796                     </update>
8797                     <delete permission="ADMIN_PROVIDER">
8798                         <context link="provider" field="owner"/>
8799                     </delete>
8800                 </actions>
8801             </permacrud>
8802         </class>
8803         
8804         <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">
8805             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8806                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8807                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8808                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8809                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8810                 </fields>
8811                 <links/>
8812         </class>
8813
8814         <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">
8815                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8816                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8817                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8818                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8819                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8820                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8821                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8822                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8823                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8824                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8825                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8826                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8827                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8828                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8829                 </fields>
8830                 <links>
8831                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8832                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8833                 </links>
8834         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8835             <actions>
8836                 <create permission="ADMIN_PROVIDER">
8837                     <context link="provider" field="owner"/>
8838                 </create>
8839                 <retrieve permission="ADMIN_PROVIDER">
8840                     <context link="provider" field="owner"/>
8841                 </retrieve>
8842                 <update permission="ADMIN_PROVIDER">
8843                     <context link="provider" field="owner"/>
8844                 </update>
8845                 <delete permission="ADMIN_PROVIDER">
8846                     <context link="provider" field="owner"/>
8847                 </delete>
8848             </actions>
8849         </permacrud>
8850         </class>
8851
8852         <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">
8853                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8854                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8855                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8856                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8857                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8858                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8859                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8860                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8861                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8862                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8863                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8864                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8865                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8866                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8867                 </fields>
8868                 <links>
8869                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8870                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8871                 </links>
8872         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8873             <actions>
8874                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8875                     <context link="account" jump="provider" field="owner"/>
8876                 </retrieve>
8877                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8878                     <context link="account" jump="provider" field="owner"/>
8879                 </update>
8880                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8881                     <context link="account" jump="provider" field="owner"/>
8882                 </delete>
8883             </actions>
8884         </permacrud>
8885         </class>
8886
8887
8888         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8889                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8890                         <field name="id" reporter:datatype="id" />
8891                         <field name="parent" reporter:datatype="link"/>
8892                         <field name="owner" reporter:datatype="link"/>
8893                         <field name="create_time" reporter:datatype="timestamp"/>
8894                         <field name="name" reporter:datatype="text"/>
8895                         <field name="shared" reporter:datatype="bool"/>
8896                         <field name="share_with" reporter:datatype="link"/>
8897                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8898                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8899                 </fields>
8900                 <links>
8901                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8902                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8903                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8904                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8905                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8906                 </links>
8907         </class>
8908         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8909                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8910                         <field name="id" reporter:datatype="id" />
8911                         <field name="parent" reporter:datatype="link"/>
8912                         <field name="owner" reporter:datatype="link"/>
8913                         <field name="create_time" reporter:datatype="timestamp"/>
8914                         <field name="name" reporter:datatype="text"/>
8915                         <field name="shared" reporter:datatype="bool"/>
8916                         <field name="share_with" reporter:datatype="link"/>
8917                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8918                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8919                 </fields>
8920                 <links>
8921                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8922                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8923                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8924                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8925                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8926                 </links>
8927         </class>
8928         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8929                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8930                         <field name="id" reporter:datatype="id" />
8931                         <field name="parent" reporter:datatype="link"/>
8932                         <field name="owner" reporter:datatype="link"/>
8933                         <field name="create_time" reporter:datatype="timestamp"/>
8934                         <field name="name" reporter:datatype="text"/>
8935                         <field name="shared" reporter:datatype="bool"/>
8936                         <field name="share_with" reporter:datatype="link"/>
8937                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8938                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8939                 </fields>
8940                 <links>
8941                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8942                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8943                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8944                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8945                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8946                 </links>
8947         </class>
8948         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8949                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8950                         <field name="id" reporter:datatype="id" />
8951                         <field name="owner" reporter:datatype="link"/>
8952                         <field name="create_time" reporter:datatype="timestamp"/>
8953                         <field name="name" reporter:datatype="text"/>
8954                         <field name="data" reporter:datatype="text"/>
8955                         <field name="folder" reporter:datatype="link"/>
8956                         <field name="description" reporter:datatype="text"/>
8957                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8958                 </fields>
8959                 <links>
8960                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8961                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8962                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8963                 </links>
8964         </class>
8965         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8966                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8967                         <field name="id" reporter:datatype="id" />
8968                         <field name="owner" reporter:datatype="link"/>
8969                         <field name="create_time" reporter:datatype="timestamp"/>
8970                         <field name="template" reporter:datatype="link"/>
8971                         <field name="data" reporter:datatype="text"/>
8972                         <field name="folder" reporter:datatype="link"/>
8973                         <field name="recur" reporter:datatype="bool"/>
8974                         <field name="recurrence" reporter:datatype="interval"/>
8975                         <field name="name" reporter:datatype="text"/>
8976                         <field name="description" reporter:datatype="text"/>
8977                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8978                 </fields>
8979                 <links>
8980                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8981                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8982                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8983                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8984                 </links>
8985         </class>
8986         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8987                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8988                         <field name="id" reporter:datatype="id" />
8989                         <field name="runner" reporter:datatype="link"/>
8990                         <field name="start_time" reporter:datatype="timestamp"/>
8991                         <field name="complete_time" reporter:datatype="timestamp"/>
8992                         <field name="run_time" reporter:datatype="timestamp"/>
8993                         <field name="email" reporter:datatype="text"/>
8994                         <field name="excel_format" reporter:datatype="bool"/>
8995                         <field name="csv_format" reporter:datatype="bool"/>
8996                         <field name="html_format" reporter:datatype="bool"/>
8997                         <field name="error_code" reporter:datatype="int"/>
8998                         <field name="error_text" reporter:datatype="text"/>
8999                         <field name="report" reporter:datatype="link"/>
9000                         <field name="folder" reporter:datatype="link"/>
9001                         <field name="chart_pie" reporter:datatype="bool"/>
9002                         <field name="chart_bar" reporter:datatype="bool"/>
9003                         <field name="chart_line" reporter:datatype="bool"/>
9004                 </fields>
9005                 <links>
9006                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9007                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9008                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9009                 </links>
9010         </class>
9011         <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">
9012                 <fields oils_persist:primary="id">
9013                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9014                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9015                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9016                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9017                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9018                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9019                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9020                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9021                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9022                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9023                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9024                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9025                 </fields>
9026                 <links>
9027                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9028                 </links>
9029                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9030                         <actions>
9031                                 <retrieve />
9032                         </actions>
9033                 </permacrud>
9034         </class>
9035         <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">
9036                 <fields oils_persist:primary="id">
9037                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9038                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9039                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9040                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9041                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9042                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9043                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9044                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9045                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9046                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9047                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9048                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9049                 </fields>
9050                 <links>
9051                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9052                 </links>
9053         </class>
9054         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9055                 <fields oils_persist:primary="id">
9056                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9057                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9058                         <field reporter:label="Fingerprint" name="fingerprint" />
9059                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9060                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9061                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9062                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9063                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9064                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9065                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9066                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9067                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9068                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9069                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9070                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9071                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9072                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9073                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9074                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9075                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9076                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9077                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9078                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9079                 </fields>
9080                 <links>
9081                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9082                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9083                 </links>
9084         </class>
9085         <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">
9086                 <fields oils_persist:primary="id">
9087                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9088                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9089                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9090                 </fields>
9091                 <links>
9092                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9093                 </links>
9094         </class>
9095         <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">
9096                 <fields oils_persist:primary="id">
9097                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9098                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9099                 </fields>
9100                 <links>
9101                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9102                 </links>
9103         </class>
9104         <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">
9105                 <fields oils_persist:primary="id">
9106                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9107                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9108                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9109                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9110                 </fields>
9111                 <links>
9112                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9113                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9114                 </links>
9115         </class>
9116         <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">
9117                 <fields oils_persist:primary="xact">
9118                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9119                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9120                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9121                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9122                 </fields>
9123                 <links>
9124                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9125                 </links>
9126         </class>
9127         <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">
9128                 <fields oils_persist:primary="xact">
9129                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9130                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9131                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9132                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9133                 </fields>
9134                 <links>
9135                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9136                 </links>
9137         </class>
9138         <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)">
9139                 <fields oils_persist:primary="id">
9140                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9141                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9142                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9143                 </fields>
9144                 <links>
9145                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9146                 </links>
9147         </class>
9148         <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">
9149                 <fields oils_persist:primary="id">
9150                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9151                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9152                 </fields>
9153                 <links>
9154                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9155                 </links>
9156         </class>
9157         <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">
9158                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9159                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9160                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9161                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9162                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9163                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9164                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9165                 </fields>
9166                 <links>
9167                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9168                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9169                 </links>
9170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9171                         <actions>
9172                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9173                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9174                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9175                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9176                         </actions>
9177                 </permacrud>
9178         </class>
9179         <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">
9180                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9181                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9182                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9183                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9184                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9185                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9186                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9187                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9188                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9189                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9190                 </fields>
9191                 <links>
9192                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9193                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9194                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9195                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9196                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9197                 </links>
9198                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9199                         <actions>
9200                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9201                                         <context link="formula" field="owner"/>
9202                                 </create>
9203                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9204                                         <context link="formula" field="owner"/>
9205                                 </retrieve>
9206                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9207                                         <context link="formula" field="owner"/>
9208                                 </update>
9209                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9210                                         <context link="formula" field="owner"/>
9211                                 </delete>
9212                         </actions>
9213                 </permacrud>
9214         </class>
9215
9216         <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">
9217                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9218                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9219                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9220                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9221                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9222                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9223                 </fields>
9224                 <links>
9225                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9226                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9227                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9228                 </links>
9229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9230                         <actions>
9231                                 <create permission="CREATE_PURCHASE_ORDER">
9232                                         <context link="formula" field="owner"/>
9233                 </create>
9234                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9235                                         <context link="formula" field="owner"/>
9236                 </retrieve>
9237                                 <update permission="CREATE_PURCHASE_ORDER">
9238                                         <context link="formula" field="owner"/>
9239                 </update>
9240                                 <delete permission="CREATE_PURCHASE_ORDER">
9241                                         <context link="formula" field="owner"/>
9242                 </delete>
9243                         </actions>
9244                 </permacrud>
9245         </class>
9246
9247         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9248                 <fields oils_persist:primary="id">
9249                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9250                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9251                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9252                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9253                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9254                 </fields>
9255                 <links>
9256                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9257                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9258                 </links>
9259         </class>
9260
9261         <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">
9262                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9263                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9264                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9265                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9266                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9267                 </fields>
9268                 <links>
9269                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9270                 </links>
9271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9272                         <actions>
9273                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9274                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9275                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9276                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9277                         </actions>
9278                 </permacrud>
9279         </class>
9280
9281         <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">
9282                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9283                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9284                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9285                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9286                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9287                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9288                 </fields>
9289                 <links>
9290                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9291                 </links>
9292                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9293                         <actions>
9294                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9295                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9296                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9297                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9298                         </actions>
9299                 </permacrud>
9300         </class>
9301
9302         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9303                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9304                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9305                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9306                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9307                 </fields>
9308                 <links>
9309                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9310                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9311                 </links>
9312         </class>
9313
9314         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9316                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9317                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9318                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9319                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9320                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9321                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9322                 </fields>
9323                 <links>
9324                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9325                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9326                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9327                 </links>
9328         </class>
9329
9330         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9331                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9332                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9333                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9334                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9335                 </fields>
9336                 <links>
9337                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9338                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9339                 </links>
9340         </class>
9341
9342         <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">
9343                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9344                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9345                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9346                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9347                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9348                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9349                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9350                 </fields>
9351                 <links>
9352                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9353                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9354                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9355                 </links>
9356         </class>
9357
9358         <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">
9359                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9360                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9361                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9362                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9363                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9364                 </fields>
9365                 <links>
9366                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9367                 </links>
9368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9369             <actions>
9370                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9371                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9372                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9373                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9374             </actions>
9375                 </permacrud>
9376         </class>
9377
9378         <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">
9379                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9380                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9381                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9382                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9383                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9384                 </fields>
9385                 <links>
9386                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9387                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9388                 </links>
9389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9390                         <actions>
9391                                 <create permission="ADMIN_CLAIM_POLICY">
9392                                         <context link="claim_policy" field="org_unit"/>
9393                 </create>
9394                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9395                                         <context link="claim_policy" field="org_unit"/>
9396                 </retrieve>
9397                                 <update permission="ADMIN_CLAIM_POLICY">
9398                                         <context link="claim_policy" field="org_unit"/>
9399                 </update>
9400                                 <delete permission="ADMIN_CLAIM_POLICY">
9401                                         <context link="claim_policy" field="org_unit"/>
9402                 </delete>
9403                         </actions>
9404                 </permacrud>
9405         </class>
9406
9407     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9408         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9409             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9410             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9411             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9412             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9413             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9414             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9415             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9416             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9417             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9418             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9419             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9420             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9421             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9422             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9423             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9424             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9425         </fields>
9426         <links>
9427             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9428         </links>
9429     </class>
9430
9431     <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">
9432         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9433             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9434             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9435             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9436             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9437             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9438         </fields>
9439     </class>
9440
9441     <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">
9442         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9443             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9444             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9445             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9446             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9447             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9448             <field reporter:label="City" name="city" reporter:datatype="text"/>
9449             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9450             <field reporter:label="State" name="state" reporter:datatype="text"/>
9451             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9452             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9453             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9454         </fields>
9455     </class>
9456
9457     <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">
9458         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9459             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9460             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9461             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9462             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9463             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9464             <field reporter:label="City" name="city" reporter:datatype="text"/>
9465             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9466             <field reporter:label="State" name="state" reporter:datatype="text"/>
9467             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9468             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9469             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9470         </fields>
9471     </class>
9472
9473     <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">
9474         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9475             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9476             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9477             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9478             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9479             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9480             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9481         </fields>
9482     </class>
9483
9484         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9485                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9486                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9487                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9488                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9489                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9490                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9491                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9492                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9493                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9494                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9495                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9496                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9497                 </fields>
9498                 <links>
9499                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9500                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9501                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9502                 </links>
9503         </class>
9504
9505         <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">
9506                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9507                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9508                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9509                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9510                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9511                 </fields>
9512                 <links>
9513                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9514                 </links>
9515         </class>
9516
9517     <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">
9518         <fields>
9519             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9520             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9521             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9522         </fields>
9523                 <links>
9524                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9525                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9526                 </links>
9527     </class>
9528
9529     <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">
9530         <fields>
9531             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9532             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9533         </fields>
9534                 <links>
9535                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9536                 </links>
9537     </class>
9538
9539     <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">
9540         <fields>
9541             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9542             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9543             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9544         </fields>
9545                 <links>
9546                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9547                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9548                 </links>
9549     </class>
9550
9551     <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">
9552         <fields>
9553             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9554             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9555         </fields>
9556                 <links>
9557                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9558                 </links>
9559     </class>
9560
9561     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9562                 <oils_persist:source_definition>
9563
9564             SELECT  DISTINCT l.*
9565               FROM  action.unfulfilled_hold_loops l
9566                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9567               WHERE l.count = m.max
9568
9569                 </oils_persist:source_definition>
9570         <fields>
9571             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9572             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9573             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9574         </fields>
9575                 <links>
9576                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9577                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9578                 </links>
9579     </class>
9580
9581         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9582                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9583                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9584                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9585                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9586                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9587                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9588                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9589                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9590                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9591                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9592                 </fields>
9593                 <links>
9594                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9595                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9596                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9597                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9598                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9599                 </links>
9600         </class>
9601
9602         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9603                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9604                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9605                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9606                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9607                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9608                 </fields>
9609                 <links>
9610                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9611                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9612                 </links>
9613         </class>
9614
9615         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9616                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9617                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9618                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9619                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9620                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9621                 </fields>
9622                 <links>
9623                 </links>
9624         </class>
9625
9626         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9627                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9628                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9629                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9630                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9631                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9632                 </fields>
9633                 <links>
9634                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9635                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9636                 </links>
9637         </class>
9638         
9639         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9640                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9641                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9642                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9643                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9644                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9645                 </fields>
9646                 <links>
9647                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9648                 </links>
9649         </class>
9650         
9651         <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">
9652                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9653                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9654                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9655                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9656                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9657                 </fields>
9658                 <links>
9659                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9660                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9661                 </links>
9662         </class>
9663
9664         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9665                 <fields oils_persist:primary="name">
9666                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9667                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9668                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9669                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9670                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9671                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9672                 </fields>
9673                 <links>
9674                 </links>
9675         </class>
9676
9677         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9678                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9679                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9680                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9681                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9682                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9683                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9684                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9685                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9686                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9687                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9688                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9689                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9690                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9691                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9692                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9693                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9694                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9695                 </fields>
9696                 <links>
9697                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9698                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9699                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9700                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9701                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9702                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9703                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9704                 </links>
9705         </class>
9706
9707         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9708                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9709                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9710                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9711                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9712                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9713                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9714                 </fields>
9715                 <links>
9716                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9717                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9718                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9719                 </links>
9720         </class>
9721
9722         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9723                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9724                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9725                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9726                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9727                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9728                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9729                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9730                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9731                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9732                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9733                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9734                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9735                 </fields>
9736                 <links>
9737                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9738                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9739                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9740                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9741                 </links>
9742         </class>
9743
9744         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9745                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9746                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9747                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9748                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9749                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9750                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9751                 </fields>
9752                 <links>
9753                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9754                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9755                 </links>
9756         </class>
9757
9758         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9759                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9760                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9761                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9762                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9763                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9764                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9765                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9766                 </fields>
9767                 <links>
9768                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9769                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9770                 </links>
9771         </class>
9772
9773         <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">
9774                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9775                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9776                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9777                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9778                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9779                 </fields>
9780                 <links>
9781                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9782                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9783                 </links>
9784         </class>
9785
9786         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9787                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9788                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9789                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9790                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9791                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9792                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9793                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9794                 </fields>
9795                 <links>
9796                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9797                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9798                 </links>
9799         </class>
9800
9801         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9802                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9803                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9804                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9805                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9806                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9807                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9808                 </fields>
9809                 <links>
9810                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9811                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9812                 </links>
9813         </class>
9814
9815         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9816                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9817                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9818                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9819                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9820                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9821                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9822                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9823                 </fields>
9824                 <links>
9825                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9826                 </links>
9827         </class>
9828
9829         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9830                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9831                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9832                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9833                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9834                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9835                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9836                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9837                 </fields>
9838                 <links>
9839                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9840                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9841                 </links>
9842         </class>
9843
9844         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9845                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9846                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9847                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9848                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9849                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9850                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9851                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9852                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9853                 </fields>
9854                 <links>
9855                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9856                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9857                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9858                 </links>
9859         </class>
9860
9861         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9862                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9863                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9864                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9865                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9866                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9867                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9868                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9869                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9870                 </fields>
9871                 <links>
9872                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9873                 </links>
9874         </class>
9875
9876         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9877                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9878                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9879                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9880                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9881                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9882                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9883                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9884                 </fields>
9885                 <links>
9886                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9887                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9888                 </links>
9889         </class>
9890
9891         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9892                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9893                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9894                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9895                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9896                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9897                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9898                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9899                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9900                 </fields>
9901                 <links>
9902                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9903                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9904                 </links>
9905         </class>
9906
9907         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9908                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9909                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9910                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9911                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9912                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9913                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9914                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9915                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9916                 </fields>
9917                 <links>
9918                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9919                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9920                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9921                 </links>
9922         </class>
9923
9924         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9925                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9926                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9927                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9928                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9929                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9930                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9931                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9932                 </fields>
9933                 <links>
9934                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9935                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9936                 </links>
9937         </class>
9938
9939         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9940                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9941                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9942                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9943                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9944                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9945                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9946                 </fields>
9947                 <links>
9948                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9949                 </links>
9950         </class>
9951
9952         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9953                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9954                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9955                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9956                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9957                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9958                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9959                 </fields>
9960                 <links>
9961                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9962                 </links>
9963         </class>
9964
9965         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9966                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9967                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9968                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9969                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9970                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9971                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9972                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9973                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9974                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9975                 </fields>
9976                 <links>
9977                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9978                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9979                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9980                 </links>
9981         </class>
9982
9983         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9984                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9985                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9986                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9987                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9988                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9989                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9990                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9991                 </fields>
9992                 <links>
9993                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9994                 </links>
9995         </class>
9996
9997         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9998                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9999                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10000                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10001                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10002                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10003                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10004                 </fields>
10005                 <links>
10006                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10007                 </links>
10008         </class>
10009
10010         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10011                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10012                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10013                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10014                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10015                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10016                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10017                 </fields>
10018                 <links>
10019                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10020                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10021                 </links>
10022         </class>
10023
10024         <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">
10025                 <fields oils_persist:primary="id">
10026                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10027                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10028                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10029                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10030                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10031                 </fields>
10032                 <links>
10033                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10034                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10035                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10036                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10037                 </links>
10038         </class>
10039
10040         <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">
10041                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10042                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10043                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10044                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10045                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10046                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10047                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10048                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10049                 </fields>
10050                 <links/>
10051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10052                         <actions>
10053                                 <retrieve/>
10054                         </actions>
10055                 </permacrud>
10056         </class>
10057
10058         <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">
10059                 <fields oils_persist:primary="ptype_key">
10060                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10061                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10062                 </fields>
10063                 <links/>
10064                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10065                         <actions>
10066                                 <retrieve/>
10067                         </actions>
10068                 </permacrud>
10069         </class>
10070
10071         <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">
10072                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10073                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10074                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10075                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10076                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10077                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10078                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10079                 </fields>
10080                 <links>
10081                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10082                 </links>
10083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10084                         <actions>
10085                                 <retrieve/>
10086                         </actions>
10087                 </permacrud>
10088         </class>
10089
10090         <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">
10091                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10092                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10093                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10094                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10095                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10096                 </fields>
10097                 <links>
10098                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10099                 </links>
10100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10101                         <actions>
10102                                 <retrieve/>
10103                         </actions>
10104                 </permacrud>
10105         </class>
10106
10107     <class
10108         id="uvs"
10109         controller="open-ils.cstore open-ils.pcrud"
10110         oils_obj:fieldmapper="url_verify::session"
10111         oils_persist:tablename="url_verify.session"
10112         reporter:label="URL Verification Session"
10113     >
10114         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10115             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10116             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10117                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10118             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10119             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10120             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10121             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10122             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10123             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10124         </fields>
10125
10126         <links>
10127             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10128             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10129             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10130             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10131             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10132         </links>
10133
10134         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10135             <actions>
10136                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10137             </actions>
10138         </permacrud>
10139
10140     </class>
10141
10142     <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">
10143         <oils_persist:source_definition>
10144             SELECT
10145                 cbrebi.id AS id,  -- so we can have a pkey in our view
10146                 uvs.id AS session,
10147                 uvs.owning_lib,
10148                 cbrebi.target_biblio_record_entry
10149             FROM url_verify.session uvs
10150             JOIN container.biblio_record_entry_bucket cbreb
10151                 ON (uvs.container = cbreb.id)
10152             JOIN container.biblio_record_entry_bucket_item cbrebi
10153                 ON (cbrebi.bucket = cbreb.id)
10154         </oils_persist:source_definition>
10155         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10156             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10157             <field reporter:label="Session" name="session" reporter:datatype="link" />
10158             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10159             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10160         </fields>
10161         <links>
10162             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10163             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10164             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10165         </links>
10166         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10167             <actions>
10168                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10169             </actions>
10170         </permacrud>
10171     </class>
10172
10173     <class
10174         id="uvus"
10175         controller="open-ils.cstore open-ils.pcrud"
10176         oils_obj:fieldmapper="url_verify::url_selector"
10177         oils_persist:tablename="url_verify.url_selector"
10178         reporter:label="URL Verification URL Selector"
10179     >
10180         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10181             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10182             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10183                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10184             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10185         </fields>
10186
10187         <links>
10188             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10189             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10190         </links>
10191
10192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10193             <actions>
10194                 <create permission="URL_VERIFY">
10195                     <context link="session" field="owning_lib"/>
10196                 </create>
10197                 <retrieve permission="URL_VERIFY">
10198                     <context link="session" field="owning_lib"/>
10199                 </retrieve>
10200                 <update permission="URL_VERIFY">
10201                     <context link="session" field="owning_lib"/>
10202                 </update>
10203                 <delete permission="URL_VERIFY">
10204                     <context link="session" field="owning_lib"/>
10205                 </delete>
10206             </actions>
10207         </permacrud>
10208
10209     </class>
10210
10211     <class
10212         id="uvu"
10213         controller="open-ils.cstore open-ils.pcrud"
10214         oils_obj:fieldmapper="url_verify::url"
10215         oils_persist:tablename="url_verify.url"
10216         reporter:label="URL Verification URL"
10217     >
10218         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10219             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10220                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10221                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10222                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10223                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10224             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10225             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10226             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10227             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10228             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10229             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10230             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10231             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10232             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10233             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10234             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10235             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10236             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10237         </fields>
10238
10239         <links>
10240             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10241             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10242             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10243             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10244             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10245         </links>
10246
10247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10248             <actions>
10249                 <create permission="URL_VERIFY">
10250                     <context link="session" field="owning_lib"/>
10251                 </create>
10252                 <retrieve permission="URL_VERIFY">
10253                     <context link="session" field="owning_lib"/>
10254                 </retrieve>
10255                 <update permission="URL_VERIFY">
10256                     <context link="session" field="owning_lib"/>
10257                 </update>
10258                 <delete permission="URL_VERIFY">
10259                     <context link="session" field="owning_lib"/>
10260                 </delete>
10261             </actions>
10262         </permacrud>
10263
10264     </class>
10265
10266     <class
10267         id="uvva"
10268         controller="open-ils.cstore open-ils.pcrud"
10269         oils_obj:fieldmapper="url_verify::verification_attempt"
10270         oils_persist:tablename="url_verify.verification_attempt"
10271         reporter:label="URL Verification Attempt"
10272     >
10273         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10274             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10275                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10276                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10277             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10278             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10279         </fields>
10280
10281         <links>
10282             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10283             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10284         </links>
10285
10286         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10287             <actions>
10288                 <create permission="URL_VERIFY">
10289                     <context link="session" field="owning_lib"/>
10290                 </create>
10291                 <retrieve permission="URL_VERIFY">
10292                     <context link="session" field="owning_lib"/>
10293                 </retrieve>
10294                 <update permission="URL_VERIFY">
10295                     <context link="session" field="owning_lib"/>
10296                 </update>
10297                 <delete permission="URL_VERIFY">
10298                     <context link="session" field="owning_lib"/>
10299                 </delete>
10300             </actions>
10301         </permacrud>
10302
10303     </class>
10304
10305     <class
10306         id="uvuv"
10307         controller="open-ils.cstore open-ils.pcrud"
10308         oils_obj:fieldmapper="url_verify::url_verification"
10309         oils_persist:tablename="url_verify.url_verification"
10310         reporter:label="URL Verification"
10311     >
10312         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10313             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10314                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10315                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10316             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10317             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10318             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10319             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10320                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10321         </fields>
10322
10323         <links>
10324             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10325             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10326             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10327         </links>
10328
10329         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10330             <actions>
10331                 <create permission="URL_VERIFY">
10332                     <context link="attempt" jump="session" field="owning_lib"/>
10333                 </create>
10334                 <retrieve permission="URL_VERIFY">
10335                     <context link="attempt" jump="session" field="owning_lib"/>
10336                 </retrieve>
10337                 <update permission="URL_VERIFY">
10338                     <context link="attempt" jump="session" field="owning_lib"/>
10339                 </update>
10340                 <delete permission="URL_VERIFY">
10341                     <context link="attempt" jump="session" field="owning_lib"/>
10342                 </delete>
10343             </actions>
10344         </permacrud>
10345
10346     </class>
10347
10348         <class
10349                 id="cfdi"
10350                 controller="open-ils.cstore open-ils.pcrud"
10351                 oils_obj:fieldmapper="config::filter_dialog_interface"
10352                 oils_persist:tablename="config.filter_dialog_interface"
10353                 reporter:label="FilterDialog Interface">
10354                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10355                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10356                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10357                 </fields>
10358                 <links>
10359                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10360                 </links>
10361                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10362                         <actions>
10363                                 <retrieve />
10364                         </actions>
10365                 </permacrud>
10366         </class>
10367
10368         <class
10369                 id="cfdfs"
10370                 controller="open-ils.cstore open-ils.pcrud"
10371                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10372                 oils_persist:tablename="config.filter_dialog_filter_set"
10373                 reporter:label="FilterDialog Filter Set">
10374                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10375                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10376                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10377                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10378                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10379                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10380                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10381                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10382                 </fields>
10383                 <links>
10384                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10385                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10386                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10387                 </links>
10388                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10389                         <actions>
10390                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10391                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10392                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10393                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10394                         </actions>
10395                 </permacrud>
10396
10397         </class>
10398
10399         <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">
10400                 <fields oils_persist:primary="code">
10401                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10402                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10403                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10404                 </fields>
10405                 <links/>
10406                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10407                         <actions>
10408                                 <retrieve/>
10409                         </actions>
10410                 </permacrud>
10411         </class>
10412
10413         <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">
10414                 <oils_persist:source_definition>
10415
10416             SELECT  b.id,
10417                     MAX(dcp.edit_date) AS last_delete_date
10418              FROM   biblio.record_entry b
10419                     JOIN asset.call_number cn ON (cn.record = b.id)
10420                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10421              WHERE  NOT b.deleted
10422              GROUP BY b.id
10423              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10424
10425                 </oils_persist:source_definition>
10426                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10427                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10428                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10429                 </fields>
10430                 <links>
10431                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10432                 </links>
10433                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10434                         <actions>
10435                                 <retrieve/>
10436                         </actions>
10437                 </permacrud>
10438         </class>
10439
10440         <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">
10441                 <oils_persist:source_definition>
10442
10443             -- -- 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.
10444             -- -- 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
10445             -- -- may not.
10446             -- SELECT
10447             --     bre.id AS "bib_id",
10448             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10449             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10450             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10451             -- FROM (
10452                 SELECT
10453                     y.bre AS "id",
10454                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10455                     y.hold_count AS "hold_count",
10456                     (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"
10457                 FROM (
10458                         SELECT
10459                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10460                             COUNT(*) AS "hold_count"
10461                         FROM action.hold_request h
10462                         WHERE
10463                             cancel_time IS NULL
10464                             AND fulfillment_time IS NULL
10465                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10466                         GROUP BY 1
10467                     )y LEFT JOIN (
10468                         SELECT 
10469                             (SELECT id
10470                                 FROM biblio.record_entry 
10471                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10472                             ) AS "bre", 
10473                             COUNT(*) AS "copy_count"
10474                         FROM asset.copy
10475                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10476                         WHERE copy.holdable 
10477                             AND NOT copy.deleted 
10478                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10479                         GROUP BY 1
10480                     )x ON x.bre = y.bre
10481                 -- )z RIGHT JOIN (
10482                 --     SELECT id
10483                 --     FROM biblio.record_entry
10484                 --     WHERE NOT deleted
10485                 -- )bre ON (z.bib_id = bre.id)
10486                 
10487
10488                 </oils_persist:source_definition>
10489                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10490                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10491                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10492                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10493                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10494                 </fields>
10495                 <links>
10496                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10497                 </links>
10498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10499                         <actions>
10500                                 <retrieve/>
10501                         </actions>
10502                 </permacrud>
10503         </class>
10504
10505         <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">
10506                 <oils_persist:source_definition>
10507             SELECT *,
10508                 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,
10509                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10510             FROM
10511                 (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
10512                     FROM
10513                         action.hold_request ahr
10514                         JOIN reporter.hold_request_record rhrr USING (id)
10515                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10516                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10517                     WHERE
10518                         ahr.cancel_time IS NULL
10519                         AND ahr.fulfillment_time IS NULL
10520                     GROUP BY bib_record, pickup_lib
10521                 )x
10522                 JOIN
10523                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10524                     FROM
10525                         action.hold_request ahr
10526                         JOIN reporter.hold_request_record rhrr USING (id)
10527                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10528                     WHERE
10529                         ahr.cancel_time IS NULL
10530                         AND ahr.fulfillment_time IS NULL
10531                     GROUP BY bib_record
10532                 )y
10533                 USING (id)
10534                 </oils_persist:source_definition>
10535                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10536                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10537                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10538                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10539                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10540                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10541                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10542                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10543                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10544                 </fields>
10545                 <links>
10546                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10547                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10548                 </links>
10549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10550                         <actions>
10551                                 <retrieve/>
10552                         </actions>
10553                 </permacrud>
10554         </class>
10555
10556         <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">
10557                 <oils_persist:source_definition>
10558             SELECT
10559                 ac.id,
10560                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10561                 MAX(actac.xact_start) AS last_circ
10562             FROM asset.copy ac
10563                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10564             GROUP BY ac.id
10565
10566             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10567             --SELECT
10568             --    ac.id,
10569             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10570             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10571             --FROM asset.copy ac
10572             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10573             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10574             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10575                 </oils_persist:source_definition>
10576                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10577                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10578                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10579                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10580                 </fields>
10581                 <links>
10582                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10583                 </links>
10584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10585                         <actions>
10586                                 <retrieve/>
10587                         </actions>
10588                 </permacrud>
10589         </class>
10590
10591         <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">
10592                 <fields oils_persist:primary="id">
10593                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10594                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10595                 </fields>
10596                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10597                         <actions>
10598                                 <retrieve/>
10599                         </actions>
10600                 </permacrud>
10601         </class>
10602
10603         <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">
10604                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10605                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10606                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10607                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10608                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10609                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10610                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10611                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10612                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10613                 </fields>
10614                 <links>
10615                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10616                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10617                 </links>
10618                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10619                         <actions>
10620                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10621                                 <retrieve/>
10622                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10623                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10624                         </actions>
10625                 </permacrud>
10626         </class>
10627
10628         <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">
10629                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10630                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10631                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10632                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10633                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10634                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10635                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10636                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10637                 </fields>
10638                 <links>
10639                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10640                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10641                 </links>
10642                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10643                         <actions>
10644                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10645                                 <retrieve/>
10646                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10647                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10648                         </actions>
10649                 </permacrud>
10650         </class>
10651
10652
10653         <!-- ********************************************************************************************************************* -->
10654         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10655         <!-- ********************************************************************************************************************* -->
10656         <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">
10657                 <fields oils_persist:primary="id">
10658                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10659                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10660                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10661                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10662                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10663                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10664                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10665                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10666                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10667                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10668                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10669                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10670                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10671                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10672                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10673                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10674                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10675                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10676                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10677                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10678                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10679                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10680                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10681                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10682                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10683                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10684                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10685                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10686                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10687                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10688                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10689                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10690                 </fields>
10691                 <links>
10692                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10693                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10694                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10695                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10696                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10697                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10698                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10699                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10700                 </links>
10701         </class>
10702
10703         <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">
10704                 <fields oils_persist:primary="id">
10705                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10706                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10707                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10708                 </fields>
10709                 <links>
10710                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10711                 </links>
10712         </class>
10713
10714         <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">
10715                 <fields oils_persist:primary="id">
10716                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10717                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10718                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10719                 </fields>
10720                 <links>
10721                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10722                 </links>
10723         </class>
10724
10725         <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">
10726                 <fields oils_persist:primary="id">
10727                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10728
10729                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10730                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10731                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10732
10733                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10734                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10735                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10736
10737                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10738                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10739
10740                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10741                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10742                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10743
10744                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10745                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10746
10747                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10748                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10749                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10750
10751                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10752                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10753                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10754
10755                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10756                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10757                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10758                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10759
10760                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10761                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10762
10763                 </fields>
10764                 <links>
10765                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10766                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10767                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10768                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10769                 </links>
10770         </class>
10771
10772         <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">
10773                 <oils_persist:source_definition>
10774
10775             SELECT
10776                 po.ordering_agency AS ordering_agency,
10777                 po.id AS purchase_order,
10778                 li.id AS lineitem,
10779                 lid.id AS lineitem_detail,
10780                 cpa.id AS claim_policy_action
10781             FROM
10782                 acq.lineitem_detail lid
10783                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10784                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10785                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10786                 JOIN acq.claim_policy_action cpa ON (
10787                     cpa.claim_policy = cp.id
10788
10789                     -- we only care about claim policy actions whose claim
10790                     -- interval we'd reached or exceeded
10791                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10792
10793                     -- filter out all claim policy actions where claim events
10794                     -- have occurred on or after the action's action_interval
10795                     AND NOT EXISTS (
10796                         SELECT 1
10797                         FROM
10798                             acq.claim_event evt
10799                             JOIN acq.claim claim ON (
10800                                 claim.id = evt.claim
10801                                 AND claim.lineitem_detail = lid.id
10802                             )
10803                         WHERE
10804                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10805                     )
10806                 )
10807             WHERE
10808                 lid.cancel_reason IS NULL
10809                 AND li.cancel_reason IS NULL -- belt/suspenders
10810                 AND po.cancel_reason IS NULL -- belt/suspenders
10811                 AND lid.recv_time IS NULL
10812                 AND po.state = 'on-order'
10813             ORDER BY 1, 2, 3, 4, 5
10814
10815                 </oils_persist:source_definition>
10816                 <fields>
10817                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10818                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10819                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10820                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10821                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10822                 </fields>
10823                 <links>
10824                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10825                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10826                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10827                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10828                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10829                 </links>
10830         </class>
10831         <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">
10832                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10833                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10834                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10835                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10836                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10837                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10838                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10839                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10840                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10841                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10842                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10843                 </fields>
10844                 <links>
10845                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10846                 </links>
10847     </class>
10848         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10849                 <oils_persist:source_definition>
10850             SELECT * FROM acq.lineitem_summary 
10851                                 WHERE item_count > (invoice_count + cancel_count)
10852         </oils_persist:source_definition>
10853                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10854                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10855                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10856                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10857                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10858                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10859                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10860                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10861                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10862                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10863                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10864                 </fields>
10865                 <links>
10866                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10867                 </links>
10868     </class>
10869         <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">
10870                 <oils_persist:source_definition>
10871
10872                         SELECT  t.*
10873                           FROM  action.transit_copy t
10874                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10875                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10876                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10877
10878                 </oils_persist:source_definition>
10879                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10880                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10881                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10882                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10883                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10884                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10885                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10886                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10887                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10888                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10889                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10890                 </fields>
10891                 <links>
10892                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10893                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10894                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10895                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10896                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10897                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10898                 </links>
10899         </class>
10900
10901     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10902                 <oils_persist:source_definition>
10903
10904         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10905                 SELECT
10906                         cp.id as copy,
10907                         COUNT(circ.id),
10908                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10909                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10910                 FROM
10911                         asset.copy cp
10912                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10913                 GROUP BY 1, 3, 4
10914                 UNION ALL
10915                 SELECT
10916                         cp.id as copy,
10917                         COUNT(circ.id),
10918                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10919                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10920                 FROM
10921                         asset.copy cp
10922                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10923                 GROUP BY 1, 3, 4
10924                 UNION ALL
10925                 SELECT
10926                         id as copy,
10927                         circ_count,
10928                         -1 AS year,
10929                         false as is_renewal
10930                 FROM
10931                         extend_reporter.legacy_circ_count
10932         )x GROUP BY 1, 3, 4
10933
10934                 </oils_persist:source_definition>
10935         <fields>
10936             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10937             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10938             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10939             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10940         </fields>
10941                 <links>
10942                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10943                 </links>
10944                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10945                         <actions>
10946                                 <retrieve/>
10947                         </actions>
10948                 </permacrud>
10949     </class>
10950
10951         <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">
10952                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10953                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10954                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10955                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10956                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10957                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10958                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10959                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10960                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10961                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10962                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10963                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10964                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10965                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10966                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10967                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10968                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10969                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10970                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10971                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10972                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10973                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10974                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10975                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10976                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10977                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10978                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10979                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10980                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10981                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10982                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10983                 </fields>
10984                 <links>
10985                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10986                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10987                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10988                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10989                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10990                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10991                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10992                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10993                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10994                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10995                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10996                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10997                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10998                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10999                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11000                 </links>
11001         </class>
11002
11003     <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">
11004         <fields oils_persist:primary="id">
11005             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11006             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11007             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11008             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11009             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11010             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11011             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11012             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11013             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11014             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11015             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11016             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11017             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11018             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11019             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11020             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11021             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11022             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11023             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11024             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11025             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11026             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11027             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11028             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11029             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11030             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11031             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11032             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11033             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11034             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11035             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11036             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11037             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11038             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11039         </fields>
11040         <links>
11041             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11042             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11043             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11044             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11045             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11046             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11047             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11048             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11049         </links>
11050     </class>
11051
11052     <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">
11053         <fields oils_persist:primary="id">
11054             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11055             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11056             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11057             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11058         </fields>
11059         <links>
11060             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11061             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11062         </links>
11063     </class>
11064
11065     <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">
11066         <fields oils_persist:primary="owning_lib">
11067             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11068             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11069             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11070         </fields>
11071         <links>
11072             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11073         </links>
11074     </class>
11075
11076     <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">
11077         <fields oils_persist:primary="id">
11078             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11079             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11080             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11081             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11082             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11083         </fields>
11084         <links>
11085             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11086             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11087             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11088         </links>
11089     </class>
11090
11091     <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">
11092         <fields oils_persist:primary="circ_lib">
11093             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11094             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11095             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11096             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11097         </fields>
11098         <links>
11099             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11100             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11101         </links>
11102     </class>
11103
11104     <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">
11105         <fields oils_persist:primary="id">
11106             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11107             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11108             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11109             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11110             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11111         </fields>
11112         <links>
11113             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11114             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11115             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11116         </links>
11117     </class>
11118
11119     <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">
11120         <fields oils_persist:primary="home_ou">
11121             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11122             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11123             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11124             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11125         </fields>
11126         <links>
11127             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11128             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11129         </links>
11130     </class>
11131         <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">
11132                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11133                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11134                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11135                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11136                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11137                 </fields>
11138                 <links>
11139                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11140                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11141                 </links>
11142                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11143                         <actions>
11144                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11145                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11146                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11147                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11148                         </actions>
11149                 </permacrud>
11150         </class>
11151         <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">
11152                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11153                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11154                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11155                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11156                 </fields>
11157                 <links>
11158                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11159                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11160                         </links>
11161                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11162                 <actions>
11163                                 <create permission="ADMIN_ACQ_FUND_TAG">
11164                                         <context link="tag" field="owner"/>
11165                                 </create>
11166                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11167                                         <context link="tag" field="owner"/>
11168                                 </retrieve>
11169                                 <update permission="ADMIN_ACQ_FUND_TAG">
11170                                         <context link="tag" field="owner"/>
11171                                 </update>
11172                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11173                                         <context link="tag" field="owner"/>
11174                                 </delete>
11175                         </actions>
11176                 </permacrud>
11177         </class>
11178         <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">
11179                 <oils_persist:source_definition><![CDATA[
11180                 SELECT
11181                         poi.purchase_order AS purchase_order,
11182                         ii.invoice AS invoice,
11183                         NULL AS lineitem,
11184                         poi.id AS po_item,
11185                         NULL AS picklist
11186                 FROM
11187                         acq.po_item poi
11188                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11189                 UNION SELECT
11190                         jub.purchase_order AS purchase_order,
11191                         ie.invoice AS invoice,
11192                         jub.id AS lineitem,
11193                         NULL AS po_item,
11194                         jub.picklist AS picklist
11195                 FROM
11196                         acq.lineitem jub
11197                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11198                 UNION SELECT
11199                         ii.purchase_order AS purchase_order,
11200                         ii.invoice AS invoice,
11201                         NULL AS lineitem,
11202                         NULL AS po_item,
11203                         NULL AS picklist
11204                 FROM
11205                         acq.invoice_item ii
11206                 WHERE ii.po_item IS NULL
11207                 UNION SELECT
11208                         ie.purchase_order AS purchase_order,
11209                         ie.invoice AS invoice,
11210                         NULL AS lineitem,
11211                         NULL AS po_item,
11212                         NULL AS picklist
11213                 FROM
11214                         acq.invoice_entry ie
11215                 WHERE ie.lineitem IS NULL
11216                 UNION SELECT
11217                         NULL AS purchase_order,
11218                         NULL AS invoice,
11219                         jub.id AS lineitem,
11220                         NULL AS po_item,
11221                         jub.picklist AS picklist
11222                 FROM
11223                         acq.lineitem jub
11224                 WHERE jub.purchase_order IS NULL
11225                 ]]></oils_persist:source_definition>
11226                 <fields>
11227                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11228                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11229                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11230                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11231                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11232                 </fields>
11233                 <links>
11234                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11235                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11236                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11237                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11238                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11239                 </links>
11240         </class>
11241         <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">
11242                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11243                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11244                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11245                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11246                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11247                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11248                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11249                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11250                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11251                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11252                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11253                 </fields>
11254                 <links>
11255                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11256                 </links>
11257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11258                         <actions>
11259                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11260                                 <retrieve/>
11261                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11262                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11263                         </actions>
11264                 </permacrud>
11265         </class>
11266
11267         <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">
11268                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11269                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11270                         <field name="date_applied" reporter:datatype="timestamp"/>
11271                         <field name="org" reporter:datatype="org_unit"/>
11272                         <field name="original_value" reporter:datatype="text"/>
11273                         <field name="new_value" reporter:datatype="text"/>
11274                         <field name="field_name" reporter:datatype="link"/>
11275                 </fields>
11276                 <links>
11277                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11278                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11279                 </links>
11280                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11281                         <actions>
11282                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11283                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11284                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11285                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11286                         </actions>
11287                 </permacrud>
11288         </class>
11289         <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">
11290                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11291                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11292                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11293                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11294                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11295                 </fields>
11296                 <links>
11297                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11298                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11299                 </links>
11300         </class>
11301         <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">
11302                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11303                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11304                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11305                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11306                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11307                 </fields>
11308                 <links>
11309                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11310                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11311                 </links>
11312         </class>
11313         <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">
11314                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11315                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11316                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11317                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11318                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11319                 </fields>
11320                 <links>
11321                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11322                 </links>
11323                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11324                         <actions>
11325                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11326                                 <retrieve/>
11327                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11328                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11329                         </actions>
11330                 </permacrud>
11331         </class>
11332         <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">
11333                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11334                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11335                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11336                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11337                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11338                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11339                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11340                 </fields>
11341                 <links>
11342                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11343                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11344                 </links>
11345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11346                         <actions>
11347                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11348                                 <retrieve/>
11349                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11350                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11351                         </actions>
11352                 </permacrud>
11353         </class>
11354
11355         <!-- ********************************************************************************************************************* -->
11356
11357 </IDL>
11358
11359 <!--
11360     vim:noet:ts=4:sw=4:
11361 -->