]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP1402770_column_picker_option_for_number_of_holds
[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_number" reporter:datatype="text"/>
2595                         <field name="cc_order_number" reporter:datatype="text"/>
2596                         <field name="cc_processor" reporter:datatype="text"/>
2597                         <field name="id" reporter:datatype="id" />
2598                         <field name="note" reporter:datatype="text"/>
2599                         <field name="payment_ts" reporter:datatype="timestamp"/>
2600                         <field name="xact" reporter:datatype="link"/>
2601                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2602                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2603                 </fields>
2604                 <links>
2605                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2606                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2607                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2608                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2609                 </links>
2610         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2611             <actions>
2612                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2613                     <context link="xact" jump="usr" field="home_ou"/>
2614                 </retrieve>
2615                         </actions>
2616                 </permacrud>
2617         </class>
2618         <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">
2619                 <fields oils_persist:primary="name">
2620                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2621                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2622                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2623                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2624                 </fields>
2625                 <links/>
2626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2627             <actions>
2628                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2629                 <retrieve/>
2630                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2631                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2632             </actions>
2633         </permacrud>
2634         </class>
2635
2636         <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">
2637                 <fields oils_persist:primary="alias">
2638                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2639                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2640                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2641                 </fields>
2642                 <links>
2643                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2644                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2645                 </links>
2646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2647             <actions>
2648                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2649                 <retrieve/>
2650                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2651                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2652             </actions>
2653         </permacrud>
2654         </class>
2655
2656         <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">
2657                 <fields oils_persist:primary="name">
2658                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2659                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2660                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2661                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2662                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2663                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2664                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2665                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2666                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2667                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2668                 </fields>
2669                 <links>
2670                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2671                 </links>
2672         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2673             <actions>
2674                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2675                 <retrieve/>
2676                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2677                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2678             </actions>
2679         </permacrud>
2680         </class>
2681
2682         <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">
2683                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2684                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2685                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2686                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2687                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2688                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2689                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2690                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2691                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2692                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2693                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2694                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2695                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2696                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2697                 </fields>
2698                 <links>
2699                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2700                 </links>
2701         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2702             <actions>
2703                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2704                 <retrieve/>
2705                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2706                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2707             </actions>
2708         </permacrud>
2709         </class>
2710         <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">
2711                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2712                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2713                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2714                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2715                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2716                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2717                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2718                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2719                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2720                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2721                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2722                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2723                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2724                 </fields>
2725                 <links>
2726                 </links>
2727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2728                         <actions>
2729                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2730                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2731                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2732                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2733                         </actions>
2734                 </permacrud>
2735         </class>
2736         <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">
2737                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2738                         <field name="id" reporter:datatype="id" />
2739                         <field name="name" reporter:datatype="text"/>
2740                         <field name="xpath" reporter:datatype="text"/>
2741                         <field name="format" reporter:datatype="link"/>
2742                         <field name="first_word" reporter:datatype="bool" />
2743                 </fields>
2744                 <links/>
2745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2746             <actions>
2747                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2748                 <retrieve/>
2749                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2750                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2751             </actions>
2752         </permacrud>
2753         </class>
2754         <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">
2755                 <fields oils_persist:primary="code" oils_persist:sequence="">
2756                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2757                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2758                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2759                 </fields>
2760                 <links/>
2761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2762             <actions>
2763                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2764                 <retrieve/>
2765                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2766                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2767             </actions>
2768         </permacrud>
2769         </class>
2770         <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">
2771                 <fields oils_persist:primary="code" oils_persist:sequence="">
2772                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2773                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2774                 </fields>
2775                 <links/>
2776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2777             <actions>
2778                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2779                 <retrieve/>
2780                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2781                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2782             </actions>
2783         </permacrud>
2784         </class>
2785     <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">
2786         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2787             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2788             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2789             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2790             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2791         </fields>
2792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793             <actions>
2794                 <retrieve/>
2795             </actions>
2796         </permacrud>
2797     </class>
2798         <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">
2799                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2800                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2801                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2802                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2803                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2804                 </fields>
2805                 <links>
2806                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2807                 </links>
2808         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2809             <actions>
2810                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2811                 <retrieve/>
2812                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2813                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2814             </actions>
2815         </permacrud>
2816         </class>
2817         <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">
2818                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2819                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2820                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2821                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2822                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2823                 </fields>
2824                 <links>
2825                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2826                 </links>
2827         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2828             <actions>
2829                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2830                 <retrieve/>
2831                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2832                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2833             </actions>
2834         </permacrud>
2835         </class>
2836         <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">
2837                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2838                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2839                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2840                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2841                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2842                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2843                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2844                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2845                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2846                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2847                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2848                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2849                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2850                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2851                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2852                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2853                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2854                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2855                 </fields>
2856                 <links>
2857                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2858                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2859                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2860                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2861                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2862                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2863                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2864                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2865                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2866                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2867                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2868                 </links>
2869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2870             <actions>
2871                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2872                 <retrieve/>
2873                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2874                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2875             </actions>
2876         </permacrud>
2877         </class>
2878         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2879                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2880                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2881                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2882                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2883                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2884                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2885                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2886                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2887                 </fields>
2888                 <links>
2889                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2890                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2891         </links>
2892         </class>
2893         <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">
2894                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2896                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2897                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2898                 </fields>
2899                 <links>
2900                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2901                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2902                 </links>
2903         </class>
2904         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2905                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2906                         <field name="id" reporter:datatype="id" />
2907                         <field name="value" oils_persist:i18n="true" />
2908                 </fields>
2909                 <links/>
2910         </class>
2911         <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">
2912                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2913                         <field name="balance_owed" reporter:datatype="money" />
2914                         <field name="total_owed" reporter:datatype="money" />
2915                         <field name="total_paid" reporter:datatype="money" />
2916                         <field name="usr" reporter:datatype="link"/>
2917                 </fields>
2918                 <links>
2919                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2920         </links>
2921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2922             <actions>
2923                 <retrieve permission="VIEW_USER">
2924                     <context link="usr" field="home_ou"/>
2925                 </retrieve>
2926             </actions>
2927         </permacrud>
2928         </class>
2929         <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">
2930                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2931                         <field name="collector" />
2932                         <field name="enter_time" reporter:datatype="timestamp"/>
2933                         <field name="id" reporter:datatype="id" />
2934                         <field name="location" reporter:datatype="link"/>
2935                         <field name="usr" reporter:datatype="link"/>
2936                 </fields>
2937                 <links>
2938                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2939                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2940                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2941                 </links>
2942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2943             <actions>
2944                 <create permission="money.collections_tracker.create" context_field="location"/>
2945                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2946                 <delete permission="money.collections_tracker.create" context_field="location"/>
2947             </actions>
2948         </permacrud>
2949         </class>
2950         <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">
2951                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2952                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2953                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2954                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2955                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2956                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2957                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2958                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2959                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2960                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2961                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2962                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2963                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2964                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2965                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2966                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2967                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2968                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2969                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2970                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2971                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2972                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2979                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2980                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2981                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2982                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2984                 </fields>
2985                 <links>
2986                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2987                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2988                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2989                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2990                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2991                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2992                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2993                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2994                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2995                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2996                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2997                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2998                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2999                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3000                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3001                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3002                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3003                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3004                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3005                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3006                 </links>
3007         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3008             <actions>
3009                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3010                 <retrieve/>
3011                 <update permission="UPDATE_MARC" global_required="true"/>
3012                 <!-- 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. -->
3013                 <delete permission="DELETE_RECORD" global_required="true"/>
3014             </actions>
3015         </permacrud>
3016         </class>
3017         <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">
3018                 <fields oils_persist:primary="id">
3019                         <field name="dow_0_close" />
3020                         <field name="dow_0_open" />
3021                         <field name="dow_1_close" />
3022                         <field name="dow_1_open" />
3023                         <field name="dow_2_close" />
3024                         <field name="dow_2_open" />
3025                         <field name="dow_3_close" />
3026                         <field name="dow_3_open" />
3027                         <field name="dow_4_close" />
3028                         <field name="dow_4_open" />
3029                         <field name="dow_5_close" />
3030                         <field name="dow_5_open" />
3031                         <field name="dow_6_close" />
3032                         <field name="dow_6_open" />
3033                         <field name="id" reporter:datatype="id" />
3034                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3035                 </fields>
3036                 <links>
3037                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3038                 </links>
3039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3040             <actions>
3041                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3042                 <retrieve/>
3043                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3044                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3045             </actions>
3046         </permacrud>
3047         </class>
3048         <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">
3049                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3050                         <field name="id" reporter:datatype="id" />
3051                         <field name="record" reporter:datatype="link"/>
3052                         <field name="label" reporter:datatype="text"/>
3053                         <field name="label_sortkey" reporter:datatype="text"/>
3054                         <field name="deleted" reporter:datatype="bool"/>
3055                 </fields>
3056                 <links>
3057                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3058                 </links>
3059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3060             <actions>
3061                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3062                 <retrieve/>
3063                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3064                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3065             </actions>
3066         </permacrud>
3067         </class>
3068         <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">
3069                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3070                         <field name="id" reporter:datatype="id" />
3071                         <field name="target_copy" reporter:datatype="link" />
3072                         <field name="part" reporter:datatype="link"/>
3073                 </fields>
3074                 <links>
3075                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3076                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3077                 </links>
3078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3079             <actions>
3080                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3081                 <retrieve/>
3082                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3083                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3084             </actions>
3085         </permacrud>
3086         </class>
3087         <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">
3088                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3089                         <field name="close_end" reporter:datatype="timestamp" />
3090                         <field name="close_start" reporter:datatype="timestamp" />
3091                         <field name="id" reporter:datatype="id" />
3092                         <field name="org_unit" reporter:datatype="org_unit"/>
3093                         <field name="reason" reporter:datatype="text"/>
3094                 </fields>
3095                 <links>
3096                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3097                 </links>
3098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3099             <actions>
3100                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3101                 <retrieve/>
3102                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3103                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3104             </actions>
3105         </permacrud>
3106         </class>
3107         <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">
3108                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3109                         <field name="extended" reporter:datatype="interval"/>
3110                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3111                         <field name="max_renewals" reporter:datatype="int" />
3112                         <field name="name" reporter:datatype="text"/>
3113                         <field name="normal" reporter:datatype="interval"/>
3114                         <field name="shrt" reporter:datatype="interval"/>
3115                 </fields>
3116                 <links>
3117                 </links>
3118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3119             <actions>
3120                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3121                 <retrieve/>
3122                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3123                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3124             </actions>
3125         </permacrud>
3126         </class>
3127
3128         <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">
3129                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3130                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3131                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3132             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3133                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3134             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3135                 </fields>
3136                 <links>
3137             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3138                 </links>
3139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3140             <actions>
3141                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3142                 <retrieve/>
3143                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3144                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3145             </actions>
3146                 </permacrud>
3147         </class>
3148
3149         <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">
3150                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3151                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3152                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3153                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3154             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3155                 </fields>
3156                 <links>
3157                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3158                 </links>
3159                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3160             <actions>
3161                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3162                 <retrieve/>
3163                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3164                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3165             </actions>
3166                 </permacrud>
3167         </class>
3168
3169         <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">
3170                 <fields oils_persist:primary="id" oils_persist:sequence="">
3171                         <field name="balance_owed" reporter:datatype="money"/>
3172                         <field name="id" reporter:datatype="id" />
3173                         <field name="last_billing_note" reporter:datatype="text"/>
3174                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3175                         <field name="last_billing_type" reporter:datatype="text"/>
3176                         <field name="last_payment_note" reporter:datatype="text"/>
3177                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3178                         <field name="last_payment_type" reporter:datatype="text"/>
3179                         <field name="total_owed" reporter:datatype="money"/>
3180                         <field name="total_paid" reporter:datatype="money"/>
3181                         <field name="usr" reporter:datatype="link"/>
3182                         <field name="xact_finish" reporter:datatype="timestamp" />
3183                         <field name="xact_start" reporter:datatype="timestamp" />
3184                         <field name="xact_type" reporter:datatype="text"/>
3185                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3186                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3187                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3188                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3189                         <field name="billing_location" reporter:datatype="link"/>
3190                 </fields>
3191                 <links>
3192                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3193                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3194                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3195                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3196                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3197                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3198                 </links>
3199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3200                         <actions>
3201                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3202                                         <context link="usr" field="home_ou" />
3203                                 </retrieve>
3204                         </actions>
3205                 </permacrud>
3206         </class>
3207         <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">
3208                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3209                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3210                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3211                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3212                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3213                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3219                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3220                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3221                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3222                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3223                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3224                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3225                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3226                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3227                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3228                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3229                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3230                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3231                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3232                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3233                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3234                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3235                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3236                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3237                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3238                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3239                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3240                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3241                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3242                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3243                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3244                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3245                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3246                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3247                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3248                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3249                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3250                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3251                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3252                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3253                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3254                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3255                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3256                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3257                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3258                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3259                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3260                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3261                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3262                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3263                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3264                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3265                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3266                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3267                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3268                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3269                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3272                 </fields>
3273                 <links>
3274                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3275                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3276                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3277                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3278                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3279                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3280                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3281                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3282                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3283                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3284                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3285                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3286                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3287                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3288                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3289                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3290                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3291                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3292                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3293                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3294                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3295                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3296                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3297                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3298                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3299                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3300                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3301                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3302                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3303                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3304                 </links>
3305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3306                         <actions>
3307                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3308                         </actions>
3309                 </permacrud>
3310         </class>
3311         <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">
3312                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3313                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3314                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3315                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3316                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3317                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3318                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3319                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3320                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3321         </fields>
3322                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3323                         <actions>
3324                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3325                                 <retrieve/>
3326                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3327                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3328                         </actions>
3329                 </permacrud>
3330         </class>
3331         <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">
3332                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3333                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3334                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3335                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3336                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3337         </fields>
3338         <links>
3339                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3340                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3341                 </links>
3342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3343                         <actions>
3344                                 <retrieve permission="RUN_REPORTS">
3345                                         <context link="usr" field="home_ou" />
3346                                 </retrieve>
3347                         </actions>
3348                 </permacrud>
3349         </class>
3350         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3351                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3352                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3353                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3354                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3355                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3356                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3357                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3358         </fields>
3359         <links>
3360                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3361                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3362                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3363                 </links>
3364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3365                         <actions>
3366                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3367                                         <context link="usr" field="home_ou" />
3368                                         <context link="ws" field="owning_lib" />
3369                                 </retrieve>
3370                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3371                                         <context link="usr" field="home_ou" />
3372                                         <context link="ws" field="owning_lib" />
3373                                 </create>
3374                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3375                                         <context link="usr" field="home_ou" />
3376                                         <context link="ws" field="owning_lib" />
3377                                 </update>
3378                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3379                                         <context link="usr" field="home_ou" />
3380                                         <context link="ws" field="owning_lib" />
3381                                 </delete>
3382                         </actions>
3383                 </permacrud>
3384         </class>
3385         <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">
3386                 <fields oils_persist:primary="name">
3387                         <field name="name" reporter:datatype="text"/>
3388                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3389                 </fields>
3390                 <links/>
3391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3392                         <actions>
3393                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3394                                 <retrieve/>
3395                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3396                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3397                         </actions>
3398                 </permacrud>
3399         </class>
3400         <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">
3401                 <fields oils_persist:primary="name">
3402                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3403                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3404                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3405                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3406                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3407                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3408                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3409                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3410                 </fields>
3411                 <links>
3412                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3413                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3414                 </links>
3415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3416                         <actions>
3417                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3418                                 <retrieve/>
3419                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3420                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3421                         </actions>
3422                 </permacrud>
3423         </class>
3424         <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">
3425                 <fields oils_persist:primary="name">
3426                         <field name="name" reporter:datatype="text"/>
3427                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3428                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3429                         <field name="datatype" reporter:datatype="text"/>
3430                         <field name="view_perm" reporter:datatype="link"/>
3431                         <field name="update_perm" reporter:datatype="link"/>
3432                         <field name="fm_class" reporter:datatype="text"/>
3433                         <field name="grp" reporter:datatype="link"/>
3434                 </fields>
3435                 <links>
3436                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3437                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3438                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3439                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3440                 </links>
3441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3442                         <actions>
3443                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3444                                 <retrieve/>
3445                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3446                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3447                         </actions>
3448                 </permacrud>
3449         </class>
3450         <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">
3451                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3452                         <field name="id" />
3453                         <field name="name"  reporter:datatype="text"/>
3454                         <field name="org_unit" reporter:datatype="org_unit"/>
3455                         <field name="value"  reporter:datatype="text"/>
3456                 </fields>
3457                 <links>
3458                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3459                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3460                 </links>
3461         </class>
3462         <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">
3463                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3464                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3465                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3466                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3467                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3468                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3469                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3470                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3471                 </fields>
3472                 <links>
3473                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3474                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3475                 </links>
3476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3477             <actions>
3478                 <create permission="CREATE_COPY_NOTE">
3479                     <context link="owning_copy" field="circ_lib"/>
3480                 </create>
3481                 <retrieve permission="VIEW_COPY_NOTES">
3482                     <context link="owning_copy" field="circ_lib"/>
3483                 </retrieve>
3484                 <update permission="UPDATE_COPY_NOTE">
3485                     <context link="owning_copy" field="circ_lib"/>
3486                 </update>
3487                 <delete permission="DELETE_COPY_NOTE">
3488                     <context link="owning_copy" field="circ_lib"/>
3489                 </delete>
3490             </actions>
3491         </permacrud>
3492         </class>
3493         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3494                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3495                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3496                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3497                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3498                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3499                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3500                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3501                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3502                 </fields>
3503                 <links>
3504                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3505                 </links>
3506         </class>
3507         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3508                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3509                         <field name="fingerprint"  reporter:datatype="text"/>
3510                         <field name="id" reporter:datatype="id" />
3511                         <field name="master_record" reporter:datatype="link"/>
3512                         <field name="mods"  reporter:datatype="text"/>
3513                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3514                 </fields>
3515                 <links>
3516                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3517                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3518                 </links>
3519         </class>
3520         <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">
3521                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3522                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3523                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3524                 </fields>
3525                 <links/>
3526         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3527             <actions>
3528                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3529                 <retrieve/>
3530                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3531                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3532             </actions>
3533         </permacrud>
3534         </class>
3535         <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">
3536                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3537                         <field name="code"  reporter:datatype="text"/>
3538                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3539                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3540                 </fields>
3541                 <links/>
3542         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3543             <actions>
3544                 <create permission="CREATE_PERM" global_required="true"/>
3545                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3546                 <update permission="UPDATE_PERM" global_required="true"/>
3547                 <delete permission="DELETE_PERM" global_required="true"/>
3548             </actions>
3549         </permacrud>
3550         </class>
3551         <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">
3552                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3553                         <field name="id" reporter:datatype="id" />
3554                         <field name="metarecord" reporter:datatype="link"/>
3555                         <field name="source" reporter:datatype="link"/>
3556                 </fields>
3557                 <links>
3558                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3559                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3560                 </links>
3561         </class>
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3564                         <field name="id" reporter:datatype="id" />
3565                         <field name="field" reporter:datatype="link"/>
3566                         <field name="source" reporter:datatype="link"/>
3567                         <field name="value"  reporter:datatype="text"/>
3568                 </fields>
3569                 <links>
3570                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3571                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3572                 </links>
3573         </class>
3574         <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">
3575                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3576                         <field name="id" reporter:datatype="id" />
3577                         <field name="value" reporter:datatype="text"/>
3578                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3579                 </fields>
3580                 <links>
3581                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3582                 </links>
3583         </class>
3584         <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">
3585                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3586                         <field name="id" reporter:datatype="id" />
3587                         <field name="entry" reporter:datatype="link"/>
3588                         <field name="def" reporter:datatype="link"/>
3589                         <field name="source" reporter:datatype="link"/>
3590                 </fields>
3591                 <links>
3592                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3593                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3594                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3595                 </links>
3596         </class>
3597         <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">
3598                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3599                         <field name="id" reporter:datatype="id" />
3600                         <field name="entry" reporter:datatype="link"/>
3601                         <field name="simple_heading" reporter:datatype="link"/>
3602                 </fields>
3603                 <links>
3604                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3605                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3606                 </links>
3607         </class>
3608         <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">
3609                 <oils_persist:source_definition>
3610                         SELECT * FROM metabib.author_field_entry
3611                                                 UNION ALL
3612                         SELECT * FROM metabib.keyword_field_entry
3613                                                 UNION ALL
3614                         SELECT * FROM metabib.identifier_field_entry
3615                                                 UNION ALL
3616                         SELECT * FROM metabib.title_field_entry
3617                                                 UNION ALL
3618                         SELECT * FROM metabib.subject_field_entry
3619                                                 UNION ALL
3620                         SELECT * FROM metabib.series_field_entry
3621                 </oils_persist:source_definition>
3622                 <fields>
3623                         <field name="field" reporter:datatype="link"/>
3624                         <field name="id" reporter:datatype="id" />
3625                         <field name="source" reporter:datatype="link"/>
3626                         <field name="value"  reporter:datatype="text"/>
3627                 </fields>
3628                 <links>
3629                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3630                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3631                 </links>
3632         </class>
3633         <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">
3634                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3635                         <field name="field" reporter:datatype="link"/>
3636                         <field name="id" reporter:datatype="id" />
3637                         <field name="source" reporter:datatype="link"/>
3638                         <field name="value"  reporter:datatype="text"/>
3639                 </fields>
3640                 <links>
3641                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3642                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3643                 </links>
3644         </class>
3645         <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">
3646                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3647                         <field name="accepting_usr" reporter:datatype="link"/>
3648                         <field name="amount" reporter:datatype="money" />
3649                         <field name="amount_collected" reporter:datatype="money" />
3650                         <field name="cash_drawer" reporter:datatype="link"/>
3651                         <field name="id" reporter:datatype="id" />
3652                         <field name="note"  reporter:datatype="text"/>
3653                         <field name="payment_ts" reporter:datatype="timestamp"/>
3654                         <field name="xact" reporter:datatype="link"/>
3655                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3656                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3657                 </fields>
3658                 <links>
3659                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3660                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3661                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3662                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3663                 </links>
3664         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3665             <actions>
3666                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3667                     <context link="xact" jump="usr" field="home_ou"/>
3668                 </retrieve>
3669                         </actions>
3670                 </permacrud>
3671         </class>
3672         <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">
3673                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3674                         <field name="accepting_usr" reporter:datatype="link"/>
3675                         <field name="amount" reporter:datatype="money" />
3676                         <field name="amount_collected" reporter:datatype="money" />
3677                         <field name="id" reporter:datatype="id" />
3678                         <field name="note"  reporter:datatype="text"/>
3679                         <field name="payment_ts" reporter:datatype="timestamp"/>
3680                         <field name="xact" reporter:datatype="link"/>
3681                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3682                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3683                 </fields>
3684                 <links>
3685                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3686                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3687                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3688                 </links>
3689         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3690             <actions>
3691                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3692                     <context link="xact" jump="usr" field="home_ou"/>
3693                 </retrieve>
3694                         </actions>
3695                 </permacrud>
3696         </class>
3697         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3698                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3699                         <field name="accepting_usr" reporter:datatype="link"/>
3700                         <field name="amount" reporter:datatype="money" />
3701                         <field name="amount_collected" reporter:datatype="money" />
3702                         <field name="id" reporter:datatype="id" />
3703                         <field name="note"  reporter:datatype="text"/>
3704                         <field name="payment_ts" reporter:datatype="timestamp"/>
3705                         <field name="xact" reporter:datatype="link"/>
3706                         <field name="billing" reporter:datatype="link"/>
3707                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3708                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3709                 </fields>
3710                 <links>
3711                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3712                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3713                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3714                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3715                 </links>
3716         </class>
3717         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3718                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3719                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3720                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3721                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3722                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3723                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3724                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3725                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3726                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3727                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3728                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3729                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3730                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3731                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3732                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3733                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3734                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3735                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3736                 </fields>
3737                 <links>
3738                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3739                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3740                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3741                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3742                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3743                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3744                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3745                 </links>
3746         </class>
3747
3748         <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">
3749                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3750                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3751                         <field name="name"  reporter:datatype="text"/>
3752                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3753                         <field name="block_list" reporter:datatype="text"/>
3754                         <field name="staff_alert" reporter:datatype="bool"/>
3755                         <field name="org_depth" reporter:datatype="int"/>
3756                         <field name="ignore_proximity" reporter:datatype="int"/>
3757                 </fields>
3758                 <links/>
3759         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3760             <actions>
3761                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3762                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3763                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3764                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3765             </actions>
3766         </permacrud>
3767         </class>
3768         <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">
3769                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3770                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3771                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3772                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3773                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3774                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3775                 </fields>
3776                 <links>
3777                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3778                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3779                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3780         </links>
3781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3782             <actions>
3783                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3784                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3785                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3786                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3787             </actions>
3788         </permacrud>
3789         </class>
3790         <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">
3791                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3792                         <field name="holdable" reporter:datatype="bool"/>
3793                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3794                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3795                         <field name="opac_visible" reporter:datatype="bool"/>
3796             <field name="copy_active" reporter:datatype="bool"/>
3797             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3798                 </fields>
3799                 <links/>
3800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3801             <actions>
3802                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3803                 <retrieve/>
3804                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3805                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3806             </actions>
3807         </permacrud>
3808         </class>
3809         <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">
3810                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3811                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3812                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3813                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3814                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3815                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3816                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3817                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3818                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3819                 </fields>
3820                 <links>
3821                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3822                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3823                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3824                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3825                 </links>
3826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3827                         <actions>
3828                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3829                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3830                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3831                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3832                         </actions>
3833                 </permacrud>
3834         </class>
3835         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3836                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3837                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3838                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3839                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3840                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3841                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3842                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3843                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3844                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3845                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3846                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3847                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3848                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3849                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3850                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3851                 </fields>
3852                 <links>
3853                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3854                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3855                 </links>
3856         </class>
3857         <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">
3858                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3859                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3860                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3861                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3862                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3863                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3864                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3865                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3866                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3867                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3868                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3869                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3870                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3871                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3872                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3873                 </fields>
3874                 <links>
3875                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3876                 </links>
3877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3878                         <actions>
3879                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3880                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3881                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3882                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3883                         </actions>
3884                 </permacrud>
3885         </class>
3886
3887
3888         <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">
3889                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3890                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3891                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3892                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3893                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3894                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3895                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3896                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3897                 </fields>
3898                 <links>
3899                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3900                 </links>
3901         </class>
3902
3903         <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">
3904                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3905                         <field name="call_number" />
3906                         <field name="create_date" reporter:datatype="timestamp"/>
3907                         <field name="creator" reporter:datatype="link"/>
3908                         <field name="id" reporter:datatype="id" />
3909                         <field name="pub" reporter:datatype="bool"/>
3910                         <field name="title"  reporter:datatype="text"/>
3911                         <field name="value"  reporter:datatype="text"/>
3912                 </fields>
3913                 <links>
3914                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3915                 </links>
3916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3917             <actions>
3918                 <create permission="CREATE_VOLUME_NOTE">
3919                     <context link="call_number" field="owning_lib"/>
3920                 </create>
3921                 <retrieve permission="VIEW_VOLUME_NOTES">
3922                     <context link="call_number" field="owning_lib"/>
3923                 </retrieve>
3924                 <update permission="UPDATE_VOLUME_NOTE">
3925                     <context link="call_number" field="owning_lib"/>
3926                 </update>
3927                 <delete permission="DELETE_VOLUME_NOTE">
3928                     <context link="call_number" field="owning_lib"/>
3929                 </delete>
3930             </actions>
3931         </permacrud>
3932         </class>
3933         <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">
3934                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3935                         <field name="create_date" reporter:datatype="timestamp"/>
3936                         <field name="creator" reporter:datatype="link"/>
3937                         <field name="edit_date" reporter:datatype="timestamp"/>
3938                         <field name="editor" reporter:datatype="link"/>
3939                         <field name="id" reporter:datatype="id" />
3940                         <field name="record" reporter:datatype="link"/>
3941                         <field name="value" reporter:datatype="text"/>
3942                 </fields>
3943                 <links>
3944                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3945                 </links>
3946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3947             <actions>
3948                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3949                 <retrieve/>
3950                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3951                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3952             </actions>
3953         </permacrud>
3954         </class>
3955         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3956         <oils_persist:source_definition>
3957 SELECT  usr,
3958         SUM(
3959             CASE
3960                 WHEN (
3961                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3962                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3963                 ) THEN 1
3964                 ELSE 0
3965             END
3966         ) AS out,
3967
3968         SUM(
3969             CASE
3970                 WHEN (
3971                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3972                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3973                 ) THEN 1
3974                 ELSE 0
3975             END
3976         ) AS overdue,
3977
3978         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3979         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3980         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3981   FROM  action.circulation
3982   WHERE checkin_time IS NULL
3983   GROUP BY 1
3984         </oils_persist:source_definition>
3985         <fields oils_persist:primary="usr">
3986             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3987             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3988             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3989             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3990             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3991             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3992         </fields>
3993         <links>
3994             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3995         </links>
3996         </class>
3997         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3998         <oils_persist:source_definition>
3999 SELECT  usr,
4000         STRING_AGG(
4001             CASE
4002                 WHEN (
4003                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4004                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4005                 ) THEN id::TEXT
4006                 ELSE '0'
4007             END
4008         ,',') AS out,
4009
4010         STRING_AGG(
4011             CASE
4012                 WHEN (
4013                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4014                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4015                 ) THEN id::TEXT
4016                 ELSE '0'
4017             END
4018         ,',') AS overdue,
4019
4020         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4021         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4022         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4023   FROM  action.circulation
4024   WHERE checkin_time IS NULL
4025   GROUP BY 1
4026         </oils_persist:source_definition>
4027         <fields oils_persist:primary="usr">
4028             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4029             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4030             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4031             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4032             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4033             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4034         </fields>
4035         <links>
4036             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4037         </links>
4038         </class>
4039         <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">
4040                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4041                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4042                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4043                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4044                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4045                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4046                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4047                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4048                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4049                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4050                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4051                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4052                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4053                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4054                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4055                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4056                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4057                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4058                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4059                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4060                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4061                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4062                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4063                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4064                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4065                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4066                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4067                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4068                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4069                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4070                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4071                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4072                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4073                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4075                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4076                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4077                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4078                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4079                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4080                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4081                 </fields>
4082                 <links>
4083                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4084                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4085                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4086                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4087                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4088                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4089                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4090                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4091                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4092                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4093                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4094                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4095                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4096                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4097                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4098                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4099                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4100                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4101                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4102                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4103                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4104                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4105                 </links>
4106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4107                         <actions>
4108                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4109                         </actions>
4110                 </permacrud>
4111         </class>
4112         <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">
4113                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4114                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4115                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4116                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4117                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4118                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4119                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4120                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4121                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4122                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4123                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4124                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4125                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4126                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4127                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4128                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4129                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4130                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4131                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4132                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4133                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4134                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4135                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4136                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4137                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4138                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4139                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4140                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4141                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4142                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4143                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4144                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4145                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4146                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4147                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4148                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4149                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4150                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4151                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4152                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4153                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4154                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4155                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4156                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4157                 </fields>
4158                 <links>
4159                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4160                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4161                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4162                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4163                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4164                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4165                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4166                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4167                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4168                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4169                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4170                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4171                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4172                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4173                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4174                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4175                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4176                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4177                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4178                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4179                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4180                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4181                 </links>
4182         </class>
4183         <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">
4184                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4185                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4186                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4187                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4188                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4189                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4190                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4191                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4192                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4193                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4194                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4195                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4196                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4197                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4198                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4199                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4200                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4201                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4202                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4203                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4204                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4205                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4206                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4207                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4208                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4209                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4210                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4211                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4212                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4213                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4214                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4215                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4216                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4217                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4218                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4219                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4220                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4221                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4222                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4223                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4224                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4225                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4226                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4227                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4228                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4229                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4230                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4231                 </fields>
4232                 <links>
4233                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4234                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4235                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4236                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4237                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4238                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4239                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4240                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4241                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4242                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4243                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4244                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4245                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4246                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4247                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4248                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4249                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4250                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4251                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4252                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4253                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4254                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4255                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4256                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4257                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4258                 </links>
4259         </class>
4260
4261         <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">
4262                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4263                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4264                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4265                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4266                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4267                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4268                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4269                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4270                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4271                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4272                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4273                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4274                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4275                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4276                 </fields>
4277                 <links>
4278                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4279                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4280                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4281                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4282                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4283                 </links>
4284                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4285                         <actions>
4286                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4287                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4288                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4289                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4290                         </actions>
4291                 </permacrud>
4292         </class>
4293
4294         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4295                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4296                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4297                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4298                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4299                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4300                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4301                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4302                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4303                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4304                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4305                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4306                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4307                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4308                 </fields>
4309                 <links>
4310                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4311                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4312                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4313                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4314                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4315                 </links>
4316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4317                         <actions>
4318                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4319                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4320                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4321                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4322                         </actions>
4323                 </permacrud>
4324         </class>
4325         
4326         <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">
4327                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4328                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4329                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4330                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4331                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4332                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4333                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4334                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4335                 </fields>
4336                 <links>
4337                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4338                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4339                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4340                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4341                 </links>
4342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4343                         <actions>
4344                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4345                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4346                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4347                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4348                         </actions>
4349                 </permacrud>
4350         </class>
4351         
4352         <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">
4353                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4354                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4355                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4356                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4357                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4358                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4359                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4360                 </fields>
4361                 <links>
4362                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4363                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4364                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4365                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4366                 </links>
4367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4368                         <actions>
4369                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4370                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4371                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4372                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4373                         </actions>
4374                 </permacrud>
4375         </class>
4376         
4377         <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">
4378                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4379                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4380                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4381                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4382                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4383                 </fields>
4384                 <links>
4385                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4386                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4387                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4388                 </links>
4389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4390                         <actions>
4391                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4392                     <context link="resource" field="owner" />
4393                 </create>
4394                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4395                     <context link="resource" field="owner" />
4396                 </retrieve>
4397                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4398                     <context link="resource" field="owner" />
4399                 </update>
4400                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4401                     <context link="resource" field="owner" />
4402                 </delete>
4403                         </actions>
4404                 </permacrud>
4405         </class>
4406         
4407         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4408                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4409                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4410                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4411                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4412                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4413                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4414                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4415                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4416                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4417                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4418                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4419                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4420                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4421                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4422                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4423                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4424                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4425                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4426                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4427                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4428                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4429                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4430                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4431                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4432                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4433                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4434                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4435                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4436                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4437                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4438                 </fields>
4439                 <links>
4440                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4441                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4442                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4443                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4444                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4445                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4446                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4447                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4448                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4449                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4450                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4451                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4452                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4453                 </links>
4454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4455                         <actions>
4456                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4457                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4458                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4459                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4460                         </actions>
4461                 </permacrud>
4462         </class>
4463         
4464         <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">
4465                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4466                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4467                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4468                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4469                 </fields>
4470                 <links>
4471                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4472                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4473                 </links>
4474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4475                         <actions>
4476                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4477                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4478                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4479                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4480                         </actions>
4481                 </permacrud>
4482         </class>
4483
4484         <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">
4485                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4486                         <field name="bucket" reporter:datatype="link"/>
4487                         <field name="id" reporter:datatype="id" />
4488                         <field name="target_call_number" reporter:datatype="link" />
4489                         <field name="create_time" reporter:datatype="timestamp" />
4490                         <field name="pos" reporter:datatype="int" />
4491                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4492                 </fields>
4493                 <links>
4494                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4495                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4496             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4497                 </links>
4498         </class>
4499         <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">
4500                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4501                         <field name="id" reporter:datatype="id" />
4502                         <field name="item" reporter:datatype="link"/>
4503                         <field name="note" reporter:datatype="text" />
4504                 </fields>
4505                 <links>
4506                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4507                 </links>
4508         </class>
4509         <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">
4510                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4511                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4512                         <field name="btype" reporter:datatype="text"/>
4513                         <field name="id" reporter:datatype="id" />
4514                         <field name="name" reporter:datatype="text"/>
4515                         <field name="description" reporter:datatype="text"/>
4516                         <field name="owner" reporter:datatype="link"/>
4517                         <field name="pub" reporter:datatype="bool"/>
4518                         <field name="create_time" reporter:datatype="timestamp" />
4519                 </fields>
4520                 <links>
4521                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4522                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4523                 </links>
4524         </class>
4525         <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">
4526                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4527                         <field name="id" reporter:datatype="id" />
4528                         <field name="bucket" reporter:datatype="link"/>
4529                         <field name="note" reporter:datatype="text" />
4530                 </fields>
4531                 <links>
4532                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4533                 </links>
4534         </class>
4535         <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">
4536                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4537                         <field name="hold" reporter:datatype="link"/>
4538                         <field name="id" reporter:datatype="id" />
4539                         <field name="target_copy" reporter:datatype="link"/>
4540                         <field name="proximity" reporter:datatype="number"/>
4541                 </fields>
4542                 <links>
4543                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4544                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4545                 </links>
4546         </class>
4547         <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">
4548                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4549                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4550                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4551                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4552                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4553                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4554                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4555                 </fields>
4556                 <links>
4557                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4558                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4559                 </links>
4560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4561             <actions>
4562                 <create permission="CREATE_HOLD_NOTIFICATION">
4563                                         <context link="hold" jump="usr" field="home_ou" />
4564                                 </create>
4565                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4566                                         <context link="hold" jump="usr" field="home_ou" />
4567                                 </retrieve>
4568                 <update permission="CREATE_HOLD_NOTIFICATION">
4569                                         <context link="hold" jump="usr" field="home_ou" />
4570                                 </update>
4571                 <delete permission="CREATE_HOLD_NOTIFICATION">
4572                                         <context link="hold" jump="usr" field="home_ou" />
4573                                 </delete>
4574             </actions>
4575         </permacrud>
4576         </class>
4577         <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">
4578                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4579                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4580                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4581                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4582                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4583                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4584                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4585                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4586                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4587                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4588                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4589                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4590                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4591                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4592                 </fields>
4593                 <links>
4594                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4595                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4596                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4597                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4598                 </links>
4599         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4600             <actions>
4601                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4602                 <retrieve/>
4603                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4604                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4605             </actions>
4606         </permacrud>
4607         </class>
4608         <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">
4609                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4610                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4611                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4612                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4613                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4614             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4615             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4616             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4617                 </fields>
4618                 <links>
4619                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4620                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4621                 </links>
4622         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4623             <actions>
4624                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4625                 <retrieve/>
4626                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4627                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4628             </actions>
4629         </permacrud>
4630         </class>
4631         <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">
4632                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4633                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4634             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4635             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4636                 </fields>
4637                 <links>
4638                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4639                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4640                 </links>
4641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4642             <actions>
4643                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4644                                         <context link="lgroup" field="owner" />
4645                 </create>
4646                 <retrieve/>
4647                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4648                                         <context link="lgroup" field="owner" />
4649                 </update>
4650                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4651                                         <context link="lgroup" field="owner" />
4652                 </delete>
4653             </actions>
4654         </permacrud>
4655         </class>
4656
4657     <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">
4658         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4659             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4660             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4661             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4662             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4663         </fields>
4664         <links>
4665             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4666             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4667         </links>
4668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4669             <actions>
4670                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4671                 <retrieve/>
4672                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4673                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4674             </actions>
4675         </permacrud>
4676     </class>
4677
4678         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4679                 <fields>
4680                         <field name="sre_id" oils_persist:virtual="true" />
4681                         <field name="location" oils_persist:virtual="true" />
4682                         <field name="owning_lib" oils_persist:virtual="true" />
4683                         <field name="basic_holdings" oils_persist:virtual="true" />
4684                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4685                         <field name="supplement_holdings" oils_persist:virtual="true" />
4686                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4687                         <field name="index_holdings" oils_persist:virtual="true" />
4688                         <field name="index_holdings_add" oils_persist:virtual="true" />
4689                         <field name="online" oils_persist:virtual="true" />
4690                         <field name="missing" oils_persist:virtual="true" />
4691                         <field name="incomplete" oils_persist:virtual="true" />
4692                 </fields>
4693         </class>
4694
4695         <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">
4696                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4697                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4698                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4699                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4700                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4701                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4702                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4703                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4704                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4705                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4706                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4707                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4708                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4709                 </fields>
4710                 <links>
4711                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4712                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4713                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4714                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4715                 </links>
4716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4717                         <actions>
4718                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4719                                 <retrieve/>
4720                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4721                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4722                         </actions>
4723                 </permacrud>
4724         </class>
4725
4726         <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">
4727                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4728                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4729                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4730                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4731                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4732                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4733                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4734                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4735                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4736                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4737                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4738                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4739                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4740                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4741                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4742                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4743                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4744                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4745                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4746                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4747                 </fields>
4748                 <links>
4749                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4750                 </links>
4751                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4752                         <actions>
4753                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4754                                         <context link="subscription" field="owning_lib" />
4755                                 </create>
4756                                 <retrieve />
4757                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4758                                         <context link="subscription" field="owning_lib" />
4759                                 </update>
4760                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4761                                         <context link="subscription" field="owning_lib" />
4762                                 </delete>
4763                         </actions>
4764                 </permacrud>
4765         </class>
4766
4767         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4768                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4769                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4770                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4771                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4772                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4773                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4774                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4775                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4776                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4777                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4778                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4779                 </fields>
4780                 <links>
4781                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4782                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4783                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4784                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4785                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4786                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4787                 </links>
4788                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4789                         <actions>
4790                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4791                                 <retrieve />
4792                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4793                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4794                         </actions>
4795                 </permacrud>
4796         </class>
4797
4798         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4799                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4800                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4801                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4802                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4803                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4804                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4805                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4806                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4807                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4808                 </fields>
4809                 <links>
4810                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4811                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4812                 </links>
4813         </class>
4814
4815         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4816                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4817                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4818                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4819                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4820                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4821                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4822                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4823                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4824                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4825                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4826                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4827                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4828                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4829                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4830                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4831                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4832                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4833                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4834                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4835                 </fields>
4836                 <links>
4837                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4838                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4839                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4840                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4841                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4842                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4843                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4844                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4845                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4846                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4847                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4848                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4849                 </links>
4850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4851                         <actions>
4852                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4853                                 <retrieve />
4854                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4855                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4856                         </actions>
4857                 </permacrud>
4858         </class>
4859
4860         <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">
4861                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4862                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4863                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4864                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4865                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4866                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4867                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4868                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4869                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4870                 </fields>
4871                 <links>
4872                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4873                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4874                 </links>
4875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4876                         <actions>
4877                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4878                                         <context link="distribution" field="holding_lib" />
4879                                 </create>
4880                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4881                                         <context link="distribution" field="holding_lib" />
4882                                 </retrieve>
4883                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4884                                         <context link="distribution" field="holding_lib" />
4885                                 </update>
4886                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4887                                         <context link="distribution" field="holding_lib" />
4888                                 </delete>
4889                         </actions>
4890                 </permacrud>
4891         </class>
4892
4893         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4894                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4896                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4897                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4898                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4899                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4900                 </fields>
4901                 <links>
4902                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4903                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4904                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4905                 </links>
4906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4907                         <actions>
4908                                 <create permission="ADMIN_SERIAL_STREAM">
4909                                         <context link="distribution" field="holding_lib" />
4910                                 </create>
4911                                 <retrieve />
4912                                 <update permission="ADMIN_SERIAL_STREAM">
4913                                         <context link="distribution" field="holding_lib" />
4914                                 </update>
4915                                 <delete permission="ADMIN_SERIAL_STREAM">
4916                                         <context link="distribution" field="holding_lib" />
4917                                 </delete>
4918                         </actions>
4919                 </permacrud>
4920         </class>
4921
4922         <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">
4923                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4924                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4925                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4926                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4927                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4928                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4929                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4930                 </fields>
4931                 <links>
4932                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4933                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4934                 </links>
4935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4936                         <actions>
4937                                 <create permission="ADMIN_SERIAL_STREAM">
4938                                         <context link="stream" jump="distribution" field="holding_lib" />
4939                                 </create>
4940                                 <retrieve permission="RECEIVE_SERIAL">
4941                                         <context link="stream" jump="distribution" field="holding_lib" />
4942                                 </retrieve>
4943                                 <update permission="ADMIN_SERIAL_STREAM">
4944                                         <context link="stream" jump="distribution" field="holding_lib" />
4945                                 </update>
4946                                 <delete permission="ADMIN_SERIAL_STREAM">
4947                                         <context link="stream" jump="distribution" field="holding_lib" />
4948                                 </delete>
4949                         </actions>
4950                 </permacrud>
4951         </class>
4952
4953         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4954                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4955                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4956                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4957                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4958                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4959                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4960                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4961                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4962                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4963                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4964                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4965                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4966                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4967                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4968                 </fields>
4969                 <links>
4970                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4971                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4972                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4973                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4974                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4975                 </links>
4976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4977                         <actions>
4978                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4979                                         <context link="subscription" field="owning_lib" />
4980                                 </create>
4981                                 <retrieve/>
4982                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4983                                         <context link="subscription" field="owning_lib" />
4984                                 </update>
4985                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4986                                         <context link="subscription" field="owning_lib" />
4987                                 </delete>
4988                         </actions>
4989                 </permacrud>
4990         </class>
4991
4992         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4993                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4994                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4995                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4996                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4997                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4998                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4999                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5000                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5001                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5002                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5003                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5004                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5005                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5006                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5007                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5008                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5009                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5010                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5011                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5012                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5013                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5014                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5015                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5016                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5017                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5018                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5019                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5020                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5021                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5022                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5023                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5024                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5025                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5026                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5027                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5028                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5029                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5030                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5031                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5032                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5033                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5034                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5035                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5036                 </fields>
5037                 <links>
5038                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5039                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5040                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5041                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5042                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5043                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5044                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5045                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5046                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5047                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5048                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5049                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5050                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5051                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5052                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5053                 </links>
5054                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5055                         <actions>
5056                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5057                                 <retrieve/>
5058                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5059                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5060                         </actions>
5061                 </permacrud>
5062         </class>
5063
5064         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5065                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5066                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5067                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5068                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5069                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5070                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5071                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5072                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5073                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5074                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5075                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5076                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5077                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5078                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5079                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5080                 </fields>
5081                 <links>
5082                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5083                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5084                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5085                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5086                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5087                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5088                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5089                 </links>
5090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5091                         <actions>
5092                                 <create permission="ADMIN_SERIAL_ITEM">
5093                                         <context link="stream" jump="distribution" field="holding_lib" />
5094                                 </create>
5095                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5096                                         <context link="stream" jump="distribution" field="holding_lib" />
5097                                 </retrieve>
5098                                 <update permission="ADMIN_SERIAL_ITEM">
5099                                         <context link="stream" jump="distribution" field="holding_lib" />
5100                                 </update>
5101                                 <delete permission="ADMIN_SERIAL_ITEM">
5102                                         <context link="stream" jump="distribution" field="holding_lib" />
5103                                 </delete>
5104                         </actions>
5105                 </permacrud>
5106         </class>
5107
5108         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5109                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5110                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5111                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5112                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5113                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5114                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5115                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5116                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5117                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5118                 </fields>
5119                 <links>
5120                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5121                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5122                 </links>
5123                 <!-- Not available via PCRUD at this time -->
5124         </class>
5125         <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">
5126                 <fields>
5127                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5128                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5129                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5130                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5131                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5132                 </fields>
5133                 <links>
5134                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5135                 </links>
5136         </class>
5137         <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">
5138                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5139                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5140                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5141                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5142                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5143                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5144                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5145                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5146                 </fields>
5147                 <links>
5148                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5149                 </links>
5150         </class>
5151         <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">
5152                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5153                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5154                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5155                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5156                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5157                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5158                 </fields>
5159                 <links>
5160                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5161                 </links>
5162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5163                         <actions>
5164                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5165                                         <context link="distribution" field="holding_lib" />
5166                                 </create>
5167                                 <retrieve/>
5168                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5169                                         <context link="distribution" field="holding_lib" />
5170                                 </update>
5171                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5172                                         <context link="distribution" field="holding_lib" />
5173                                 </delete>
5174                         </actions>
5175                 </permacrud>
5176         </class>
5177
5178         <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">
5179                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5180                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5181                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5182                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5183                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5184                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5185                 </fields>
5186                 <links>
5187                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5188                 </links>
5189                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5190                         <actions>
5191                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5192                                         <context link="distribution" field="holding_lib" />
5193                                 </create>
5194                                 <retrieve/>
5195                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5196                                         <context link="distribution" field="holding_lib" />
5197                                 </update>
5198                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5199                                         <context link="distribution" field="holding_lib" />
5200                                 </delete>
5201                         </actions>
5202                 </permacrud>
5203         </class>
5204
5205         <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">
5206                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5207                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5208                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5209                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5210                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5211                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5212                 </fields>
5213                 <links>
5214                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5215                 </links>
5216                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5217                         <actions>
5218                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5219                                         <context link="distribution" field="holding_lib" />
5220                                 </create>
5221                                 <retrieve/>
5222                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5223                                         <context link="distribution" field="holding_lib" />
5224                                 </update>
5225                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5226                                         <context link="distribution" field="holding_lib" />
5227                                 </delete>
5228                         </actions>
5229                 </permacrud>
5230         </class>
5231
5232         <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">
5233                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5234                         <field name="id" reporter:datatype="id" />
5235                         <field name="owning_copy" reporter:datatype="link"/>
5236                         <field name="stat_cat" reporter:datatype="link"/>
5237                         <field name="stat_cat_entry" reporter:datatype="link"/>
5238                 </fields>
5239                 <links>
5240                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5241                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5242                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5243                 </links>
5244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5245                         <actions>
5246                                 <retrieve/>
5247                         </actions>
5248                 </permacrud>
5249         </class>
5250         <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">
5251                 <fields oils_persist:primary="code">
5252                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5253                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5254                 </fields>
5255                 <links/>
5256         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5257             <actions>
5258                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5259                 <retrieve/>
5260                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5261                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5262             </actions>
5263         </permacrud>
5264         </class>
5265         <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">
5266                 <fields oils_persist:primary="code">
5267                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5268                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5269                 </fields>
5270                 <links/>
5271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5272             <actions>
5273                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5274                 <retrieve/>
5275                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5276                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5277             </actions>
5278         </permacrud>
5279         </class>
5280         <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">
5281                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5282                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5283                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5284                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5285                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5286                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5287                 </fields>
5288                 <links>
5289             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5290         </links>
5291         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5292             <actions>
5293                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5294                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5295                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5296                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5297             </actions>
5298         </permacrud>
5299         </class>
5300         <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">
5301                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5302                         <field name="id" reporter:datatype="id" />
5303                         <field name="name" reporter:datatype="text"/>
5304                 </fields>
5305                 <links/>
5306         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5307             <actions>
5308                 <create permission="CREATE_LASSO" global_required="true"/>
5309                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5310                 <update permission="UPDATE_LASSO" global_required="true"/>
5311                 <delete permission="DELETE_LASSO" global_required="true"/>
5312             </actions>
5313         </permacrud>
5314         </class>
5315         <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">
5316                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5317                         <field name="id" reporter:datatype="id" />
5318                         <field name="lasso" reporter:datatype="link"/>
5319                         <field name="org_unit" reporter:datatype="org_unit"/>
5320                 </fields>
5321                 <links>
5322                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5323                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5324                 </links>
5325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5326             <actions>
5327                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5328                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5329                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5330                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5331             </actions>
5332         </permacrud>
5333         </class>
5334         <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">
5335                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5336                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5337                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5338                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5339                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5340                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5341                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5342                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5343                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5344                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5345                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5346                 </fields>
5347                 <links>
5348                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5349                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5350                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5351                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5352                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5353                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5354                 </links>
5355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5356             <actions>
5357                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5358                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5359                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5360                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5361             </actions>
5362         </permacrud>
5363         </class>
5364         <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">
5365                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5366                         <field name="id" reporter:datatype="id" />
5367                         <field name="from_org" reporter:datatype="org_unit"/>
5368                         <field name="to_org" reporter:datatype="org_unit"/>
5369                         <field name="prox" reporter:datatype="int" />
5370                 </fields>
5371                 <links>
5372                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5373                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5374                 </links>
5375         </class>
5376         <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">
5377                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5378                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5379                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5380                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5381                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5382                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5383                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5384                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5385                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5386                 </fields>
5387                 <links/>
5388         </class>
5389         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5390                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5391                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5392                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5393                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5394                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5395                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5396                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5397                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5398                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5399                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5400                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5401                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5402                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5403                 </fields>
5404                 <links>
5405                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5406                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5407                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5408                 </links>
5409         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5410             <actions>
5411                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5412                 <retrieve/>
5413                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5414                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5415             </actions>
5416         </permacrud>
5417         </class>
5418         <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">
5419                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5420                         <field name="address_type"  reporter:datatype="text"/>
5421                         <field name="city"  reporter:datatype="text"/>
5422                         <field name="country"  reporter:datatype="text"/>
5423                         <field name="county"  reporter:datatype="text"/>
5424                         <field name="id" reporter:datatype="id" />
5425                         <field name="org_unit" reporter:datatype="org_unit"/>
5426                         <field name="post_code"  reporter:datatype="text"/>
5427                         <field name="state"  reporter:datatype="text"/>
5428                         <field name="street1"  reporter:datatype="text"/>
5429                         <field name="street2"  reporter:datatype="text"/>
5430                         <field name="valid" reporter:datatype="bool"/>
5431                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5432                 </fields>
5433                 <links>
5434                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5435                 </links>
5436         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5437             <actions>
5438                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5439                 <retrieve/>
5440                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5441                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5442             </actions>
5443         </permacrud>
5444         </class>
5445         <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">
5446                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5447                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5448                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5449                         <field name="query_text" reporter:datatype="text"/>
5450                 </fields>
5451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5452             <actions>
5453                 <retrieve/>
5454             </actions>
5455         </permacrud>
5456         </class>
5457
5458         <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">
5459                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5460                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5461                         <field name="owner" reporter:datatype="org_unit"/>
5462                         <field name="code" reporter:datatype="text"/>
5463                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5464                         <field name="create_date" reporter:datatype="timestamp"/>
5465                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5466                 </fields>
5467                 <links>
5468                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5469                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5470                 </links>
5471         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5472             <actions>
5473                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5474                 <retrieve/>
5475                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5476                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5477             </actions>
5478         </permacrud>
5479         </class>
5480         <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">
5481                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5482                         <field name="id" reporter:datatype="id"/>
5483                         <field name="grp" reporter:datatype="link"/>
5484                         <field name="pos" reporter:datatype="int"/>
5485                         <field name="query" reporter:datatype="link"/>
5486                 </fields>
5487                 <links>
5488                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5489                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5490                 </links>
5491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5492             <actions>
5493                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5494                     <context link="grp" field="owner"/>
5495                 </create>
5496                 <retrieve/>
5497                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5498                     <context link="grp" field="owner"/>
5499                 </update>
5500                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5501                     <context link="grp" field="owner"/>
5502                 </delete>
5503             </actions>
5504         </permacrud>
5505         </class>
5506
5507         <!-- A note: Please update alhr and ahopl when updating ahr -->
5508         <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">
5509                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5510                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5511                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5512                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5513                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5514                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5515                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5516                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5517                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5518                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5519                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5520                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5521                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5522                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5523                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5524                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5525                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5526                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5527                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5528                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5529                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5530                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5531                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5532                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5533                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5534                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5535                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5536                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5537                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5538                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5539                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5540                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5541                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5542                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5543                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5544                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5545                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5546                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5547                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5548                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5549                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5550                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5551                 </fields>
5552                 <links>
5553                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5554                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5555                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5556                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5557                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5558                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5559                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5560                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5561                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5562                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5563                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5564                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5565                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5566                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5567                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5568                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5569                 </links>
5570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5571                         <actions>
5572                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5573                         </actions>
5574                 </permacrud>
5575         </class>
5576         <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">
5577                 <oils_persist:source_definition><![CDATA[
5578                 SELECT
5579                         ahr.*,
5580                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5581                                 copy_location_order_position,
5582                         CASE WHEN au.alias IS NOT NULL THEN
5583                                 au.alias
5584                         ELSE
5585                                 au.first_given_name
5586                         END AS usr_alias_or_first_given_name,
5587                         au.first_given_name AS usr_first_given_name,
5588                         au.second_given_name AS usr_second_given_name,
5589                         au.family_name AS usr_family_name,
5590                         au.prefix AS usr_prefix,
5591                         au.suffix AS usr_suffix,
5592                         au.alias AS usr_alias,
5593                         CASE WHEN au.alias IS NOT NULL THEN
5594                                 au.alias
5595                         ELSE
5596                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5597                                         COALESCE(au.family_name, ''),
5598                                         COALESCE(au.suffix, ''),
5599                                         ', ',
5600                                         COALESCE(au.prefix, ''),
5601                                         COALESCE(au.first_given_name, ''),
5602                                         COALESCE(au.second_given_name, '')
5603                                 ], ' '), E'\\s+,', ',')
5604                         END AS usr_alias_or_display_name,
5605                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5606                                 COALESCE(au.family_name, ''),
5607                                 COALESCE(au.suffix, ''),
5608                                 ', ',
5609                                 COALESCE(au.prefix, ''),
5610                                 COALESCE(au.first_given_name, ''),
5611                                 COALESCE(au.second_given_name, '')
5612                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5613                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5614                                 AS call_number_label,
5615                         siss.label AS issuance_label,
5616                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5617                         ahcm_1.copy_count AS potential_copies
5618                 FROM action.hold_request ahr
5619                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5620                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5621                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5622                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5623                 JOIN actor.usr au ON (au.id = ahr.usr)
5624                 JOIN (
5625                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5626                         FROM asset.copy_location
5627                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5628                 LEFT JOIN actor.usr_standing_penalty ausp 
5629                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5630                 LEFT JOIN config.standing_penalty csp
5631                         ON (
5632                                 csp.id = ausp.standing_penalty AND 
5633                                 csp.block_list LIKE '%CAPTURE%' AND (
5634                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5635                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5636                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5637                                         )
5638                                 )
5639                         )
5640                 JOIN (
5641                         SELECT COUNT(target_copy) AS copy_count, hold
5642                         FROM action.hold_copy_map
5643                         GROUP BY 2
5644                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5645                 LEFT JOIN serial.issuance siss
5646                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5647                 LEFT JOIN asset.copy_location_order acplo
5648                         ON (acp.location = acplo.location AND
5649                                 acp.circ_lib = acplo.org)
5650                 WHERE
5651                         ahr.capture_time IS NULL AND
5652                         ahr.cancel_time IS NULL AND
5653                         csp.id IS NULL AND
5654                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5655                         acp.status IN (0,7)
5656                 ]]></oils_persist:source_definition>
5657                 <fields oils_persist:primary="id">
5658                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5659                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5660                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5661                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5662                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5663                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5664                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5665                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5666                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5667                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5668                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5669                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5670                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5671                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5672                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5673                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5674                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5675                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5676                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5677                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5678                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5679                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5680                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5681                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5682                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5683                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5684                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5685                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5686                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5687                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5688                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5689                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5690                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5691                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5692                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5693                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5694                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5695                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5696                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5697                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5698                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5699                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5700                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5701                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5702                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5703                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5704                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5705                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5706                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5707                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5708                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5709                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5710                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5711                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5712                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5713                 </fields>
5714                 <links>
5715                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5716                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5717                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5718                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5719                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5720                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5721                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5722                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5723                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5724                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5725                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5726                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5727                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5728                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5729                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5730                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5731                 </links>
5732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5733                         <actions>
5734                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5735                         </actions>
5736                 </permacrud>
5737         </class>
5738         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5739                 <oils_persist:source_definition>
5740                         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)
5741                 </oils_persist:source_definition>
5742                 <fields oils_persist:primary="id">
5743                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5744                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5745                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5746                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5747                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5748                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5749                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5750                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5751                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5752                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5753                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5754                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5755                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5756                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5757                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5758                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5759                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5760                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5761                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5762                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5763                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5764                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5765                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5766                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5767                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5768                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5769                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5770                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5771                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5772                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5773                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5774                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5775                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5776                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5777                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5778                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5779                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5780                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5781                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5782                 </fields>
5783                 <links>
5784                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5785                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5786                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5787                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5788                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5789                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5790                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5791                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5792                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5793                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5794                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5795                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5796                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5797                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5798                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5799                 </links>
5800         </class>
5801
5802         <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">
5803                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5804                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5805                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5806                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5807                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5808                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5809                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5810                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5811                 </fields>
5812                 <links>
5813                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5814                 </links>
5815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5816                         <actions>
5817                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5818                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5819                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5820                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5821                         </actions>
5822                 </permacrud>
5823         </class>
5824         <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">
5825                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5826                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5827                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5828                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5829                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5830                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5831                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5832                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5833                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5834                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5835                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5836                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5837                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5838                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5839                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5840                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5841                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5842                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5843                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5844                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5845                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5846                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5847                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5848                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5849                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5850                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5851                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5852                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5853                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5854                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5855                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5856                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5857                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5858                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5859                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5860                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5861                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5862                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5863                 </fields>
5864                 <links>
5865                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5866                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5867                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5868                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5869                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5870                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5871                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5872                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5873                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5874                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5875                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5876                 </links>
5877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5878                         <actions>
5879                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5880                         </actions>
5881                 </permacrud>
5882         </class>
5883         <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">
5884                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5885                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5886                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5887                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5888                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5889                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5890                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5891                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5892                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5893                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5894                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5895                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5896                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5897                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5898                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5899                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5900                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5901                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5902                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5903                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5904                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5905                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5906                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5907                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5908                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5909                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5910                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5911                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5912                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5913                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5914                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5915                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5916                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5917                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5918                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5919                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5920                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5921                 </fields>
5922                 <links>
5923                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5924                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5925                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5926                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5927                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5928                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5929                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5930                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5931                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5932                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5933                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5934                 </links>
5935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5936                         <actions>
5937                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5938                         </actions>
5939                 </permacrud>
5940         </class>
5941
5942         <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">
5943                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5944                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5945                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5946                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5947                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5948                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5949                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5950                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5951                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5952                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5953                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5954                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5955                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5956                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5957                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5958                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5959                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5960                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5961                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5962                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5963                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5964                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5965                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5966                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5967                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5968                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5969                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5970                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5971                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5972                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5973                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5974                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5975                 </fields>
5976                 <links>
5977                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5978                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5979                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5980                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5981                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5982                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5983                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5984                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5985                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5986                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5987                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5988                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5989                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5990                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5991                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5992                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5993                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5994                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5995                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5996                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5997                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5998                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5999                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6000                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6001                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6002                 </links>
6003         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6004             <actions>
6005                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6006                 <retrieve />
6007                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6008                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6009             </actions>
6010         </permacrud>
6011         </class>
6012         <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">
6013                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6014                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6015                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6016                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6017                 </fields>
6018                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6019                         <actions>
6020                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6021                                 <retrieve/>
6022                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6023                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6024                         </actions>
6025                 </permacrud>
6026         </class>
6027         <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">
6028                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6029                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6030                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6031                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6032                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6033                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6034                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6035                 </fields>
6036                 <links>
6037                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6038                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6039                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6040                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6041                 </links>
6042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6043                         <actions>
6044                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6045                                 <retrieve/>
6046                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6047                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6048                         </actions>
6049                 </permacrud>
6050         </class>
6051         <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">
6052                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6053                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6054                         <field name="btype" reporter:datatype="text"/>
6055                         <field name="id" reporter:datatype="id" />
6056                         <field name="name"  reporter:datatype="text"/>
6057                         <field name="description" reporter:datatype="text"/>
6058                         <field name="owner" reporter:datatype="link"/>
6059                         <field name="pub" reporter:datatype="bool"/>
6060                         <field name="create_time" reporter:datatype="timestamp" />
6061                 </fields>
6062                 <links>
6063                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6064                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6065                 </links>
6066         </class>
6067         <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">
6068                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6069                         <field name="id" reporter:datatype="id" />
6070                         <field name="bucket" reporter:datatype="link"/>
6071                         <field name="note" reporter:datatype="text" />
6072                 </fields>
6073                 <links>
6074                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6075                 </links>
6076         </class>
6077         <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">
6078                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6079                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6080                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6081                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6082                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6083                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6084                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6085                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6086                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6087                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6088                 </fields>
6089                 <links>
6090                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6091                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6092                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6093                 </links>
6094                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6095                         <actions>
6096                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6097                         </actions>
6098                 </permacrud>
6099         </class>
6100         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6101                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6102                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6103                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6104                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6105                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6106                 </fields>
6107                 <links>
6108                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6109                 </links>
6110                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6111                         <actions>
6112                                 <retrieve permission="VIEW_USER">
6113                                         <context link="usr" field="home_ou" />
6114                                 </retrieve>
6115                         </actions>
6116                 </permacrud>
6117         </class>
6118     <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">
6119         <fields oils_persist:primary="field">
6120             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6121             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6122             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6123         </fields>
6124         <links/>
6125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6126             <actions>
6127                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6128                 <retrieve />
6129                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6130                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6131             </actions>
6132         </permacrud>
6133     </class>
6134         <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">
6135                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6136                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6137                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6138                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6139                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6140                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6141                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6142                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6143                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6144                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6145                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6146                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6147                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6148                 </fields>
6149                 <links>
6150                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6151                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6152                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6153                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6154                 </links>
6155         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6156             <actions>
6157                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6158                 <retrieve />
6159                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6160                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6161             </actions>
6162         </permacrud>
6163         </class>
6164         <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">
6165                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6166                         <field name="field" reporter:datatype="link"/>
6167                         <field name="id" reporter:datatype="id" />
6168                         <field name="source" reporter:datatype="link"/>
6169                         <field name="value"  reporter:datatype="text"/>
6170                 </fields>
6171                 <links>
6172                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6173                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6174                 </links>
6175         </class>
6176         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6177                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6178                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6179                         <field name="btype" reporter:datatype="text"/>
6180                         <field name="id" reporter:datatype="id" />
6181                         <field name="name"  reporter:datatype="text"/>
6182                         <field name="description" reporter:datatype="text"/>
6183                         <field name="owner" reporter:datatype="link"/>
6184                         <field name="pub" reporter:datatype="bool"/>
6185                         <field name="create_time" reporter:datatype="timestamp" />
6186                 </fields>
6187                 <links>
6188                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6189                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6190                 </links>
6191         </class>
6192         <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">
6193                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6194                         <field name="id" reporter:datatype="id" />
6195                         <field name="bucket" reporter:datatype="link"/>
6196                         <field name="note" reporter:datatype="text" />
6197                 </fields>
6198                 <links>
6199                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6200                 </links>
6201         </class>
6202         <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">
6203                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6204                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6205                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6206                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6207                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6208                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6209                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6210                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6211                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6212                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6213                 </fields>
6214                 <links>
6215                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6216                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6217                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6218                 </links>
6219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6220             <actions>
6221                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6222                     <context link="xact" jump="usr" field="home_ou"/>
6223                 </retrieve>
6224                         </actions>
6225                 </permacrud>
6226         </class>
6227         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6228                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6229                         <field name="id" reporter:datatype="id" />
6230                         <field name="ind1" />
6231                         <field name="ind2" />
6232                         <field name="record" />
6233                         <field name="subfield" />
6234                         <field name="tag" />
6235                         <field name="value" />
6236                 </fields>
6237                 <links>
6238                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6239                 </links>
6240         </class>
6241         <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">
6242                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6243                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6244                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6245                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6246                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6247                 </fields>
6248                 <links>
6249                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6250                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6251                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6252                 </links>
6253         </class>
6254         <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">
6255                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6256                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6257                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6258                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6259                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6260                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6261                 </fields>
6262                 <links>
6263                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6264                 </links>
6265         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6266             <actions>
6267                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6268                 <retrieve/>
6269                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6270                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6271             </actions>
6272         </permacrud>
6273
6274         </class>
6275         <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">
6276                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6277                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6278                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6279                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6280                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6281                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6282                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6283                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6284                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6285                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6286                 </fields>
6287                 <links>
6288                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6289                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6290                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6291                 </links>
6292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6293             <actions>
6294                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6295                 <retrieve/>
6296                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6297                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6298             </actions>
6299         </permacrud>
6300         </class>
6301         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6302                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6303                         <field name="create_date" reporter:datatype="timestamp"/>
6304                         <field name="creator" reporter:datatype="link"/>
6305                         <field name="edit_date" reporter:datatype="timestamp"/>
6306                         <field name="editor" reporter:datatype="link"/>
6307                         <field name="id" reporter:datatype="id" />
6308                         <field name="pub" reporter:datatype="bool"/>
6309                         <field name="record" reporter:datatype="link"/>
6310                         <field name="value"  reporter:datatype="text"/>
6311                 </fields>
6312                 <links>
6313                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6314                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6315                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6316                 </links>
6317         </class>
6318         <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">
6319                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6320                         <field name="balance_owed" reporter:datatype="money" />
6321                         <field name="total_owed" reporter:datatype="money" />
6322                         <field name="total_paid" reporter:datatype="money" />
6323                         <field name="usr" reporter:datatype="link"/>
6324                 </fields>
6325                 <links>
6326                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6327                 </links>
6328         </class>
6329         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6330                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6331                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6332                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6333                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6334                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6335                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6336                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6337                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6338                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6339                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6340                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6341                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6342                 </fields>
6343                 <links>
6344                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6345                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6346                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6347                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6348                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6349                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6350                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6351                 </links>
6352         </class>
6353         <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">
6354                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6355                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6356                         <field name="quality" reporter:datatype="int" />
6357                         <field name="source" reporter:datatype="text"/>
6358                         <field name="transcendant" reporter:datatype="bool"/>
6359                         <field name="can_have_copies" reporter:datatype="bool"/>
6360                 </fields>
6361                 <links/>
6362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6363             <actions>
6364                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6365                 <retrieve/>
6366                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6367                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6368             </actions>
6369         </permacrud>
6370         </class>
6371         <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">
6372                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6373                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6374                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6375                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6376                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6377                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6378                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6379                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6380                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6381                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6382                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6383                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6384                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6385                 </fields>
6386                 <links>
6387                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6388                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6389                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6390                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6391                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6392                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6393                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6394                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6395                 </links>
6396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6397                         <actions>
6398                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6399                                         <context link="usr" field="home_ou" />
6400                                 </retrieve>
6401                         </actions>
6402                 </permacrud>
6403         </class>
6404         <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">
6405                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6406                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6407                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6408                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6409                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6410                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6411                 </fields>
6412                 <links>
6413                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6414                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6415                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6416                 </links>
6417         </class>
6418         <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">
6419                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6420                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6421                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6422                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6423                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6424                 </fields>
6425                 <links>
6426                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6427                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6428                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6429                 </links>
6430         </class>
6431         <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">
6432                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6433                         <field name="bucket" reporter:datatype="link"/>
6434                         <field name="id" reporter:datatype="id" />
6435                         <field name="target_user" reporter:datatype="link"/>
6436                         <field name="create_time" reporter:datatype="timestamp" />
6437                         <field name="pos" reporter:datatype="int" />
6438                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6439                 </fields>
6440                 <links>
6441                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6442                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6443             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6444                 </links>
6445         </class>
6446         <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">
6447                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6448                         <field name="id" reporter:datatype="id" />
6449                         <field name="item" reporter:datatype="link"/>
6450                         <field name="note" reporter:datatype="text" />
6451                 </fields>
6452                 <links>
6453                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6454                 </links>
6455         </class>
6456         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6457                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6458                         <field name="balance_owed" reporter:datatype="money" />
6459                         <field name="total_owed" reporter:datatype="money" />
6460                         <field name="total_paid" reporter:datatype="money" />
6461                         <field name="usr" reporter:datatype="link"/>
6462                 </fields>
6463                 <links>
6464                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6465                 </links>
6466         </class>
6467         <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">
6468                 <fields oils_persist:primary="code" oils_persist:sequence="">
6469                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6470                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6471                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6472                 </fields>
6473                 <links/>
6474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6475             <actions>
6476                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6477                 <retrieve/>
6478                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6479                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6480             </actions>
6481         </permacrud>
6482         </class>
6483         <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">
6484                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6485                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6486                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6487                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6488                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6489                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6490                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6491                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6492                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6493                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6494                 </fields>
6495                 <links>
6496                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6497                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6498                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6499                 </links>
6500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6501             <actions>
6502                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6503                     <context link="xact" jump="usr" field="home_ou"/>
6504                 </retrieve>
6505                         </actions>
6506                 </permacrud>
6507         </class>
6508         <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">
6509                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6510                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6511                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6512                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6513                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6514                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6515                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6516                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6517                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6518                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6519                 </fields>
6520                 <links>
6521                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6522                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6523                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6524                 </links>
6525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6526             <actions>
6527                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6528                     <context link="xact" jump="usr" field="home_ou"/>
6529                 </retrieve>
6530                         </actions>
6531                 </permacrud>
6532         </class>
6533         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6534                 <fields oils_persist:primary="id" oils_persist:sequence="">
6535                         <field name="checkin_lib" reporter:datatype="link"/>
6536                         <field name="checkin_staff" reporter:datatype="link"/>
6537                         <field name="checkin_time" reporter:datatype="timestamp"/>
6538                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6539                         <field name="circ_staff" reporter:datatype="link"/>
6540                         <field name="desk_renewal" reporter:datatype="bool"/>
6541                         <field name="due_date" reporter:datatype="timestamp"/>
6542                         <field name="duration" reporter:datatype="interval"/>
6543                         <field name="duration_rule" reporter:datatype="link"/>
6544                         <field name="fine_interval" reporter:datatype="interval"/>
6545                         <field name="id" reporter:datatype="id" />
6546                         <field name="max_fine" reporter:datatype="money" />
6547                         <field name="max_fine_rule" reporter:datatype="link"/>
6548                         <field name="opac_renewal" reporter:datatype="bool"/>
6549                         <field name="phone_renewal" reporter:datatype="bool"/>
6550                         <field name="recurring_fine" reporter:datatype="money" />
6551                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6552                         <field name="renewal_remaining" reporter:datatype="int" />
6553             <field name="grace_period" reporter:datatype="interval" />
6554                         <field name="stop_fines" reporter:datatype="text"/>
6555                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6556                         <field name="target_copy" reporter:datatype="link"/>
6557                         <field name="usr" reporter:datatype="link"/>
6558                         <field name="xact_finish" reporter:datatype="timestamp" />
6559                         <field name="xact_start" reporter:datatype="timestamp" />
6560                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6561                 </fields>
6562                 <links>
6563                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6564                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6565                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6566                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6567                 </links>
6568         </class>
6569         <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">
6570                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6571                         <field name="field" reporter:datatype="link"/>
6572                         <field name="id" reporter:datatype="id" />
6573                         <field name="source" reporter:datatype="link"/>
6574                         <field name="value" reporter:datatype="text"/>
6575                 </fields>
6576                 <links>
6577                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6578                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6579                 </links>
6580         </class>
6581         <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">
6582                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6583                         <field name="high" reporter:datatype="money" />
6584                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6585                         <field name="low" reporter:datatype="money" />
6586                         <field name="name" reporter:datatype="text"/>
6587                         <field name="normal" reporter:datatype="money" />
6588                         <field name="recurrence_interval" reporter:datatype="interval"/>
6589             <field name="grace_period" reporter:datatype="interval" />
6590                 </fields>
6591                 <links/>
6592         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6593             <actions>
6594                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6595                 <retrieve/>
6596                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6597                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6598             </actions>
6599         </permacrud>
6600         </class>
6601         <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">
6602                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6603                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6604                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6605                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6606                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6607                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6608                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6609                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6610                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6611                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6612                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6613                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6614                 </fields>
6615                 <links>
6616                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6617                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6618                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6619                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6620                 </links>
6621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6622             <actions>
6623                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6624                     <context link="xact" jump="usr" field="home_ou"/>
6625                 </retrieve>
6626                         </actions>
6627                 </permacrud>
6628         </class>
6629         <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">
6630                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6631                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6632                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6633                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6634                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6635                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6636                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6637                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6638                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6639                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6640                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6641                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6642                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6643                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6644                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6645                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6646                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6647                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6648                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6649                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6650                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6651                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6652                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6653                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6654                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6655                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6656                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6657                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6658                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6659                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6660                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6661                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6662                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6663                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6664                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6665                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6666                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6667                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6668                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6669                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6670                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6671                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6672                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6673                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6674                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6675                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6676                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6677                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6678                 </fields>
6679                 <links>
6680                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6681                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6682                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6683                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6684                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6685                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6686                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6687                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6688                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6689                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6690                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6691                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6692                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6693                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6694                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6695                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6696                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6697                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6698                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6699                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6700                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6701                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6702                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6703                 </links>
6704         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6705             <actions>
6706                 <create permission="CREATE_COPY">
6707                     <context link="call_number" field="owning_lib"/>
6708                 </create>
6709                 <retrieve/>
6710                 <update permission="UPDATE_COPY">
6711                     <context link="call_number" field="owning_lib"/>
6712                 </update>
6713                 <delete permission="DELETE_COPY">
6714                     <context link="call_number" field="owning_lib"/>
6715                 </delete>
6716             </actions>
6717         </permacrud>
6718         </class>
6719
6720         <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">
6721                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6722                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6723                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6724                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6725                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6726                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6727                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6728                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6729                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6730                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6731                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6732                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6733                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6734                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6735                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6736                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6737                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6738                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6739                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6740                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6741                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6742                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6743                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6744                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6745                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6746                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6747                 </fields>
6748                 <links>
6749                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6750                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6751                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6752                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6753                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6754                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6755                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6756                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6757                 </links>
6758                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6759                         <actions>
6760                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6761                                 <retrieve />
6762                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6763                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6764                         </actions>
6765                 </permacrud>
6766         </class>
6767
6768         <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">
6769                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6770                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6771                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6772                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6773                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6774                 </fields>
6775                 <links/>
6776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6777             <actions>
6778                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6779                 <retrieve/>
6780                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6781                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6782             </actions>
6783         </permacrud>
6784         </class>
6785         <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">
6786                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6787                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6788                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6789                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6790                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6791                 </fields>
6792                 <links/>
6793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6794             <actions>
6795                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6796                 <retrieve/>
6797                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6798                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6799             </actions>
6800         </permacrud>
6801         </class>
6802         <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">
6803                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6804                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6805                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6806                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6807                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6808                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6809                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6810                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6811                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6812                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6813                 </fields>
6814                 <links>
6815                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6816                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6817                 </links>
6818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6819             <actions>
6820                 <create permission="CREATE_PERM" global_required="true"/>
6821                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6822                 <update permission="UPDATE_PERM" global_required="true"/>
6823                 <delete permission="DELETE_PERM" global_required="true"/>
6824             </actions>
6825         </permacrud>
6826         </class>
6827         <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">
6828                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6829                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6830                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6831                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6832                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6833                 </fields>
6834                 <links>
6835                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6836                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6837                 </links>
6838         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6839             <actions>
6840                 <create permission="ADMIN_SURVEY">
6841                     <context link="question" jump="survey" field="owner"/>
6842                 </create>
6843                 <retrieve/>
6844                 <update permission="ADMIN_SURVEY">
6845                     <context link="question" jump="survey" field="owner"/>
6846                 </update>
6847                 <delete permission="ADMIN_SURVEY">
6848                     <context link="question" jump="survey" field="owner"/>
6849                 </delete>
6850             </actions>
6851         </permacrud>
6852         </class>
6853         <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">
6854                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6855                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6856                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6857                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6858                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6859                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6860                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6861                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6862                 </fields>
6863                 <links>
6864                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6865                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6866                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6867                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6868                 </links>
6869                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6870                         <actions>
6871                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6872                         </actions>
6873                 </permacrud>
6874         </class>
6875         <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">
6876                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6877                         <field name="balance_owed" reporter:datatype="money" />
6878                         <field name="total_owed" reporter:datatype="money" />
6879                         <field name="total_paid" reporter:datatype="money" />
6880                         <field name="usr" reporter:datatype="link"/>
6881                 </fields>
6882                 <links>
6883                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6884                 </links>
6885         </class>
6886         <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">
6887                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6888                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6889                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6890                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6891                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6892                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6893                 </fields>
6894                 <links>
6895                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6896                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6897                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6898                 </links>
6899         </class>
6900         <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">
6901                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6902                         <field name="field" reporter:datatype="link"/>
6903                         <field name="id" reporter:datatype="id" />
6904                         <field name="source" reporter:datatype="link"/>
6905                         <field name="value" reporter:datatype="text"/>
6906                 </fields>
6907                 <links>
6908                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6909                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6910                 </links>
6911         </class>
6912         <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">
6913                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6914                         <field name="field" reporter:datatype="link"/>
6915                         <field name="id" reporter:datatype="id" />
6916                         <field name="source" reporter:datatype="link"/>
6917                         <field name="value" reporter:datatype="text"/>
6918                 </fields>
6919                 <links>
6920                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6921                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6922                 </links>
6923         </class>
6924         <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">
6925                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6926                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6927                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6928                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6929                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6930                 </fields>
6931                 <links>
6932                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6933                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6934                 </links>
6935         </class>
6936         <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">
6937                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6938                         <field name="depth" reporter:datatype="int" />
6939                         <field name="grantable" reporter:datatype="bool"/>
6940                         <field name="grp" reporter:datatype="link"/>
6941                         <field name="id" reporter:datatype="id" />
6942                         <field name="perm" reporter:datatype="link"/>
6943                 </fields>
6944                 <links>
6945                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6946                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6947                 </links>
6948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6949             <actions>
6950                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6951                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6952                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6953                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6954             </actions>
6955         </permacrud>
6956         </class>
6957         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6958                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6959                         <field name="items" oils_persist:virtual="true" />
6960                         <field name="btype" reporter:datatype="text"/>
6961                         <field name="id" reporter:datatype="id" />
6962                         <field name="name" reporter:datatype="text"/>
6963                         <field name="description" reporter:datatype="text"/>
6964                         <field name="owner" reporter:datatype="link"/>
6965                         <field name="pub" reporter:datatype="bool"/>
6966                         <field name="create_time" reporter:datatype="timestamp" />
6967                 </fields>
6968                 <links>
6969                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6970                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6971                 </links>
6972         </class>
6973         <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">
6974                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6975                         <field name="id" reporter:datatype="id" />
6976                         <field name="bucket" reporter:datatype="link"/>
6977                         <field name="note" reporter:datatype="text" />
6978                 </fields>
6979                 <links>
6980                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6981                 </links>
6982         </class>
6983         <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">
6984                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6985                         <field name="id" reporter:datatype="int" />
6986                         <field name="usr" reporter:datatype="link"/>
6987                         <field name="work_ou" reporter:datatype="link"/>
6988                 </fields>
6989                 <links>
6990                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6991                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6992                 </links>
6993         </class>
6994         <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">
6995                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6996                         <field name="depth" reporter:datatype="int"/>
6997                         <field name="grantable" reporter:datatype="bool"/>
6998                         <field name="id" reporter:datatype="id" />
6999                         <field name="perm" reporter:datatype="link"/>
7000                         <field name="usr" reporter:datatype="link"/>
7001                 </fields>
7002                 <links>
7003                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7004                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7005                 </links>
7006         </class>
7007         <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">
7008                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7009                         <field name="object_id" reporter:datatype="text"/>
7010                         <field name="grantable" reporter:datatype="bool"/>
7011                         <field name="id" reporter:datatype="id" />
7012                         <field name="perm" reporter:datatype="link"/>
7013                         <field name="usr" reporter:datatype="link"/>
7014                         <field name="object_type" reporter:datatype="text"/>
7015                 </fields>
7016                 <links>
7017                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7018                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7019                 </links>
7020         </class>
7021         <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">
7022                 <fields oils_persist:primary="id" oils_persist:sequence="">
7023                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7024                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7025                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7026                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7027                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7028                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7029                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7030                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7031                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7032                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7033                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7034                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7035                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7036                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7037                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7038                 </fields>
7039                 <links>
7040                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7041                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7042                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7043                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7044                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7045                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7046                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7047                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7048                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7049                 </links>
7050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7051             <actions>
7052                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7053                     <context link="xact" jump="usr" field="home_ou"/>
7054                 </retrieve>
7055                         </actions>
7056                 </permacrud>
7057         </class>
7058         <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">
7059                 <fields oils_persist:primary="id" oils_persist:sequence="">
7060                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7061                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7062                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7063                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7064                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7065                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7066                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7067                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7068                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7069                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7070                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7071                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7072                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7073                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7074                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7075                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7076                 </fields>
7077                 <links>
7078                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7079                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7080                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7081                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7082                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7083                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7084                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7085                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7086                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7087                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7088                 </links>
7089         </class>
7090         <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">
7091                 <fields oils_persist:primary="id" oils_persist:sequence="">
7092                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7093                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7094                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7095                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7096                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7097                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7098                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7099                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7100                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7101                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7102                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7104                 </fields>
7105                 <links>
7106                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7107                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7108                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7109                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7110                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7111                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7112                 </links>
7113         </class>
7114         <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">
7115                 <fields oils_persist:primary="id" oils_persist:sequence="">
7116                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7117                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7118                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7119                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7120                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7121                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7122                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7123                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7124                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7125                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7126                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7127                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7128                 </fields>
7129                 <links>
7130                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7131                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7132                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7133                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7134                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7135                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7136                 </links>
7137         </class>
7138         <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">
7139                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7140                         <field name="bucket" reporter:datatype="link"/>
7141                         <field name="id" reporter:datatype="id" />
7142                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7143                         <field name="create_time" reporter:datatype="timestamp" />
7144                         <field name="pos" reporter:datatype="int" />
7145                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7146                 </fields>
7147                 <links>
7148                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7149                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7150             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7151                 </links>
7152         </class>
7153         <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">
7154                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7155                         <field name="id" reporter:datatype="id" />
7156                         <field name="item" reporter:datatype="link"/>
7157                         <field name="note" reporter:datatype="text" />
7158                 </fields>
7159                 <links>
7160                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7161                 </links>
7162         </class>
7163         <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">
7164                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7165                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7166                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7167                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7168                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7169                 </fields>
7170                 <links>
7171                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7172                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7173                 </links>
7174                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7175                         <actions>
7176                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7177                         </actions>
7178                 </permacrud>
7179         </class>
7180     <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">
7181         <fields oils_persist:primary="field">
7182             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7183             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7184             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7185         </fields>
7186         <links/>
7187         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7188             <actions>
7189                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7190                 <retrieve />
7191                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7192                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7193             </actions>
7194         </permacrud>
7195     </class>
7196         <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">
7197                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7198                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7199                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7200                 </fields>
7201                 <links/>
7202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7203             <actions>
7204                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7205                 <retrieve/>
7206                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7207                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7208             </actions>
7209         </permacrud>
7210         </class>
7211
7212
7213         <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">
7214                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7215                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7216                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7217                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7218                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7219                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7220                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7221                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7222                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7223                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7224                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7225                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7226                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7227                 </fields>
7228                 <links>
7229                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7230                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7231                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7232                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7233                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7234                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7235                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7236                 </links>
7237         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7238             <actions>
7239                 <create permission="TRANSIT_COPY">
7240                     <context link="target_copy" field="owner"/>
7241                 </create>
7242                 <retrieve/>
7243                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7244                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7245             </actions>
7246         </permacrud>
7247         </class>
7248         <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">
7249                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7250                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7251                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7252                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7253                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7254                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7255                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7256                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7257                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7258                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7259                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7260                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7261                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7262                 </fields>
7263                 <links>
7264                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7265                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7266                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7267                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7268                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7269                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7270                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7271                 </links>
7272         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7273             <actions>
7274                 <create permission="TRANSIT_COPY" context_field="owner">
7275                     <context link="target_copy" field="circ_lib"/>
7276                 </create>
7277                 <retrieve/>
7278                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7279                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7280             </actions>
7281         </permacrud>
7282         </class>
7283         <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">
7284                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7285                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7286                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7287                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7288                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7289                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7290                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7291                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7292                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7293                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7294                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7295                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7296                 </fields>
7297                 <links>
7298                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7299                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7300                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7301                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7302                 </links>
7303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7304             <actions>
7305                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7306                     <context link="xact" jump="usr" field="home_ou"/>
7307                 </retrieve>
7308                         </actions>
7309                 </permacrud>
7310         </class>
7311         <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">
7312                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7313                         <field name="grp" />
7314                         <field name="id" reporter:datatype="id" />
7315                         <field name="usr" />
7316                 </fields>
7317                 <links>
7318                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7319                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7320                 </links>
7321         </class>
7322         <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">
7323                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7324                         <field name="id" reporter:datatype="id" />
7325                         <field name="fq_field" reporter:datatype="text"/>
7326                         <field name="identity_value" reporter:datatype="text"/>
7327                         <field name="translation" reporter:datatype="text"/>
7328                         <field name="string" reporter:datatype="text"/>
7329                 </fields>
7330                 <links>
7331                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7332                 </links>
7333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7334             <actions>
7335                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7336                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7337                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7338                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7339             </actions>
7340         </permacrud>
7341         </class>
7342         <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">
7343                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7344                         <field name="id" reporter:datatype="id" />
7345                         <field name="fm_class" reporter:datatype="text"/>
7346                         <field name="field" reporter:datatype="text"/>
7347                         <field name="owner" reporter:datatype="org_unit"/>
7348                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7349                 </fields>
7350                 <links>
7351                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7352                 </links>
7353         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7354             <actions>
7355                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7356                 <retrieve/>
7357                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7358                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7359             </actions>
7360         </permacrud>
7361         </class>
7362         <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">
7363                 <fields oils_persist:primary="code">
7364                         <field name="code" reporter:datatype="id" />
7365                         <field name="marc_code" reporter:datatype="text"/>
7366                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7367                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7368                 </fields>
7369                 <links/>
7370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7371             <actions>
7372                 <create permission="CREATE_LOCALE" global_required="true"/>
7373                 <retrieve/>
7374                 <update permission="UPDATE_LOCALE" global_required="true"/>
7375                 <delete permission="DELETE_LOCALE" global_required="true"/>
7376             </actions>
7377         </permacrud>
7378         </class>
7379         <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">
7380                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7381                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7382                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7383                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7384             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7385                 </fields>
7386                 <links>
7387                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7388                 </links>
7389         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7390             <actions>
7391                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7392                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7393                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7394                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7395             </actions>
7396         </permacrud>
7397         </class>
7398
7399         <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">
7400                 <fields oils_persist:primary="id">
7401                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7402                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7403                 </fields>
7404                 <links/>
7405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7406             <actions>
7407                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7408                 <retrieve/>
7409                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7410                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7411             </actions>
7412         </permacrud>
7413         </class>
7414
7415         <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">
7416                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7417                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7418                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7419                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7420                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7421                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7422                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7423                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7424                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7425                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7426                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7427                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7428                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7429                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7430                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7431                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7432                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7433                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7434                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7435                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7436                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7437                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7438                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7439                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7440                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7441                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7442                 </fields>
7443                 <links>
7444                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7445                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7446                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7447                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7448                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7449                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7450                 </links>
7451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7452             <actions>
7453                 <create permission="user_request.create">
7454                     <context link="usr" field="home_ou"/>
7455                                 </create>
7456                 <retrieve permission="user_request.view">
7457                     <context link="usr" field="home_ou"/>
7458                                 </retrieve>
7459                 <update permission="user_request.update">
7460                     <context link="usr" field="home_ou"/>
7461                                 </update>
7462                 <delete permission="user_request.delete">
7463                     <context link="usr" field="home_ou"/>
7464                                 </delete>
7465             </actions>
7466         </permacrud>
7467         </class>
7468
7469         <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">
7470                 <fields oils_persist:primary="code">
7471                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7472                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7473                 </fields>
7474                 <links/>
7475         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7476             <actions>
7477                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7478                 <retrieve/>
7479                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7480                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7481             </actions>
7482         </permacrud>
7483         </class>
7484
7485         <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">
7486                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7487                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7488                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7489                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7490                         <field reporter:label="Ratio" name="ratio" />
7491                 </fields>
7492                 <links>
7493                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7494                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7495                 </links>
7496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7497                         <actions>
7498                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7499                                 <retrieve/>
7500                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7501                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7502                         </actions>
7503                 </permacrud>
7504         </class>
7505
7506         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7507                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7508                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7509                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7510                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7511                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7512                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7513                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7514                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7515                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7516                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7517                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7518                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7519                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7520                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7521                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7522                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7523                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7524                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7525                 </fields>
7526                 <links>
7527                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7528                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7529             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7530             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7531             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7532                 </links>
7533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7534             <actions>
7535                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7536                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7537                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7538                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7539             </actions>
7540         </permacrud>
7541         </class>
7542
7543         <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">
7544                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7545                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7546                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7547                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7548                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7549                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7550                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7551                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7552                 </fields>
7553                 <links>
7554                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7555                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7556                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7557                 </links>
7558         </class>
7559
7560         <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">
7561                 <fields oils_persist:primary="code">
7562                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7563                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7564                 </fields>
7565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7566             <actions>
7567                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7568                 <retrieve/>
7569                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7570                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7571             </actions>
7572                 </permacrud>
7573         </class>
7574
7575         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7576                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7577                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7578                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7579                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7580                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7581                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7582                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7583                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7584                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7585                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7586                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7587                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7588                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7589                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7590                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7591                 </fields>
7592                 <links>
7593                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7594                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7595                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7596                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7597                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7598                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7599                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7600                 </links>
7601         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7602             <actions>
7603                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7604                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7605                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7606                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7607             </actions>
7608         </permacrud>
7609         </class>
7610
7611         <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">
7612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7613                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7614                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7615                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7616                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7617                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7618                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7619                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7620                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7621                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7622                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7623                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7624                 </fields>
7625                 <links>
7626                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7627                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7628                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7629                 </links>
7630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7631             <actions>
7632                 <create   permission="ADMIN_INVOICE">
7633                                         <context link="invoice" field="receiver"/>
7634                                 </create>
7635                 <retrieve permission="ADMIN_INVOICE">
7636                                         <context link="invoice" field="receiver"/>
7637                                 </retrieve>
7638                 <update   permission="ADMIN_INVOICE">
7639                                         <context link="invoice" field="receiver"/>
7640                                 </update>
7641                                 <delete   permission="ADMIN_INVOICE">
7642                                         <context link="invoice" field="receiver"/>
7643                                 </delete>
7644             </actions>
7645         </permacrud>
7646         </class>
7647
7648         <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">
7649                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7650                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7651                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7652                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7653                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7654                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7655                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7656                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7657                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7658                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7659                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7660                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7661                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7662                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7663                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7664                 </fields>
7665                 <links>
7666                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7667                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7668                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7669                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7670                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7671                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7672                 </links>
7673         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7674             <actions>
7675                 <create   permission="ADMIN_INVOICE">
7676                                         <context link="invoice" field="receiver"/>
7677                                 </create>
7678                 <retrieve permission="ADMIN_INVOICE">
7679                                         <context link="invoice" field="receiver"/>
7680                                 </retrieve>
7681                 <update   permission="ADMIN_INVOICE">
7682                                         <context link="invoice" field="receiver"/>
7683                                 </update>
7684                                 <delete   permission="ADMIN_INVOICE">
7685                                         <context link="invoice" field="receiver"/>
7686                                 </delete>
7687             </actions>
7688         </permacrud>
7689         </class>
7690
7691         <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">
7692                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7693                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7694                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7695                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7696                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7697                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7698                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7699                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7700                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7701                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7702                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7703                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7704                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7705                 </fields>
7706                 <links>
7707                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7708                 </links>
7709         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7710             <actions>
7711                 <create permission="ADMIN_PROVIDER">
7712                     <context link="provider" field="owner"/>
7713                 </create>
7714                 <retrieve permission="ADMIN_PROVIDER">
7715                     <context link="provider" field="owner"/>
7716                 </retrieve>
7717                 <update permission="ADMIN_PROVIDER">
7718                     <context link="provider" field="owner"/>
7719                 </update>
7720                 <delete permission="ADMIN_PROVIDER">
7721                     <context link="provider" field="owner"/>
7722                 </delete>
7723             </actions>
7724         </permacrud>
7725         </class>
7726
7727         <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">
7728                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7729                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7730                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7731                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7732                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7733                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7734                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7735         </fields>
7736                 <links>
7737                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7738                 </links>
7739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7740             <actions>
7741                 <create permission="ADMIN_PROVIDER">
7742                     <context link="provider" field="owner"/>
7743                 </create>
7744                 <retrieve permission="ADMIN_PROVIDER">
7745                     <context link="provider" field="owner"/>
7746                 </retrieve>
7747                 <update permission="ADMIN_PROVIDER">
7748                     <context link="provider" field="owner"/>
7749                 </update>
7750                 <delete permission="ADMIN_PROVIDER">
7751                     <context link="provider" field="owner"/>
7752                 </delete>
7753             </actions>
7754         </permacrud>
7755     </class>
7756         <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">
7757                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7758                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7759                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7760                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7761                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7762                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7763                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7764                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7765                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7766                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7767                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7768                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7769                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7770                 </fields>
7771                 <links>
7772                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7773                 </links>
7774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7775             <actions>
7776                 <create permission="ADMIN_PROVIDER">
7777                     <context link="contact" jump='provider' field="owner"/>
7778                 </create>
7779                 <retrieve permission="ADMIN_PROVIDER">
7780                     <context link="contact" jump='provider' field="owner"/>
7781                 </retrieve>
7782                 <update permission="ADMIN_PROVIDER">
7783                     <context link="contact" jump='provider' field="owner"/>
7784                 </update>
7785                 <delete permission="ADMIN_PROVIDER">
7786                     <context link="contact" jump='provider' field="owner"/>
7787                 </delete>
7788             </actions>
7789         </permacrud>
7790         </class>
7791
7792         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7793                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7794                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7795                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7796                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7797                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7798                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7799                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7800                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7801                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7802                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7803                 </fields>
7804                 <links>
7805                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7806                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7807                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7808                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7809                 </links>
7810         </class>
7811
7812         <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">
7813                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7814                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7815                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7816                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7817                 </fields>
7818                 <links>
7819             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7820                 </links>
7821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7822                         <actions>
7823                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7824                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7825                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7826                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7827                         </actions>
7828                 </permacrud>
7829         </class>
7830
7831         <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">
7832                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7833                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7834                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7835                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7836                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7837                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7838                 </fields>
7839                 <links>
7840                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7841                 </links>
7842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7843                         <actions>
7844                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7845                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7846                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7847                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7848                         </actions>
7849                 </permacrud>
7850         </class>
7851
7852         <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">
7853                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7854                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7855                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7856                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7857                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7858                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7859                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7860                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7861                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7862                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7863                 </fields>
7864                 <links>
7865                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7866                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7867             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7868             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7869                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7870                 </links>
7871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7872             <actions>
7873                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7874                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7875                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7876                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7877             </actions>
7878         </permacrud>
7879         </class>
7880
7881         <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">
7882                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7883                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7884                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7885                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7886                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7887                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7888                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7889                 </fields>
7890                 <links>
7891                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7892                 </links>
7893                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7894                         <actions>
7895                                 <create permission="ADMIN_FUNDING_SOURCE">
7896                     <context link="funding_source" field="owner"/>
7897                 </create>
7898                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7899                     <context link="funding_source" field="owner"/>
7900                 </retrieve>
7901                                 <update permission="ADMIN_FUNDING_SOURCE">
7902                     <context link="funding_source" field="owner"/>
7903                 </update>
7904                                 <delete permission="ADMIN_FUNDING_SOURCE">
7905                     <context link="funding_source" field="owner"/>
7906                 </delete>
7907                         </actions>
7908                 </permacrud>
7909         </class>
7910
7911         <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">
7912                 <fields oils_persist:primary="id">
7913                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7914                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7915                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7916                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7917                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7918                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7919                 </fields>
7920                 <links>
7921                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7922                 </links>
7923         </class>
7924
7925         <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">
7926                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7927                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7928                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7929                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7930                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7931                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7932                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7933                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7934                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7935                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
7936                 </fields>
7937                 <links>
7938                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7939                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7940                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
7941                 </links>
7942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7943                         <actions>
7944                                 <create permission="ADMIN_ACQ_FUND">
7945                     <context link="fund" field="org"/>
7946                 </create>
7947                                 <retrieve permission="ADMIN_ACQ_FUND">
7948                     <context link="fund" field="org"/>
7949                 </retrieve>
7950                                 <update permission="ADMIN_ACQ_FUND">
7951                     <context link="fund" field="org"/>
7952                 </update>
7953                                 <delete permission="ADMIN_ACQ_FUND">
7954                     <context link="fund" field="org"/>
7955                 </delete>
7956                         </actions>
7957                 </permacrud>
7958         </class>
7959
7960         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7961                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7962                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7963                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7964                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7965                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7966                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7967                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7968                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7969                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7970                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7971                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7972                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7973                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7974                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7975                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7976                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7977                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7978                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7979                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7980                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7981                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7982                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7983                 </fields>
7984                 <links>
7985                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7986                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7987             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7988             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7989             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7990             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7991             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7992             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7993             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7994             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7995             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7996                 </links>
7997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
7998             <actions>
7999                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8000                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8001                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8002                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8003             </actions>
8004         </permacrud>
8005         </class>
8006
8007         <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">
8008                 <fields oils_persist:primary="fund">
8009                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8010                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8011                 </fields>
8012                 <links>
8013                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8014                 </links>
8015         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8016             <actions>
8017                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8018                                         <context link="fund" field="org" />
8019                 </retrieve>
8020             </actions>
8021         </permacrud>
8022         </class>
8023
8024         <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">
8025                 <fields oils_persist:primary="fund">
8026                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8027                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8028                 </fields>
8029                 <links>
8030                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8031                 </links>
8032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8033             <actions>
8034                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8035                                         <context link="fund" field="org" />
8036                 </retrieve>
8037             </actions>
8038         </permacrud>
8039         </class>
8040
8041         <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">
8042                 <fields oils_persist:primary="fund">
8043                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8044                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8045                 </fields>
8046                 <links>
8047                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8048                 </links>
8049         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8050             <actions>
8051                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8052                                         <context link="fund" field="org" />
8053                 </retrieve>
8054             </actions>
8055         </permacrud>
8056         </class>
8057
8058         <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">
8059                 <fields oils_persist:primary="fund">
8060                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8061                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8062                 </fields>
8063                 <links>
8064                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8065                 </links>
8066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8067             <actions>
8068                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8069                                         <context link="fund" field="org" />
8070                 </retrieve>
8071             </actions>
8072         </permacrud>
8073         </class>
8074
8075         <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">
8076                 <fields oils_persist:primary="fund">
8077                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8078                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8079                 </fields>
8080                 <links>
8081                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8082                 </links>
8083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8084             <actions>
8085                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8086                                         <context link="fund" field="org" />
8087                 </retrieve>
8088             </actions>
8089         </permacrud>
8090         </class>
8091
8092    <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">
8093         <fields oils_persist:primary="fund">
8094             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8095             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8096         </fields>
8097         <links>
8098             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8099         </links>
8100     </class>
8101
8102    <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">
8103         <fields oils_persist:primary="fund">
8104             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8105             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8106         </fields>
8107         <links>
8108             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8109         </links>
8110     </class>
8111
8112    <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">
8113         <fields oils_persist:primary="fund">
8114             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8115             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8116         </fields>
8117         <links>
8118             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8119         </links>
8120     </class>
8121
8122    <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">
8123         <fields oils_persist:primary="fund">
8124             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8125             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8126         </fields>
8127         <links>
8128             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8129         </links>
8130     </class>
8131
8132    <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">
8133         <fields oils_persist:primary="fund">
8134             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8135             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8136         </fields>
8137         <links>
8138             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8139         </links>
8140     </class>
8141
8142         <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">
8143                 <fields oils_persist:primary="funding_source">
8144                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8145                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8146                 </fields>
8147                 <links>
8148                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8149                 </links>
8150         </class>
8151
8152         <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">
8153                 <fields oils_persist:primary="funding_source">
8154                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8155                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8156                 </fields>
8157                 <links>
8158                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8159                 </links>
8160         </class>
8161
8162         <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">
8163                 <fields oils_persist:primary="funding_source">
8164                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8165                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8166                 </fields>
8167                 <links>
8168                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8169                 </links>
8170         </class>
8171
8172         <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">
8173                 <fields oils_persist:primary="fund">
8174                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8175                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8176                 </fields>
8177                 <links>
8178                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8179                 </links>
8180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8181             <actions>
8182                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8183                                         <context link="fund" field="org" />
8184                 </retrieve>
8185             </actions>
8186         </permacrud>
8187     </class>
8188     <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">
8189         <oils_persist:source_definition><![CDATA[
8190             SELECT
8191                 acqf.*,
8192                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8193                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8194                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8195                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8196             FROM
8197                 acq.fund acqf
8198                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8199                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8200                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8201                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8202         ]]></oils_persist:source_definition>
8203         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8204             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8205             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8206             <field reporter:label="Name" name="name" reporter:datatype="text" />
8207             <field reporter:label="Year" name="year" reporter:datatype="int" />
8208             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8209             <field reporter:label="Code" name="code" reporter:datatype="text" />
8210             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8211             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8212             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8213             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8214             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8215
8216             <!-- non fund-native fields -->
8217             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8218             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8219             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8220             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8221         </fields>
8222         <links>
8223             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8224             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8225             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8226         </links>
8227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8228             <actions>
8229                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8230             </actions>
8231         </permacrud>
8232         </class>
8233         <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">
8234                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8235                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8236                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8237                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8238                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8239                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8240                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8241                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8242                 </fields>
8243                 <links>
8244                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8245                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8246                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8247                 </links>
8248                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8249                         <actions>
8250                                 <create permission="ADMIN_ACQ_FUND">
8251                     <context link="fund" field="org"/>
8252                 </create>
8253                                 <retrieve permission="ADMIN_ACQ_FUND">
8254                     <context link="fund" field="org"/>
8255                 </retrieve>
8256                                 <update permission="ADMIN_ACQ_FUND">
8257                     <context link="fund" field="org"/>
8258                 </update>
8259                                 <delete permission="ADMIN_ACQ_FUND">
8260                     <context link="fund" field="org"/>
8261                 </delete>
8262                         </actions>
8263                 </permacrud>
8264         </class>
8265
8266     <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">
8267         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8268             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8269             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8270             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8271             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8272             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8273             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8274             <field reporter:label="Note" name="note" reporter:datatype="text" />
8275             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8276         </fields>
8277         <links>
8278             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8279             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8280             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8281         </links>
8282                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8283                         <actions>
8284                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8285                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8286                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8287                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8288                         </actions>
8289                 </permacrud>
8290     </class>
8291
8292         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8293                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8294                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8295                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8296                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8297                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8298                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8299                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8300                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8301                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8302                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8303                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8304                 </fields>
8305                 <links>
8306                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8307                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8308                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8309                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8310                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8311                 </links>
8312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8313                         <actions>
8314                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8315                         </actions>
8316                 </permacrud>
8317         </class>
8318
8319         <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">
8320                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8321                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8322                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8323                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8324                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8325                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8326                 </fields>
8327                 <links>
8328                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8329                 </links>
8330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8331                         <actions>
8332                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8333                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8334                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8335                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8336                         </actions>
8337                 </permacrud>
8338         </class>
8339
8340         <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">
8341                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8342                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8343                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8344                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8345                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8346                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8347                         <field reporter:label="State" name="state" reporter:datatype="text" />
8348                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8349                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8350                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8351                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8352                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8353                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8354                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8355                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8356                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8357                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8358                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8359                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8360                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8361                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8362                 </fields>
8363                 <links>
8364                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8365                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8366                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8367                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8368                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8369                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8370                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8371                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8372                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8373                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8374                 </links>
8375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8376                         <actions>
8377                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8378                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8379                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8380                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8381                         </actions>
8382                 </permacrud>
8383         </class>
8384
8385         <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">
8386                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8387                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8388                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8389                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8390                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8391                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8392                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8393                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8394                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8395                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8396                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8397                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8398                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8399                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8400                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8401                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8402                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8403                 </fields>
8404                 <links>
8405                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8406                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8407                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8408                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8409                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8410                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8411                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8412                 </links>
8413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8414             <actions>
8415                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8416             </actions>
8417                 </permacrud>
8418         </class>
8419
8420         <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">
8421                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8422                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8423                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8424                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8425                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8426                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8427                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8428                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8429                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8430                 </fields>
8431                 <links>
8432                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8433                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8434                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8435                 </links>
8436                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8437             <actions>
8438                 <create permission="CREATE_PURCHASE_ORDER">
8439                     <context link="purchase_order" field="ordering_agency"/>
8440                 </create>
8441                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8442                     <context link="purchase_order" field="ordering_agency"/>
8443                 </retrieve>
8444                 <update permission="CREATE_PURCHASE_ORDER">
8445                     <context link="purchase_order" field="ordering_agency"/>
8446                 </update>
8447                 <delete permission="CREATE_PURCHASE_ORDER">
8448                     <context link="purchase_order" field="ordering_agency"/>
8449                 </delete>
8450             </actions>
8451                 </permacrud>
8452         </class>
8453
8454         <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">
8455                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8456                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8457                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8458                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8459                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8460                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8461                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8462                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8463                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8464                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8465                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8466                 </fields>
8467                 <links>
8468                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8469                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8470                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8471                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8472                 </links>
8473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8474             <actions>
8475                 <create permission="CREATE_PURCHASE_ORDER">
8476                     <context link="purchase_order" field="ordering_agency"/>
8477                 </create>
8478                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8479                     <context link="purchase_order" field="ordering_agency"/>
8480                 </retrieve>
8481                 <update permission="CREATE_PURCHASE_ORDER">
8482                     <context link="purchase_order" field="ordering_agency"/>
8483                 </update>
8484                 <delete permission="CREATE_PURCHASE_ORDER">
8485                     <context link="purchase_order" field="ordering_agency"/>
8486                 </delete>
8487             </actions>
8488                 </permacrud>
8489         </class>
8490
8491         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8492                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8493                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8494                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8495                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8496                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8497                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8498                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8499                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8500                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8501                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8502                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8503                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8504                         <field reporter:label="State" name="state" reporter:datatype="text" />
8505                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8506                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8507                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8508                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8509                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8510                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8511                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8512                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8513                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8514                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8515                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8516                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8517                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8518                 </fields>
8519                 <links>
8520                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8521                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8522                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8523                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8524                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8525                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8526                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8527                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8528                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8529                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8530                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8531                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8532                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8533                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8534                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8535                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8536                 </links>
8537                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8538                         <actions>
8539                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8540                                         <context link="purchase_order" field="ordering_agency"/>
8541                                         <context link="picklist" field="org_unit"/>
8542                                 </retrieve>
8543                         </actions>
8544                 </permacrud>
8545         </class>
8546
8547         <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">
8548                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8549                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8550                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8551                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8552                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8553                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8554                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8555                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8556                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8557                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8558                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8559                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8560                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8561                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8562                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8563                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8564                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8565                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8566                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8567                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8568                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8569                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8570                 </fields>
8571                 <links>
8572                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8573                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8574                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8575                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8576                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8577                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8578                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8579                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8580                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8581                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8582                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8583                 </links>
8584                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8585                         <actions>
8586                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8587                                         <context link="purchase_order" field="ordering_agency"/>
8588                                         <context link="picklist" field="org_unit"/>
8589                                 </retrieve>
8590                         </actions>
8591                 </permacrud>
8592         </class>
8593
8594         <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">
8595                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8596                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8597                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8598                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8599                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8600                 </fields>
8601                 <links>
8602                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8603                 </links>
8604                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8605                         <actions>
8606                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8607                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8608                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8609                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8610                         </actions>
8611                 </permacrud>
8612         </class>
8613
8614         <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">
8615                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8616                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8617                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8618                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8619                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8620                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8621                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8622                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8623                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8624                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8625                 </fields>
8626                 <links>
8627                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8628                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8629                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8630                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8631                 </links>
8632         </class>
8633
8634         <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">
8635                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8636                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8637                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8638                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8639                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8640                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8641                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8642                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8643                 </fields>
8644                 <links>
8645                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8646                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8647                 </links>
8648         </class>
8649
8650         <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">
8651                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8652                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8653                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8654                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8655                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8656                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8657                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8658                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8659                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8660                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8661                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8662                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8663                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8664                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8665                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8666                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8667                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8668                 </fields>
8669                 <links>
8670                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8671                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8672                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8673                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8674                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8675                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8676                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8677                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8678                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8679                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8680                 </links>
8681         </class>
8682
8683         <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">
8684                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8685                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8686                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8687                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8688                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8689                 </fields>
8690                 <links/>
8691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8692                         <actions>
8693                                 <retrieve />
8694                         </actions>
8695                 </permacrud>
8696         </class>
8697
8698         <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">
8699                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8700                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8701                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8702                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8703                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8704                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8705             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8706                 </fields>
8707                 <links/>
8708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8709             <actions>
8710                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8711                 <retrieve />
8712                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8713                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8714             </actions>
8715         </permacrud>
8716         </class>
8717
8718         <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">
8719                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8720                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8721                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8722                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8723                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8724                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8725                 </fields>
8726                 <links/>
8727         </class>
8728         <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">
8729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8730                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8731                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8732                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8733                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8734                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8735                 </fields>
8736                 <links>
8737                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8738                 </links>
8739         </class>
8740
8741         <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">
8742             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8743                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8744                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8745                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8746                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8747                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8748                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8749         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8750
8751             </fields>
8752             <links>
8753                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8754             </links>
8755             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8756                 <actions>
8757                     <create permission="ADMIN_PROVIDER">
8758                         <context link="provider" field="owner"/>
8759                     </create>
8760                     <retrieve permission="ADMIN_PROVIDER">
8761                         <context link="provider" field="owner"/>
8762                     </retrieve>
8763                     <update permission="ADMIN_PROVIDER">
8764                         <context link="provider" field="owner"/>
8765                     </update>
8766                     <delete permission="ADMIN_PROVIDER">
8767                         <context link="provider" field="owner"/>
8768                     </delete>
8769                 </actions>
8770             </permacrud>
8771         </class>
8772         
8773         <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">
8774             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8775                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8776                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8777                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8778                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8779             </fields>
8780             <links>
8781                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8782             </links>
8783             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8784                 <actions>
8785                     <create permission="ADMIN_PROVIDER">
8786                         <context link="provider" field="owner"/>
8787                     </create>
8788                     <retrieve permission="ADMIN_PROVIDER">
8789                         <context link="provider" field="owner"/>
8790                     </retrieve>
8791                     <update permission="ADMIN_PROVIDER">
8792                         <context link="provider" field="owner"/>
8793                     </update>
8794                     <delete permission="ADMIN_PROVIDER">
8795                         <context link="provider" field="owner"/>
8796                     </delete>
8797                 </actions>
8798             </permacrud>
8799         </class>
8800         
8801         <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">
8802             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8803                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8804                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8805                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8806                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8807                 </fields>
8808                 <links/>
8809         </class>
8810
8811         <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">
8812                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8813                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8814                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8815                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8816                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8817                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8818                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8819                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8820                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8821                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8822                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8823                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8824                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8825                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8826                 </fields>
8827                 <links>
8828                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8829                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8830                 </links>
8831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8832             <actions>
8833                 <create permission="ADMIN_PROVIDER">
8834                     <context link="provider" field="owner"/>
8835                 </create>
8836                 <retrieve permission="ADMIN_PROVIDER">
8837                     <context link="provider" field="owner"/>
8838                 </retrieve>
8839                 <update permission="ADMIN_PROVIDER">
8840                     <context link="provider" field="owner"/>
8841                 </update>
8842                 <delete permission="ADMIN_PROVIDER">
8843                     <context link="provider" field="owner"/>
8844                 </delete>
8845             </actions>
8846         </permacrud>
8847         </class>
8848
8849         <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">
8850                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8851                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8852                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8853                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8854                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8855                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8856                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8857                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8858                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8859                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8860                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8861                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8862                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8863                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8864                 </fields>
8865                 <links>
8866                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8867                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8868                 </links>
8869         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8870             <actions>
8871                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8872                     <context link="account" jump="provider" field="owner"/>
8873                 </retrieve>
8874                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8875                     <context link="account" jump="provider" field="owner"/>
8876                 </update>
8877                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8878                     <context link="account" jump="provider" field="owner"/>
8879                 </delete>
8880             </actions>
8881         </permacrud>
8882         </class>
8883
8884
8885         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8886                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8887                         <field name="id" reporter:datatype="id" />
8888                         <field name="parent" reporter:datatype="link"/>
8889                         <field name="owner" reporter:datatype="link"/>
8890                         <field name="create_time" reporter:datatype="timestamp"/>
8891                         <field name="name" reporter:datatype="text"/>
8892                         <field name="shared" reporter:datatype="bool"/>
8893                         <field name="share_with" reporter:datatype="link"/>
8894                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8895                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8896                 </fields>
8897                 <links>
8898                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8899                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8900                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8901                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8902                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8903                 </links>
8904         </class>
8905         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8906                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8907                         <field name="id" reporter:datatype="id" />
8908                         <field name="parent" reporter:datatype="link"/>
8909                         <field name="owner" reporter:datatype="link"/>
8910                         <field name="create_time" reporter:datatype="timestamp"/>
8911                         <field name="name" reporter:datatype="text"/>
8912                         <field name="shared" reporter:datatype="bool"/>
8913                         <field name="share_with" reporter:datatype="link"/>
8914                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8915                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8916                 </fields>
8917                 <links>
8918                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8919                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8920                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8921                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8922                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8923                 </links>
8924         </class>
8925         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8926                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8927                         <field name="id" reporter:datatype="id" />
8928                         <field name="parent" reporter:datatype="link"/>
8929                         <field name="owner" reporter:datatype="link"/>
8930                         <field name="create_time" reporter:datatype="timestamp"/>
8931                         <field name="name" reporter:datatype="text"/>
8932                         <field name="shared" reporter:datatype="bool"/>
8933                         <field name="share_with" reporter:datatype="link"/>
8934                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8935                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8936                 </fields>
8937                 <links>
8938                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8939                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8940                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8941                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8942                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8943                 </links>
8944         </class>
8945         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8946                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8947                         <field name="id" reporter:datatype="id" />
8948                         <field name="owner" reporter:datatype="link"/>
8949                         <field name="create_time" reporter:datatype="timestamp"/>
8950                         <field name="name" reporter:datatype="text"/>
8951                         <field name="data" reporter:datatype="text"/>
8952                         <field name="folder" reporter:datatype="link"/>
8953                         <field name="description" reporter:datatype="text"/>
8954                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8955                 </fields>
8956                 <links>
8957                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8958                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8959                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8960                 </links>
8961         </class>
8962         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8963                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8964                         <field name="id" reporter:datatype="id" />
8965                         <field name="owner" reporter:datatype="link"/>
8966                         <field name="create_time" reporter:datatype="timestamp"/>
8967                         <field name="template" reporter:datatype="link"/>
8968                         <field name="data" reporter:datatype="text"/>
8969                         <field name="folder" reporter:datatype="link"/>
8970                         <field name="recur" reporter:datatype="bool"/>
8971                         <field name="recurrence" reporter:datatype="interval"/>
8972                         <field name="name" reporter:datatype="text"/>
8973                         <field name="description" reporter:datatype="text"/>
8974                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8975                 </fields>
8976                 <links>
8977                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8978                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8979                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8980                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8981                 </links>
8982         </class>
8983         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8984                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8985                         <field name="id" reporter:datatype="id" />
8986                         <field name="runner" reporter:datatype="link"/>
8987                         <field name="start_time" reporter:datatype="timestamp"/>
8988                         <field name="complete_time" reporter:datatype="timestamp"/>
8989                         <field name="run_time" reporter:datatype="timestamp"/>
8990                         <field name="email" reporter:datatype="text"/>
8991                         <field name="excel_format" reporter:datatype="bool"/>
8992                         <field name="csv_format" reporter:datatype="bool"/>
8993                         <field name="html_format" reporter:datatype="bool"/>
8994                         <field name="error_code" reporter:datatype="int"/>
8995                         <field name="error_text" reporter:datatype="text"/>
8996                         <field name="report" reporter:datatype="link"/>
8997                         <field name="folder" reporter:datatype="link"/>
8998                         <field name="chart_pie" reporter:datatype="bool"/>
8999                         <field name="chart_bar" reporter:datatype="bool"/>
9000                         <field name="chart_line" reporter:datatype="bool"/>
9001                 </fields>
9002                 <links>
9003                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9004                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9005                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9006                 </links>
9007         </class>
9008         <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">
9009                 <fields oils_persist:primary="id">
9010                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9011                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9012                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9013                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9014                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9015                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9016                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9017                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9018                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9019                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9020                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9021                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9022                 </fields>
9023                 <links>
9024                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9025                 </links>
9026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9027                         <actions>
9028                                 <retrieve />
9029                         </actions>
9030                 </permacrud>
9031         </class>
9032         <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">
9033                 <fields oils_persist:primary="id">
9034                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9035                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9036                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9037                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9038                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9039                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9040                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9041                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9042                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9043                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9044                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9045                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9046                 </fields>
9047                 <links>
9048                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9049                 </links>
9050         </class>
9051         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9052                 <fields oils_persist:primary="id">
9053                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9054                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9055                         <field reporter:label="Fingerprint" name="fingerprint" />
9056                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9057                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9058                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9059                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9060                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9061                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9062                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9063                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9064                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9065                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9066                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9067                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9068                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9069                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9070                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9071                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9072                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9073                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9074                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9075                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9076                 </fields>
9077                 <links>
9078                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9079                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9080                 </links>
9081         </class>
9082         <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">
9083                 <fields oils_persist:primary="id">
9084                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9085                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9086                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9087                 </fields>
9088                 <links>
9089                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9090                 </links>
9091         </class>
9092         <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">
9093                 <fields oils_persist:primary="id">
9094                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9095                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9096                 </fields>
9097                 <links>
9098                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9099                 </links>
9100         </class>
9101         <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">
9102                 <fields oils_persist:primary="id">
9103                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9104                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9105                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9106                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9107                 </fields>
9108                 <links>
9109                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9110                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9111                 </links>
9112         </class>
9113         <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">
9114                 <fields oils_persist:primary="xact">
9115                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9116                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9117                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9118                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9119                 </fields>
9120                 <links>
9121                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9122                 </links>
9123         </class>
9124         <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">
9125                 <fields oils_persist:primary="xact">
9126                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9127                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9128                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9129                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9130                 </fields>
9131                 <links>
9132                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9133                 </links>
9134         </class>
9135         <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)">
9136                 <fields oils_persist:primary="id">
9137                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9138                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9139                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9140                 </fields>
9141                 <links>
9142                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9143                 </links>
9144         </class>
9145         <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">
9146                 <fields oils_persist:primary="id">
9147                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9148                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9149                 </fields>
9150                 <links>
9151                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9152                 </links>
9153         </class>
9154         <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">
9155                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9156                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9157                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9158                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9159                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9160                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9161                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9162                 </fields>
9163                 <links>
9164                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9165                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9166                 </links>
9167                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9168                         <actions>
9169                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9170                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9171                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9172                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9173                         </actions>
9174                 </permacrud>
9175         </class>
9176         <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">
9177                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9178                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9179                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9180                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9181                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9182                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9183                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9184                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9185                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9186                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9187                 </fields>
9188                 <links>
9189                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9190                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9191                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9192                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9193                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9194                 </links>
9195                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9196                         <actions>
9197                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9198                                         <context link="formula" field="owner"/>
9199                                 </create>
9200                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9201                                         <context link="formula" field="owner"/>
9202                                 </retrieve>
9203                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9204                                         <context link="formula" field="owner"/>
9205                                 </update>
9206                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9207                                         <context link="formula" field="owner"/>
9208                                 </delete>
9209                         </actions>
9210                 </permacrud>
9211         </class>
9212
9213         <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">
9214                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9215                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9216                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9217                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9218                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9219                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9220                 </fields>
9221                 <links>
9222                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9223                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9224                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9225                 </links>
9226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9227                         <actions>
9228                                 <create permission="CREATE_PURCHASE_ORDER">
9229                                         <context link="formula" field="owner"/>
9230                 </create>
9231                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9232                                         <context link="formula" field="owner"/>
9233                 </retrieve>
9234                                 <update permission="CREATE_PURCHASE_ORDER">
9235                                         <context link="formula" field="owner"/>
9236                 </update>
9237                                 <delete permission="CREATE_PURCHASE_ORDER">
9238                                         <context link="formula" field="owner"/>
9239                 </delete>
9240                         </actions>
9241                 </permacrud>
9242         </class>
9243
9244         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9245                 <fields oils_persist:primary="id">
9246                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9247                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9248                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9249                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9250                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9251                 </fields>
9252                 <links>
9253                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9254                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9255                 </links>
9256         </class>
9257
9258         <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">
9259                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9260                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9261                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9262                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9263                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9264                 </fields>
9265                 <links>
9266                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9267                 </links>
9268                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9269                         <actions>
9270                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9271                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9272                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9273                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9274                         </actions>
9275                 </permacrud>
9276         </class>
9277
9278         <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">
9279                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9280                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9281                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9282                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9283                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9284                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9285                 </fields>
9286                 <links>
9287                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9288                 </links>
9289                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9290                         <actions>
9291                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9292                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9293                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9294                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9295                         </actions>
9296                 </permacrud>
9297         </class>
9298
9299         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9300                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9301                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9302                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9303                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9304                 </fields>
9305                 <links>
9306                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9307                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9308                 </links>
9309         </class>
9310
9311         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9312                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9313                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9314                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9315                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9316                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9317                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9318                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9319                 </fields>
9320                 <links>
9321                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9322                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9323                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9324                 </links>
9325         </class>
9326
9327         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9328                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9329                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9330                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9331                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9332                 </fields>
9333                 <links>
9334                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9335                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9336                 </links>
9337         </class>
9338
9339         <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">
9340                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9341                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9342                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9343                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9344                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9345                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9346                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9347                 </fields>
9348                 <links>
9349                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9350                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9351                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9352                 </links>
9353         </class>
9354
9355         <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">
9356                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9357                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9358                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9359                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9360                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9361                 </fields>
9362                 <links>
9363                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9364                 </links>
9365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9366             <actions>
9367                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9368                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9369                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9370                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9371             </actions>
9372                 </permacrud>
9373         </class>
9374
9375         <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">
9376                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9377                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9378                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9379                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9380                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9381                 </fields>
9382                 <links>
9383                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9384                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9385                 </links>
9386                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9387                         <actions>
9388                                 <create permission="ADMIN_CLAIM_POLICY">
9389                                         <context link="claim_policy" field="org_unit"/>
9390                 </create>
9391                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9392                                         <context link="claim_policy" field="org_unit"/>
9393                 </retrieve>
9394                                 <update permission="ADMIN_CLAIM_POLICY">
9395                                         <context link="claim_policy" field="org_unit"/>
9396                 </update>
9397                                 <delete permission="ADMIN_CLAIM_POLICY">
9398                                         <context link="claim_policy" field="org_unit"/>
9399                 </delete>
9400                         </actions>
9401                 </permacrud>
9402         </class>
9403
9404     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9405         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9406             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9407             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9408             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9409             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9410             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9411             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9412             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9413             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9414             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9415             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9416             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9417             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9418             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9419             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9420             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9421             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9422         </fields>
9423         <links>
9424             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9425         </links>
9426     </class>
9427
9428     <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">
9429         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9430             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9431             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9432             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9433             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9434             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9435         </fields>
9436     </class>
9437
9438     <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">
9439         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9440             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9441             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9442             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9443             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9444             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9445             <field reporter:label="City" name="city" reporter:datatype="text"/>
9446             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9447             <field reporter:label="State" name="state" reporter:datatype="text"/>
9448             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9449             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9450             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9451         </fields>
9452     </class>
9453
9454     <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">
9455         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9456             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9457             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9458             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9459             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9460             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9461             <field reporter:label="City" name="city" reporter:datatype="text"/>
9462             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9463             <field reporter:label="State" name="state" reporter:datatype="text"/>
9464             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9465             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9466             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9467         </fields>
9468     </class>
9469
9470     <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">
9471         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9472             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9473             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9474             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9475             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9476             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9477             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9478         </fields>
9479     </class>
9480
9481         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9482                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9483                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9484                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9485                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9486                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9487                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9488                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9489                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9490                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9491                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9492                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9493                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9494                 </fields>
9495                 <links>
9496                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9497                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9498                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9499                 </links>
9500         </class>
9501
9502         <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">
9503                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9504                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9505                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9506                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9507                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9508                 </fields>
9509                 <links>
9510                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9511                 </links>
9512         </class>
9513
9514     <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">
9515         <fields>
9516             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9517             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9518             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9519         </fields>
9520                 <links>
9521                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9522                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9523                 </links>
9524     </class>
9525
9526     <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">
9527         <fields>
9528             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9529             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9530         </fields>
9531                 <links>
9532                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9533                 </links>
9534     </class>
9535
9536     <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">
9537         <fields>
9538             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9539             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9540             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9541         </fields>
9542                 <links>
9543                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9544                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9545                 </links>
9546     </class>
9547
9548     <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">
9549         <fields>
9550             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9551             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9552         </fields>
9553                 <links>
9554                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9555                 </links>
9556     </class>
9557
9558     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9559                 <oils_persist:source_definition>
9560
9561             SELECT  DISTINCT l.*
9562               FROM  action.unfulfilled_hold_loops l
9563                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9564               WHERE l.count = m.max
9565
9566                 </oils_persist:source_definition>
9567         <fields>
9568             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9569             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9570             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9571         </fields>
9572                 <links>
9573                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9574                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9575                 </links>
9576     </class>
9577
9578         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9579                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9580                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9581                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9582                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9583                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9584                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9585                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9586                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9587                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9588                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9589                 </fields>
9590                 <links>
9591                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9592                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9593                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9594                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9595                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9596                 </links>
9597         </class>
9598
9599         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9600                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9601                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9602                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9603                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9604                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9605                 </fields>
9606                 <links>
9607                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9608                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9609                 </links>
9610         </class>
9611
9612         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9613                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9614                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9615                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9616                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9617                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9618                 </fields>
9619                 <links>
9620                 </links>
9621         </class>
9622
9623         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9624                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9625                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9626                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9627                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9628                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9629                 </fields>
9630                 <links>
9631                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9632                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9633                 </links>
9634         </class>
9635         
9636         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9637                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9638                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9639                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9640                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9641                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9642                 </fields>
9643                 <links>
9644                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9645                 </links>
9646         </class>
9647         
9648         <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">
9649                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9650                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9651                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9652                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9653                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9654                 </fields>
9655                 <links>
9656                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9657                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9658                 </links>
9659         </class>
9660
9661         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9662                 <fields oils_persist:primary="name">
9663                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9664                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9665                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9666                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9667                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9668                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9669                 </fields>
9670                 <links>
9671                 </links>
9672         </class>
9673
9674         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9675                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9676                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9677                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9678                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9679                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9680                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9681                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9682                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9683                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9684                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9685                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9686                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9687                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9688                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9689                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9690                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9691                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9692                 </fields>
9693                 <links>
9694                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9695                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9696                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9697                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9698                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9699                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9700                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9701                 </links>
9702         </class>
9703
9704         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9705                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9706                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9707                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9708                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9709                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9710                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9711                 </fields>
9712                 <links>
9713                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9714                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9715                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9716                 </links>
9717         </class>
9718
9719         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9720                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9721                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9722                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9723                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9724                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9725                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9726                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9727                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9728                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9729                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9730                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9731                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9732                 </fields>
9733                 <links>
9734                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9735                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9736                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9737                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9738                 </links>
9739         </class>
9740
9741         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9742                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9743                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9744                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9745                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9746                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9747                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9748                 </fields>
9749                 <links>
9750                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9751                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9752                 </links>
9753         </class>
9754
9755         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9756                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9757                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9758                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9759                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9760                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9761                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9762                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9763                 </fields>
9764                 <links>
9765                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9766                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9767                 </links>
9768         </class>
9769
9770         <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">
9771                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9772                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9773                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9774                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9775                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9776                 </fields>
9777                 <links>
9778                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9779                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9780                 </links>
9781         </class>
9782
9783         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9784                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9785                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9786                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9787                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9788                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9789                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9790                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9791                 </fields>
9792                 <links>
9793                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9794                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9795                 </links>
9796         </class>
9797
9798         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9799                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9800                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9801                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9802                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9803                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9804                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9805                 </fields>
9806                 <links>
9807                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9808                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9809                 </links>
9810         </class>
9811
9812         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9813                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9814                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9815                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9816                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9817                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9818                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9819                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9820                 </fields>
9821                 <links>
9822                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9823                 </links>
9824         </class>
9825
9826         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9827                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9828                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9829                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9830                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9831                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9832                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9833                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9834                 </fields>
9835                 <links>
9836                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9837                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9838                 </links>
9839         </class>
9840
9841         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9842                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9843                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9844                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9845                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9846                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9847                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9848                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9849                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9850                 </fields>
9851                 <links>
9852                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9853                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9854                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9855                 </links>
9856         </class>
9857
9858         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9859                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9860                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9861                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9862                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9863                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9864                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9865                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9866                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9867                 </fields>
9868                 <links>
9869                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9870                 </links>
9871         </class>
9872
9873         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9874                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9875                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9876                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9877                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9878                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9879                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9880                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9881                 </fields>
9882                 <links>
9883                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9884                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9885                 </links>
9886         </class>
9887
9888         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9889                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9890                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9891                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9892                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9893                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9894                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9895                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9896                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9897                 </fields>
9898                 <links>
9899                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9900                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9901                 </links>
9902         </class>
9903
9904         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9905                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9906                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9907                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9908                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9909                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9910                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9911                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9912                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9913                 </fields>
9914                 <links>
9915                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9916                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9917                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9918                 </links>
9919         </class>
9920
9921         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9922                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9923                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9924                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9925                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9926                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9927                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9928                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9929                 </fields>
9930                 <links>
9931                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9932                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9933                 </links>
9934         </class>
9935
9936         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9937                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9938                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9939                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9940                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9941                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9942                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9943                 </fields>
9944                 <links>
9945                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9946                 </links>
9947         </class>
9948
9949         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9950                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9951                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9952                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9953                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9954                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9955                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9956                 </fields>
9957                 <links>
9958                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9959                 </links>
9960         </class>
9961
9962         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9963                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9964                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9965                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9966                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9967                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9968                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9969                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9970                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9971                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9972                 </fields>
9973                 <links>
9974                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9975                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9976                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9977                 </links>
9978         </class>
9979
9980         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9981                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9982                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9983                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9984                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9985                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9986                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9987                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9988                 </fields>
9989                 <links>
9990                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9991                 </links>
9992         </class>
9993
9994         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9995                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9996                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9997                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9998                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9999                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10000                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10001                 </fields>
10002                 <links>
10003                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10004                 </links>
10005         </class>
10006
10007         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10008                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10009                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10010                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10011                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10012                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10013                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10014                 </fields>
10015                 <links>
10016                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10017                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10018                 </links>
10019         </class>
10020
10021         <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">
10022                 <fields oils_persist:primary="id">
10023                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10024                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10025                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10026                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10027                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10028                 </fields>
10029                 <links>
10030                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10031                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10032                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10033                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10034                 </links>
10035         </class>
10036
10037         <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">
10038                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10039                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10040                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10041                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10042                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10043                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10044                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10045                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10046                 </fields>
10047                 <links/>
10048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10049                         <actions>
10050                                 <retrieve/>
10051                         </actions>
10052                 </permacrud>
10053         </class>
10054
10055         <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">
10056                 <fields oils_persist:primary="ptype_key">
10057                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10058                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10059                 </fields>
10060                 <links/>
10061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10062                         <actions>
10063                                 <retrieve/>
10064                         </actions>
10065                 </permacrud>
10066         </class>
10067
10068         <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">
10069                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10070                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10071                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10072                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10073                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10074                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10075                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10076                 </fields>
10077                 <links>
10078                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10079                 </links>
10080                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10081                         <actions>
10082                                 <retrieve/>
10083                         </actions>
10084                 </permacrud>
10085         </class>
10086
10087         <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">
10088                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10089                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10090                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10091                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10092                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10093                 </fields>
10094                 <links>
10095                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10096                 </links>
10097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10098                         <actions>
10099                                 <retrieve/>
10100                         </actions>
10101                 </permacrud>
10102         </class>
10103
10104     <class
10105         id="uvs"
10106         controller="open-ils.cstore open-ils.pcrud"
10107         oils_obj:fieldmapper="url_verify::session"
10108         oils_persist:tablename="url_verify.session"
10109         reporter:label="URL Verification Session"
10110     >
10111         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10112             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10113             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10114                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10115             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10116             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10117             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10118             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10119             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10120             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10121         </fields>
10122
10123         <links>
10124             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10125             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10126             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10127             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10128             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10129         </links>
10130
10131         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10132             <actions>
10133                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10134             </actions>
10135         </permacrud>
10136
10137     </class>
10138
10139     <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">
10140         <oils_persist:source_definition>
10141             SELECT
10142                 cbrebi.id AS id,  -- so we can have a pkey in our view
10143                 uvs.id AS session,
10144                 uvs.owning_lib,
10145                 cbrebi.target_biblio_record_entry
10146             FROM url_verify.session uvs
10147             JOIN container.biblio_record_entry_bucket cbreb
10148                 ON (uvs.container = cbreb.id)
10149             JOIN container.biblio_record_entry_bucket_item cbrebi
10150                 ON (cbrebi.bucket = cbreb.id)
10151         </oils_persist:source_definition>
10152         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10153             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10154             <field reporter:label="Session" name="session" reporter:datatype="link" />
10155             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10156             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10157         </fields>
10158         <links>
10159             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10160             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10161             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10162         </links>
10163         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10164             <actions>
10165                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10166             </actions>
10167         </permacrud>
10168     </class>
10169
10170     <class
10171         id="uvus"
10172         controller="open-ils.cstore open-ils.pcrud"
10173         oils_obj:fieldmapper="url_verify::url_selector"
10174         oils_persist:tablename="url_verify.url_selector"
10175         reporter:label="URL Verification URL Selector"
10176     >
10177         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10178             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10179             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10180                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10181             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10182         </fields>
10183
10184         <links>
10185             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10186             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10187         </links>
10188
10189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10190             <actions>
10191                 <create permission="URL_VERIFY">
10192                     <context link="session" field="owning_lib"/>
10193                 </create>
10194                 <retrieve permission="URL_VERIFY">
10195                     <context link="session" field="owning_lib"/>
10196                 </retrieve>
10197                 <update permission="URL_VERIFY">
10198                     <context link="session" field="owning_lib"/>
10199                 </update>
10200                 <delete permission="URL_VERIFY">
10201                     <context link="session" field="owning_lib"/>
10202                 </delete>
10203             </actions>
10204         </permacrud>
10205
10206     </class>
10207
10208     <class
10209         id="uvu"
10210         controller="open-ils.cstore open-ils.pcrud"
10211         oils_obj:fieldmapper="url_verify::url"
10212         oils_persist:tablename="url_verify.url"
10213         reporter:label="URL Verification URL"
10214     >
10215         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10216             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10217                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10218                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10219                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10220                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10221             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10222             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10223             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10224             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10225             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10226             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10227             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10228             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10229             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10230             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10231             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10232             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10233             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10234         </fields>
10235
10236         <links>
10237             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10238             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10239             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10240             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10241             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10242         </links>
10243
10244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10245             <actions>
10246                 <create permission="URL_VERIFY">
10247                     <context link="session" field="owning_lib"/>
10248                 </create>
10249                 <retrieve permission="URL_VERIFY">
10250                     <context link="session" field="owning_lib"/>
10251                 </retrieve>
10252                 <update permission="URL_VERIFY">
10253                     <context link="session" field="owning_lib"/>
10254                 </update>
10255                 <delete permission="URL_VERIFY">
10256                     <context link="session" field="owning_lib"/>
10257                 </delete>
10258             </actions>
10259         </permacrud>
10260
10261     </class>
10262
10263     <class
10264         id="uvva"
10265         controller="open-ils.cstore open-ils.pcrud"
10266         oils_obj:fieldmapper="url_verify::verification_attempt"
10267         oils_persist:tablename="url_verify.verification_attempt"
10268         reporter:label="URL Verification Attempt"
10269     >
10270         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10271             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10272                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10273                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10274             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10275             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10276         </fields>
10277
10278         <links>
10279             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10280             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10281         </links>
10282
10283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10284             <actions>
10285                 <create permission="URL_VERIFY">
10286                     <context link="session" field="owning_lib"/>
10287                 </create>
10288                 <retrieve permission="URL_VERIFY">
10289                     <context link="session" field="owning_lib"/>
10290                 </retrieve>
10291                 <update permission="URL_VERIFY">
10292                     <context link="session" field="owning_lib"/>
10293                 </update>
10294                 <delete permission="URL_VERIFY">
10295                     <context link="session" field="owning_lib"/>
10296                 </delete>
10297             </actions>
10298         </permacrud>
10299
10300     </class>
10301
10302     <class
10303         id="uvuv"
10304         controller="open-ils.cstore open-ils.pcrud"
10305         oils_obj:fieldmapper="url_verify::url_verification"
10306         oils_persist:tablename="url_verify.url_verification"
10307         reporter:label="URL Verification"
10308     >
10309         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10310             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10311                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10312                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10313             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10314             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10315             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10316             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10317                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10318         </fields>
10319
10320         <links>
10321             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10322             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10323             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10324         </links>
10325
10326         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10327             <actions>
10328                 <create permission="URL_VERIFY">
10329                     <context link="attempt" jump="session" field="owning_lib"/>
10330                 </create>
10331                 <retrieve permission="URL_VERIFY">
10332                     <context link="attempt" jump="session" field="owning_lib"/>
10333                 </retrieve>
10334                 <update permission="URL_VERIFY">
10335                     <context link="attempt" jump="session" field="owning_lib"/>
10336                 </update>
10337                 <delete permission="URL_VERIFY">
10338                     <context link="attempt" jump="session" field="owning_lib"/>
10339                 </delete>
10340             </actions>
10341         </permacrud>
10342
10343     </class>
10344
10345         <class
10346                 id="cfdi"
10347                 controller="open-ils.cstore open-ils.pcrud"
10348                 oils_obj:fieldmapper="config::filter_dialog_interface"
10349                 oils_persist:tablename="config.filter_dialog_interface"
10350                 reporter:label="FilterDialog Interface">
10351                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10352                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10353                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10354                 </fields>
10355                 <links>
10356                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10357                 </links>
10358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10359                         <actions>
10360                                 <retrieve />
10361                         </actions>
10362                 </permacrud>
10363         </class>
10364
10365         <class
10366                 id="cfdfs"
10367                 controller="open-ils.cstore open-ils.pcrud"
10368                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10369                 oils_persist:tablename="config.filter_dialog_filter_set"
10370                 reporter:label="FilterDialog Filter Set">
10371                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10372                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10373                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10374                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10375                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10376                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10377                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10378                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10379                 </fields>
10380                 <links>
10381                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10382                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10383                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10384                 </links>
10385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10386                         <actions>
10387                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10388                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10389                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10390                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10391                         </actions>
10392                 </permacrud>
10393
10394         </class>
10395
10396         <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">
10397                 <fields oils_persist:primary="code">
10398                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10399                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10400                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10401                 </fields>
10402                 <links/>
10403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10404                         <actions>
10405                                 <retrieve/>
10406                         </actions>
10407                 </permacrud>
10408         </class>
10409
10410         <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">
10411                 <oils_persist:source_definition>
10412
10413             SELECT  b.id,
10414                     MAX(dcp.edit_date) AS last_delete_date
10415              FROM   biblio.record_entry b
10416                     JOIN asset.call_number cn ON (cn.record = b.id)
10417                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10418              WHERE  NOT b.deleted
10419              GROUP BY b.id
10420              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10421
10422                 </oils_persist:source_definition>
10423                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10424                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10425                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10426                 </fields>
10427                 <links>
10428                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10429                 </links>
10430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10431                         <actions>
10432                                 <retrieve/>
10433                         </actions>
10434                 </permacrud>
10435         </class>
10436
10437         <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">
10438                 <oils_persist:source_definition>
10439
10440             -- -- 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.
10441             -- -- 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
10442             -- -- may not.
10443             -- SELECT
10444             --     bre.id AS "bib_id",
10445             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10446             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10447             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10448             -- FROM (
10449                 SELECT
10450                     y.bre AS "id",
10451                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10452                     y.hold_count AS "hold_count",
10453                     (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"
10454                 FROM (
10455                         SELECT
10456                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10457                             COUNT(*) AS "hold_count"
10458                         FROM action.hold_request h
10459                         WHERE
10460                             cancel_time IS NULL
10461                             AND fulfillment_time IS NULL
10462                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10463                         GROUP BY 1
10464                     )y LEFT JOIN (
10465                         SELECT 
10466                             (SELECT id
10467                                 FROM biblio.record_entry 
10468                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10469                             ) AS "bre", 
10470                             COUNT(*) AS "copy_count"
10471                         FROM asset.copy
10472                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10473                         WHERE copy.holdable 
10474                             AND NOT copy.deleted 
10475                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10476                         GROUP BY 1
10477                     )x ON x.bre = y.bre
10478                 -- )z RIGHT JOIN (
10479                 --     SELECT id
10480                 --     FROM biblio.record_entry
10481                 --     WHERE NOT deleted
10482                 -- )bre ON (z.bib_id = bre.id)
10483                 
10484
10485                 </oils_persist:source_definition>
10486                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10487                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10488                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10489                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10490                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10491                 </fields>
10492                 <links>
10493                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10494                 </links>
10495                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10496                         <actions>
10497                                 <retrieve/>
10498                         </actions>
10499                 </permacrud>
10500         </class>
10501
10502         <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">
10503                 <oils_persist:source_definition>
10504             SELECT *,
10505                 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,
10506                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10507             FROM
10508                 (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
10509                     FROM
10510                         action.hold_request ahr
10511                         JOIN reporter.hold_request_record rhrr USING (id)
10512                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10513                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10514                     WHERE
10515                         ahr.cancel_time IS NULL
10516                         AND ahr.fulfillment_time IS NULL
10517                     GROUP BY bib_record, pickup_lib
10518                 )x
10519                 JOIN
10520                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10521                     FROM
10522                         action.hold_request ahr
10523                         JOIN reporter.hold_request_record rhrr USING (id)
10524                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10525                     WHERE
10526                         ahr.cancel_time IS NULL
10527                         AND ahr.fulfillment_time IS NULL
10528                     GROUP BY bib_record
10529                 )y
10530                 USING (id)
10531                 </oils_persist:source_definition>
10532                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10533                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10534                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10535                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10536                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10537                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10538                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10539                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10540                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10541                 </fields>
10542                 <links>
10543                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10544                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10545                 </links>
10546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10547                         <actions>
10548                                 <retrieve/>
10549                         </actions>
10550                 </permacrud>
10551         </class>
10552
10553         <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">
10554                 <oils_persist:source_definition>
10555             SELECT
10556                 ac.id,
10557                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10558                 MAX(actac.xact_start) AS last_circ
10559             FROM asset.copy ac
10560                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10561             GROUP BY ac.id
10562
10563             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10564             --SELECT
10565             --    ac.id,
10566             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10567             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10568             --FROM asset.copy ac
10569             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10570             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10571             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10572                 </oils_persist:source_definition>
10573                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10574                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10575                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10576                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10577                 </fields>
10578                 <links>
10579                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10580                 </links>
10581                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10582                         <actions>
10583                                 <retrieve/>
10584                         </actions>
10585                 </permacrud>
10586         </class>
10587
10588         <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">
10589                 <fields oils_persist:primary="id">
10590                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10591                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10592                 </fields>
10593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10594                         <actions>
10595                                 <retrieve/>
10596                         </actions>
10597                 </permacrud>
10598         </class>
10599
10600         <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">
10601                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10602                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10603                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10604                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10605                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10606                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10607                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10608                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10609                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10610                 </fields>
10611                 <links>
10612                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10613                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10614                 </links>
10615                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10616                         <actions>
10617                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10618                                 <retrieve/>
10619                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10620                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10621                         </actions>
10622                 </permacrud>
10623         </class>
10624
10625         <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">
10626                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10627                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10628                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10629                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10630                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10631                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10632                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10633                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10634                 </fields>
10635                 <links>
10636                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10637                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10638                 </links>
10639                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10640                         <actions>
10641                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10642                                 <retrieve/>
10643                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10644                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10645                         </actions>
10646                 </permacrud>
10647         </class>
10648
10649
10650         <!-- ********************************************************************************************************************* -->
10651         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10652         <!-- ********************************************************************************************************************* -->
10653         <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">
10654                 <fields oils_persist:primary="id">
10655                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10656                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10657                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10658                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10659                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10660                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10661                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10662                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10663                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10664                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10665                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10666                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10667                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10668                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10669                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10670                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10671                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10672                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10673                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10674                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10675                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10676                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10677                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10678                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10679                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10680                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10681                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10682                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10683                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10684                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10685                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10686                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10687                 </fields>
10688                 <links>
10689                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10690                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10691                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10692                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10693                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10694                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10695                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10696                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10697                 </links>
10698         </class>
10699
10700         <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">
10701                 <fields oils_persist:primary="id">
10702                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10703                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10704                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10705                 </fields>
10706                 <links>
10707                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10708                 </links>
10709         </class>
10710
10711         <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">
10712                 <fields oils_persist:primary="id">
10713                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10714                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10715                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10716                 </fields>
10717                 <links>
10718                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10719                 </links>
10720         </class>
10721
10722         <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">
10723                 <fields oils_persist:primary="id">
10724                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10725
10726                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10727                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10728                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10729
10730                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10731                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10732                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10733
10734                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10735                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10736
10737                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10738                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10739                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10740
10741                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10742                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10743
10744                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10745                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10746                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10747
10748                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10749                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10750                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10751
10752                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10753                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10754                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10755                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10756
10757                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10758                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10759
10760                 </fields>
10761                 <links>
10762                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10763                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10764                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10765                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10766                 </links>
10767         </class>
10768
10769         <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">
10770                 <oils_persist:source_definition>
10771
10772             SELECT
10773                 po.ordering_agency AS ordering_agency,
10774                 po.id AS purchase_order,
10775                 li.id AS lineitem,
10776                 lid.id AS lineitem_detail,
10777                 cpa.id AS claim_policy_action
10778             FROM
10779                 acq.lineitem_detail lid
10780                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10781                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10782                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10783                 JOIN acq.claim_policy_action cpa ON (
10784                     cpa.claim_policy = cp.id
10785
10786                     -- we only care about claim policy actions whose claim
10787                     -- interval we'd reached or exceeded
10788                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10789
10790                     -- filter out all claim policy actions where claim events
10791                     -- have occurred on or after the action's action_interval
10792                     AND NOT EXISTS (
10793                         SELECT 1
10794                         FROM
10795                             acq.claim_event evt
10796                             JOIN acq.claim claim ON (
10797                                 claim.id = evt.claim
10798                                 AND claim.lineitem_detail = lid.id
10799                             )
10800                         WHERE
10801                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10802                     )
10803                 )
10804             WHERE
10805                 lid.cancel_reason IS NULL
10806                 AND li.cancel_reason IS NULL -- belt/suspenders
10807                 AND po.cancel_reason IS NULL -- belt/suspenders
10808                 AND lid.recv_time IS NULL
10809                 AND po.state = 'on-order'
10810             ORDER BY 1, 2, 3, 4, 5
10811
10812                 </oils_persist:source_definition>
10813                 <fields>
10814                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10815                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10816                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10817                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10818                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10819                 </fields>
10820                 <links>
10821                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10822                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10823                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10824                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10825                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10826                 </links>
10827         </class>
10828         <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">
10829                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10830                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10831                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10832                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10833                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10834                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10835                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10836                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10837                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10838                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10839                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10840                 </fields>
10841                 <links>
10842                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10843                 </links>
10844     </class>
10845         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10846                 <oils_persist:source_definition>
10847             SELECT * FROM acq.lineitem_summary 
10848                                 WHERE item_count > (invoice_count + cancel_count)
10849         </oils_persist:source_definition>
10850                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10851                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10852                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10853                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10854                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10855                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10856                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10857                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10858                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10859                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10860                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10861                 </fields>
10862                 <links>
10863                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10864                 </links>
10865     </class>
10866         <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">
10867                 <oils_persist:source_definition>
10868
10869                         SELECT  t.*
10870                           FROM  action.transit_copy t
10871                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10872                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10873                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10874
10875                 </oils_persist:source_definition>
10876                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10877                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10878                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10879                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10880                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10881                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10882                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10883                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10884                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10885                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10886                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10887                 </fields>
10888                 <links>
10889                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10890                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10891                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10892                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10893                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10894                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10895                 </links>
10896         </class>
10897
10898     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10899                 <oils_persist:source_definition>
10900
10901         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10902                 SELECT
10903                         cp.id as copy,
10904                         COUNT(circ.id),
10905                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10906                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10907                 FROM
10908                         asset.copy cp
10909                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10910                 GROUP BY 1, 3, 4
10911                 UNION ALL
10912                 SELECT
10913                         cp.id as copy,
10914                         COUNT(circ.id),
10915                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10916                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10917                 FROM
10918                         asset.copy cp
10919                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10920                 GROUP BY 1, 3, 4
10921                 UNION ALL
10922                 SELECT
10923                         id as copy,
10924                         circ_count,
10925                         -1 AS year,
10926                         false as is_renewal
10927                 FROM
10928                         extend_reporter.legacy_circ_count
10929         )x GROUP BY 1, 3, 4
10930
10931                 </oils_persist:source_definition>
10932         <fields>
10933             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10934             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10935             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10936             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10937         </fields>
10938                 <links>
10939                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10940                 </links>
10941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10942                         <actions>
10943                                 <retrieve/>
10944                         </actions>
10945                 </permacrud>
10946     </class>
10947
10948         <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">
10949                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10950                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10951                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10952                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10953                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10954                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10955                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10956                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10957                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10958                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10959                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10960                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10961                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10962                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10963                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10964                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10965                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10966                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10967                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10968                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10969                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10970                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10971                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10972                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10973                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10974                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10975                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10976                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10977                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10978                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10979                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10980                 </fields>
10981                 <links>
10982                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10983                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10984                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10985                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10986                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10987                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10988                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10989                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10990                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10991                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10992                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10993                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10994                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10995                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10996                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10997                 </links>
10998         </class>
10999
11000     <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">
11001         <fields oils_persist:primary="id">
11002             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11003             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11004             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11005             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11006             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11007             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11008             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11009             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11010             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11011             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11012             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11013             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11014             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11015             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11016             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11017             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11018             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11019             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11020             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11021             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11022             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11023             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11024             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11025             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11026             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11027             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11028             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11029             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11030             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11031             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11032             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11033             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11034             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11035             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11036         </fields>
11037         <links>
11038             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11039             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11040             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11041             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11042             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11043             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11044             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11045             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11046         </links>
11047     </class>
11048
11049     <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">
11050         <fields oils_persist:primary="id">
11051             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11052             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11053             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11054             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11055         </fields>
11056         <links>
11057             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11058             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11059         </links>
11060     </class>
11061
11062     <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">
11063         <fields oils_persist:primary="owning_lib">
11064             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11065             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11066             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11067         </fields>
11068         <links>
11069             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11070         </links>
11071     </class>
11072
11073     <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">
11074         <fields oils_persist:primary="id">
11075             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11076             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11077             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11078             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11079             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11080         </fields>
11081         <links>
11082             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11083             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11084             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11085         </links>
11086     </class>
11087
11088     <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">
11089         <fields oils_persist:primary="circ_lib">
11090             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11091             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11092             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11093             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11094         </fields>
11095         <links>
11096             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11097             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11098         </links>
11099     </class>
11100
11101     <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">
11102         <fields oils_persist:primary="id">
11103             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11104             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11105             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11106             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11107             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11108         </fields>
11109         <links>
11110             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11111             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11112             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11113         </links>
11114     </class>
11115
11116     <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">
11117         <fields oils_persist:primary="home_ou">
11118             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11119             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11120             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11121             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11122         </fields>
11123         <links>
11124             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11125             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11126         </links>
11127     </class>
11128         <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">
11129                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11130                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11131                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11132                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11133                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11134                 </fields>
11135                 <links>
11136                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11137                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11138                 </links>
11139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11140                         <actions>
11141                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11142                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11143                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11144                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11145                         </actions>
11146                 </permacrud>
11147         </class>
11148         <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">
11149                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11150                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11151                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11152                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11153                 </fields>
11154                 <links>
11155                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11156                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11157                         </links>
11158                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11159                 <actions>
11160                                 <create permission="ADMIN_ACQ_FUND_TAG">
11161                                         <context link="tag" field="owner"/>
11162                                 </create>
11163                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11164                                         <context link="tag" field="owner"/>
11165                                 </retrieve>
11166                                 <update permission="ADMIN_ACQ_FUND_TAG">
11167                                         <context link="tag" field="owner"/>
11168                                 </update>
11169                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11170                                         <context link="tag" field="owner"/>
11171                                 </delete>
11172                         </actions>
11173                 </permacrud>
11174         </class>
11175         <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">
11176                 <oils_persist:source_definition><![CDATA[
11177                 SELECT
11178                         poi.purchase_order AS purchase_order,
11179                         ii.invoice AS invoice,
11180                         NULL AS lineitem,
11181                         poi.id AS po_item,
11182                         NULL AS picklist
11183                 FROM
11184                         acq.po_item poi
11185                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11186                 UNION SELECT
11187                         jub.purchase_order AS purchase_order,
11188                         ie.invoice AS invoice,
11189                         jub.id AS lineitem,
11190                         NULL AS po_item,
11191                         jub.picklist AS picklist
11192                 FROM
11193                         acq.lineitem jub
11194                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11195                 UNION SELECT
11196                         ii.purchase_order AS purchase_order,
11197                         ii.invoice AS invoice,
11198                         NULL AS lineitem,
11199                         NULL AS po_item,
11200                         NULL AS picklist
11201                 FROM
11202                         acq.invoice_item ii
11203                 WHERE ii.po_item IS NULL
11204                 UNION SELECT
11205                         ie.purchase_order AS purchase_order,
11206                         ie.invoice AS invoice,
11207                         NULL AS lineitem,
11208                         NULL AS po_item,
11209                         NULL AS picklist
11210                 FROM
11211                         acq.invoice_entry ie
11212                 WHERE ie.lineitem IS NULL
11213                 UNION SELECT
11214                         NULL AS purchase_order,
11215                         NULL AS invoice,
11216                         jub.id AS lineitem,
11217                         NULL AS po_item,
11218                         jub.picklist AS picklist
11219                 FROM
11220                         acq.lineitem jub
11221                 WHERE jub.purchase_order IS NULL
11222                 ]]></oils_persist:source_definition>
11223                 <fields>
11224                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11225                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11226                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11227                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11228                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11229                 </fields>
11230                 <links>
11231                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11232                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11233                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11234                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11235                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11236                 </links>
11237         </class>
11238         <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">
11239                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11240                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11241                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11242                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11243                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11244                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11245                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11246                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11247                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11248                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11249                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11250                 </fields>
11251                 <links>
11252                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11253                 </links>
11254                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11255                         <actions>
11256                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11257                                 <retrieve/>
11258                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11259                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11260                         </actions>
11261                 </permacrud>
11262         </class>
11263
11264         <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">
11265                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11266                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11267                         <field name="date_applied" reporter:datatype="timestamp"/>
11268                         <field name="org" reporter:datatype="org_unit"/>
11269                         <field name="original_value" reporter:datatype="text"/>
11270                         <field name="new_value" reporter:datatype="text"/>
11271                         <field name="field_name" reporter:datatype="link"/>
11272                 </fields>
11273                 <links>
11274                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11275                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11276                 </links>
11277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11278                         <actions>
11279                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11280                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11281                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11282                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11283                         </actions>
11284                 </permacrud>
11285         </class>
11286         <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">
11287                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11288                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11289                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11290                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11291                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11292                 </fields>
11293                 <links>
11294                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11295                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11296                 </links>
11297         </class>
11298         <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">
11299                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11300                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11301                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11302                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11303                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11304                 </fields>
11305                 <links>
11306                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11307                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11308                 </links>
11309         </class>
11310         <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">
11311                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11312                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11313                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11314                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11315                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11316                 </fields>
11317                 <links>
11318                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11319                 </links>
11320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11321                         <actions>
11322                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11323                                 <retrieve/>
11324                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11325                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11326                         </actions>
11327                 </permacrud>
11328         </class>
11329         <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">
11330                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11331                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11332                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11333                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11334                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11335                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11336                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11337                 </fields>
11338                 <links>
11339                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11340                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11341                 </links>
11342                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11343                         <actions>
11344                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11345                                 <retrieve/>
11346                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11347                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11348                         </actions>
11349                 </permacrud>
11350         </class>
11351         <class id="hasholdscount" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::has_holds_count" reporter:label="Copy Has Holds Count" oils_persist:readonly="true">
11352         <oils_persist:source_definition>
11353         SELECT ahcm.target_copy AS "id",count(*) AS "count"
11354          FROM
11355          action.hold_request ahr,
11356          action.hold_copy_map ahcm
11357          WHERE
11358          ahr.cancel_time IS NULL AND
11359          ahr.fulfillment_time IS NULL AND
11360          ahr.capture_time IS NULL AND
11361          ahr.id = ahcm.hold
11362          GROUP BY ahcm.target_copy
11363         </oils_persist:source_definition>
11364         <fields oils_persist:primary="id">
11365             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11366             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11367         </fields>
11368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11369             <actions>
11370                <retrieve/>
11371             </actions>
11372         </permacrud>
11373         </class>
11374
11375         <!-- ********************************************************************************************************************* -->
11376
11377 </IDL>
11378
11379 <!--
11380     vim:noet:ts=4:sw=4:
11381 -->