]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
04630ff16e0374341e4188a14de2bd6298098923
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           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                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <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">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="vibtg" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
246             oils_persist:tablename="vandelay.import_bib_trash_group" 
247             reporter:label="Import/Overlay Field Groups for Removal">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
252                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
253                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
254                 </fields>
255                 <links>
256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
257                 </links>
258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
259                         <actions>
260                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <retrieve/>
262                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
264                         </actions>
265                 </permacrud>
266         </class>
267
268
269         <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">
270                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
271                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
272                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
273                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
274                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
275                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
276                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
277                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
278                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
279                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
280                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
281                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
282                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
283                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
284                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
286                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
287                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
288                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
289                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
290                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
291                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
292                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
293                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
294                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
295                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
296                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
297                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
298                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
299                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
300                 </fields>
301                 <links>
302                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
303                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
304                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
305                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
306                 </links>
307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
308                         <actions>
309                                 <create permission="CREATE_IMPORT_ITEM">
310                     <context link="definition" field="owner"/>
311                                 </create>
312                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
313                     <context link="definition" field="owner"/>
314                                 </retrieve>
315                                 <update permission="UPDATE_IMPORT_ITEM">
316                     <context link="definition" field="owner"/>
317                                 </update>
318                                 <delete permission="DELETE_IMPORT_ITEM">
319                     <context link="definition" field="owner"/>
320                                 </delete>
321                         </actions>
322                 </permacrud>
323         </class>
324
325         <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">
326                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
327                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
328                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
329                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
330                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
331                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
332                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
333                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
334                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
335                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
336                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
337                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
338                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
339                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
340                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
341                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
342                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
343                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
344                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
345                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
346                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
347                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
348                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
349                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
350                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
351                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
352                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
353                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
354                 </fields>
355                 <links>
356                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
357                 </links>
358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
359                         <actions>
360                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
361                                 <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"/>
362                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
363                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
364                         </actions>
365                 </permacrud>
366         </class>
367
368         <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">
369                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
370                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
371                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
372                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
373                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
374                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
375                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
376                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
377                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
378                 </fields>
379                 <links>
380                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
381                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
382                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
383                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
384                 </links>
385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
386                         <actions>
387                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
388                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
389                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
390                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
391                         </actions>
392                 </permacrud>
393         </class>
394
395         <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">
396                 <fields oils_persist:primary="code">
397                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
398                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
399                 </fields>
400                 <links>
401                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
402                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
403                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
404                 </links>
405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
406                         <actions>
407                                 <retrieve/>
408                         </actions>
409                 </permacrud>
410         </class>
411
412         <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">
413                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
414                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
415                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
416                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
417                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
418                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
419                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
420                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
421                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
422                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
423                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
424                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
425                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
426                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
427                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
428                 </fields>
429                 <links>
430                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
431                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
432                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
433                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
434             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
435             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
436             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
437                 </links>
438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
439                         <actions>
440                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
441                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
442                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
443                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
444                         </actions>
445                 </permacrud>
446         </class>
447
448         <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">
449                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
450                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
451                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
452                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
453                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
454                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
455                 </fields>
456                 <links/>
457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
458                         <actions>
459                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
460                 <retrieve/>
461                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
462                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
463                         </actions>
464                 </permacrud>
465         </class>
466
467         <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">
468                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
469                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
470                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
471                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
472                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
473                 </fields>
474                 <links>
475                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
476                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
477                 </links>
478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
479                         <actions>
480                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
484                         </actions>
485                 </permacrud>
486         </class>
487
488         <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">
489                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
490                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
491                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
492                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
493                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
494                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
495                 </fields>
496                 <links>
497                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
498                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
499                 </links>
500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
501                         <actions>
502                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
503                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
504                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
505                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
506                         </actions>
507                 </permacrud>
508         </class>
509
510         <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">
511                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
512                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
513                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
514                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
515                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
516                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
517                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
518                 </fields>
519                 <links>
520                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
521                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
522                 </links>
523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
524                         <actions>
525                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                         </actions>
530                 </permacrud>
531         </class>
532
533         <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">
534                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
535                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
536                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
537                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
538                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
539                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
540                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
541                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
542                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
543                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
544                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
545                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
546                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
547                 </fields>
548                 <links>
549                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
550                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
551                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
552             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
553             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
554                 </links>
555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
556                         <actions>
557                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
558                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
559                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
560                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
561                         </actions>
562                 </permacrud>
563         </class>
564
565         <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">
566                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
567                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
568                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
569                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
570                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
571                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
572                 </fields>
573                 <links/>
574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
575                         <actions>
576                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
577                 <retrieve/>
578                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
579                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
580                         </actions>
581                 </permacrud>
582         </class>
583
584         <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">
585                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
586                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
587                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
588                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
589                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
590                 </fields>
591                 <links>
592                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
593                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
594                 </links>
595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
596                         <actions>
597                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
598                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
599                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
600                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
601                         </actions>
602                 </permacrud>
603         </class>
604
605         <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">
606                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
607                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
608                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
609                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
610                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
611                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
612                 </fields>
613                 <links>
614                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
615                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
616                 </links>
617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
618                         <actions>
619                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
621                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
622                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
623                         </actions>
624                 </permacrud>
625         </class>
626
627         <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">
628                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
629                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
630                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
631                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
632                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
633                 </fields>
634                 <links>
635                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
636                 </links>
637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
638                         <actions>
639                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
640                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
641                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
642                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
643                         </actions>
644                 </permacrud>
645         </class>
646
647         <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">
648                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
649                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
650                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
651                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
652                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
653                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
654                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
655                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
656             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
657                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
658                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
659                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
660                 </fields>
661                 <links>
662                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
663                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
664                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
665                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
666                 </links>
667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
668                         <actions>
669                                 <create permission="ADMIN_IMPORT_MATCH_SET">
670                     <context link="match_set" field="owner"/>
671                                 </create>
672                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
673                     <context link="match_set" field="owner"/>
674                                 </retrieve>
675                                 <update permission="ADMIN_IMPORT_MATCH_SET">
676                     <context link="match_set" field="owner"/>
677                                 </update>
678                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
679                     <context link="match_set" field="owner"/>
680                                 </delete>
681                         </actions>
682                 </permacrud>
683         </class>
684
685         <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">
686                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
687                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
688                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
689                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
690                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
691                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
692                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
693                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
694                 </fields>
695                 <links>
696                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
697                 </links>
698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
699                         <actions>
700                                 <create permission="ADMIN_IMPORT_MATCH_SET">
701                     <context link="match_set" field="owner"/>
702                                 </create>
703                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
704                     <context link="match_set" field="owner"/>
705                                 </retrieve>
706                                 <update permission="ADMIN_IMPORT_MATCH_SET">
707                     <context link="match_set" field="owner"/>
708                                 </update>
709                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
710                     <context link="match_set" field="owner"/>
711                                 </delete>
712                         </actions>
713                 </permacrud>
714         </class>
715
716         <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">
717                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
718                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
719                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
720                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
721                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
722                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
723                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
724                 </fields>
725                 <links>
726                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
727                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
728                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
729                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
730                 </links>
731         </class>
732
733     <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">
734         <fields oils_persist:primary="name">
735             <field reporter:label="Name" name="name" reporter:datatype="text"/>
736             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
737             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
738             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
739         </fields>
740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
741             <actions>
742                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
743                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
744                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
745                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
746             </actions>
747         </permacrud>
748     </class>
749
750     <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">
751         <fields oils_persist:primary="id">
752             <field reporter:label="ID" name="id" reporter:datatype="id"/>
753             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
754             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
755             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
756             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
757         </fields>
758         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759             <actions>
760                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
761                 <retrieve/>
762                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
763                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
764             </actions>
765         </permacrud>
766     </class>
767
768         <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">
769                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
770                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
771                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
772                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
773                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
774                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
775                 </fields>
776                 <links>
777                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
778                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
779                 </links>
780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
781             <actions>
782                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
783                 <retrieve/>
784                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
785                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
786             </actions>
787         </permacrud>
788         </class>
789
790         <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">
791                 <fields oils_persist:primary="id">
792                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
793                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
794                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
795         </fields>
796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
797             <actions>
798                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
799                 <retrieve/>
800                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
801                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
802             </actions>
803         </permacrud>
804         </class>
805
806         <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">
807                 <fields oils_persist:primary="id">
808                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
809                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
810                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
811                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
812                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
813                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
814                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
815                         <field reporter:label="Repeatabl?" name="repeatable" reporter:datatype="bool"/>
816                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
817                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
818                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
819         </fields>
820                 <links>
821                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
822                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
823         </links>
824         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
825             <actions>
826                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
827                 <retrieve/>
828                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
829                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
830             </actions>
831         </permacrud>
832         </class>
833
834         <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">
835                 <fields oils_persist:primary="id">
836                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
837                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
838                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
839                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
840                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" />
841                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
842                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
843                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
844                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
845                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
846         </fields>
847                 <links>
848                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
849                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
850         </links>
851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
852             <actions>
853                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
854                 <retrieve/>
855                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
856                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
857             </actions>
858         </permacrud>
859         </class>
860
861         <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">
862                 <fields oils_persist:primary="name">
863                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
864                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
865                         <field reporter:label="Description" name="description" reporter:datatype="text" />
866                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
867                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
868                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
869                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
870                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
871                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
872                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
873                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
874                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
875                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
876                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
877                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
878                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
879                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
880                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
881                 </fields>
882                 <links>
883                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
884                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
885                 </links>
886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
887             <actions>
888                 <create permission="ADMIN_SVF" global_required="true"/>
889                 <retrieve/>
890                 <update permission="ADMIN_SVF" global_required="true"/>
891                 <delete permission="ADMIN_SVF" global_required="true"/>
892             </actions>
893         </permacrud>
894         </class>
895
896         <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">
897                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
899                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
900                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
901             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
902                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
903                 </fields>
904                 <links/>
905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
906             <actions>
907                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
908                 <retrieve/>
909                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
910                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
911             </actions>
912         </permacrud>
913         </class>
914
915         <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">
916                 <fields oils_persist:primary="coded_value">
917                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
918                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
919                 </fields>
920                 <links>
921                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
922                 </links>
923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
924             <actions>
925                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
926                 <retrieve/>
927                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
928                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
929             </actions>
930         </permacrud>
931         </class>
932
933         <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">
934                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
935                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
936                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
937                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
938                 </fields>
939                 <links>
940                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
941                 </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <retrieve/>
945             </actions>
946         </permacrud>
947         </class>
948
949
950         <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">
951                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
952                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
953                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
954                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
955                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
956                 </fields>
957                 <links>
958                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
959                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
960                 </links>
961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
962             <actions>
963                 <retrieve/>
964             </actions>
965         </permacrud>
966         </class>
967
968
969         <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">
970                 <fields oils_persist:primary="source">
971                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
972                         <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 -->
973                 </fields>
974                 <links>
975                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <retrieve/>
980             </actions>
981         </permacrud>
982         </class>
983
984         <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">
985                 <fields>
986                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
987                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
988                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
989                 </fields>
990                 <links>
991                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
992                 </links>
993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
994             <actions>
995                 <retrieve/>
996             </actions>
997         </permacrud>
998         </class>
999
1000         <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">
1001                 <fields oils_persist:primary="id">
1002                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1003                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1004                 </fields>
1005                 <links>
1006                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1007                 </links>
1008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1009             <actions>
1010                 <retrieve/>
1011             </actions>
1012         </permacrud>
1013         </class>
1014
1015         <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">
1016                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1017                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1018                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1019                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1020                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1021                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1022                 </fields>
1023                 <links>
1024                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1025                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1026                 </links>
1027         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1028             <actions>
1029                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1030                 <retrieve/>
1031                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1032                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1033             </actions>
1034         </permacrud>
1035         </class>
1036
1037         <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">
1038                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1039                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1040                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1041                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1042                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1043                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1044                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1045                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1046             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1047             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1048             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1049                 </fields>
1050                 <links>
1051                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1052                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1053                 </links>
1054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1055             <actions>
1056                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1057                 <retrieve/>
1058                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1059                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1060             </actions>
1061         </permacrud>
1062         </class>
1063
1064         <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">
1065                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1066                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1067                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1068                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1069                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1070                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1071                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1072                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1073                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1074                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1075                 </fields>
1076                 <links>
1077                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1078                 </links>
1079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1080             <actions>
1081                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1082                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1083                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1084                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1085             </actions>
1086         </permacrud>
1087         </class>
1088
1089     <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">
1090         <fields oils_persist:primary="name">
1091             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1092             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1093             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1094             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1095             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1096             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1097             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1098             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1099             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1100             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1101         </fields>
1102         <links>
1103             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1104             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1105         </links>
1106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1107             <actions>
1108                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1109                 <retrieve/>
1110                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1111                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1112             </actions>
1113         </permacrud>
1114     </class>
1115
1116     <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">
1117         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1118             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1119             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1120             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1121             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1122             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1123             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1124             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1125         </fields>
1126         <links>
1127             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1128         </links>
1129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1130             <actions>
1131                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1132                 <retrieve/>
1133                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1134                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1135             </actions>
1136         </permacrud>
1137     </class>
1138
1139     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1140                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1141                         oils_persist:tablename="config.z3950_index_field_map" 
1142                         reporter:label="Z39.50 Index Field Map">
1143         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1144             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1145             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1146             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1147             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1148             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1149             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1150         </fields>
1151         <links>
1152             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1153             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1154             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1155         </links>
1156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1157             <actions>
1158                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1159                 <retrieve/>
1160                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1161                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1162             </actions>
1163         </permacrud>
1164     </class>
1165
1166
1167         <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">
1168                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1169                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1170                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1171                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1172                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1173                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1174                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1175                 </fields>
1176                 <links>
1177             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1178             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1179                 </links>
1180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1181                         <actions>
1182                                 <retrieve/>
1183                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1184                         </actions>
1185                 </permacrud>
1186         </class>
1187
1188         <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">
1189                 <fields oils_persist:primary="key">
1190                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1191                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1192                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1193                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1194                 </fields>
1195                 <links/>
1196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1197                         <actions>
1198                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1199                                 <retrieve/>
1200                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1201                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1202                         </actions>
1203                 </permacrud>
1204         </class>
1205
1206         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1207                 <fields oils_persist:primary="module">
1208                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1209                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1210                 </fields>
1211                 <links/>
1212         </class>
1213
1214         <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">
1215                 <fields oils_persist:primary="module">
1216                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1217                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1218                 </fields>
1219                 <links/>
1220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221                         <actions>
1222                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1223                                 <retrieve/>
1224                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1225                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1226                         </actions>
1227                 </permacrud>
1228         </class>
1229
1230         <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">
1231                 <fields oils_persist:primary="module">
1232                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1233                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1234                 </fields>
1235                 <links/>
1236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1237                         <actions>
1238                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1239                                 <retrieve/>
1240                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1241                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1242                         </actions>
1243                 </permacrud>
1244         </class>
1245
1246         <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">
1247                 <fields oils_persist:primary="module">
1248                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1249                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1250                 </fields>
1251                 <links/>
1252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1253                         <actions>
1254                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1255                                 <retrieve/>
1256                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1257                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1258                         </actions>
1259                 </permacrud>
1260         </class>
1261
1262         <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">
1263                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1264                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1265                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1266                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1267                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1268                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1269                 </fields>
1270                 <links>
1271                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1272                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1273                 </links>
1274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1275                         <actions>
1276                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1277                     <context link="event_def" field="owner"/>
1278                 </create>
1279                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1280                     <context link="event_def" field="owner"/>
1281                 </retrieve>
1282                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1283                     <context link="event_def" field="owner"/>
1284                 </update>
1285                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1286                     <context link="event_def" field="owner"/>
1287                 </delete>
1288                         </actions>
1289                 </permacrud>
1290         </class>
1291
1292         <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">
1293                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1294                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1295                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1296                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1297                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1298                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1299                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1300                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1301                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1302                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1303                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1304                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1305                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1306                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1307                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1308                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1309                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1310                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1311                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1312                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1313                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1314                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1315                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1316                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1317                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1318                 </fields>
1319                 <links>
1320                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1321                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1322                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1323                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1324                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1325                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1326                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1327                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1328                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1329                 </links>
1330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1331                         <actions>
1332                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1333                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1334                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1335                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1336                         </actions>
1337                 </permacrud>
1338         </class>
1339
1340         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1341                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1342                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1343                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1344                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1345                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1346                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1347                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1348                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1349                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1350                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1351                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1352                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1353                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1354                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1355                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1356                 </fields>
1357                 <links>
1358                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1359                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1360                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1361                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1362                 </links>
1363         </class>
1364
1365         <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">
1366                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1367                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1368                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1369                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1370                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1371                 </fields>
1372                 <links>
1373                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1374                 </links>
1375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1376                         <actions>
1377                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1378                     <context link="event_def" field="owner"/>
1379                 </create>
1380                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1381                     <context link="event_def" field="owner"/>
1382                 </retrieve>
1383                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1384                     <context link="event_def" field="owner"/>
1385                 </update>
1386                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1387                     <context link="event_def" field="owner"/>
1388                 </delete>
1389                         </actions>
1390                 </permacrud>
1391         </class>
1392
1393         <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">
1394                 <oils_persist:source_definition><![CDATA[
1395                 SELECT  atevdef.hook,
1396                         atevdef.name,
1397                         atevdef.reactor,
1398                         atev.id,
1399                         atev.event_def,
1400                         atev.add_time,
1401                         atev.run_time,
1402                         atev.start_time,
1403                         atev.update_time,
1404                         atev.complete_time,
1405                         atev.update_process,
1406                         atev.state,
1407                         atev.user_data,
1408                         atev.template_output,
1409                         atev.error_output,
1410                         atev.async_output,
1411                         targ_circ.id AS target_circ,
1412                         targ_ahr.id AS target_hold,
1413                         COALESCE(
1414                                 targ_circ.circ_lib,
1415                                 targ_ahr.pickup_lib
1416                         ) AS perm_lib
1417                 FROM action_trigger.event atev
1418                 JOIN action_trigger.event_definition atevdef ON
1419                         (atevdef.id = atev.event_def)
1420                 JOIN action_trigger.hook ath ON
1421                         (ath.key = atevdef.hook)
1422                 LEFT JOIN action.circulation targ_circ ON
1423                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1424                 LEFT JOIN action.hold_request targ_ahr ON
1425                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1426                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1427                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1428                                 'circ.staff.max_visible_event_age',
1429                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1430                         ) UNION
1431                         SELECT '1000 YEARS'::INTERVAL AS value
1432                 ) ous)
1433                 ]]></oils_persist:source_definition>
1434                 <fields oils_persist:primary="id">
1435                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1436                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1437                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1438                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1439                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1440                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1441                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1442                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1443                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1444                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1445                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1446                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1447                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1448                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1449                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1450                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1451                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1452                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1453                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1454                 </fields>
1455                 <links>
1456                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1457                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1458                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1459                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1460                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1461                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1462                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1463                 </links>
1464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1465                         <actions>
1466                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1467                         </actions>
1468                 </permacrud>
1469         </class>
1470
1471         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1472                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1473                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1474                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1475                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1476                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1477                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1478                 </fields>
1479                 <links>
1480                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1481                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1482                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1483                 </links>
1484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1485                         <actions>
1486                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1487                         </actions>
1488                 </permacrud>
1489         </class>
1490
1491         <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">
1492                 <fields oils_persist:primary="code">
1493                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1494                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1495                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1496                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1497                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1498                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1499                 </fields>
1500                 <links/>
1501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1502             <actions>
1503                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1504                 <retrieve/>
1505                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1506                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1507             </actions>
1508         </permacrud>
1509         </class>
1510
1511         <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">
1512                 <fields oils_persist:primary="code">
1513                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1514                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1515                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1516                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1517                 </fields>
1518                 <links/>
1519         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1520             <actions>
1521                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1522                 <retrieve/>
1523                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1524                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1525             </actions>
1526         </permacrud>
1527         </class>
1528
1529         <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">
1530                 <fields oils_persist:primary="code">
1531                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1532                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1533                 </fields>
1534                 <links/>
1535         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1536             <actions>
1537                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1538                 <retrieve/>
1539                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1540                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1541             </actions>
1542         </permacrud>
1543         </class>
1544
1545         <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">
1546                 <fields oils_persist:primary="code">
1547                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1548                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1549                 </fields>
1550                 <links/>
1551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1552             <actions>
1553                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1554                 <retrieve/>
1555                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1556                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1557             </actions>
1558         </permacrud>
1559         </class>
1560
1561         <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">
1562                 <fields oils_persist:primary="code">
1563                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1564                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1565                 </fields>
1566                 <links/>
1567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1568             <actions>
1569                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1570                 <retrieve/>
1571                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1572                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1573             </actions>
1574         </permacrud>
1575         </class>
1576
1577         <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">
1578                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1579                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1580                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1581                 </fields>
1582                 <links/>
1583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1584             <actions>
1585                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1586                 <retrieve/>
1587                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1588                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1589             </actions>
1590         </permacrud>
1591         </class>
1592
1593         <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">
1594                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1595                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1596                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1597                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1598                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1599                 </fields>
1600         <links>
1601             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1602             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1603             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1604         </links>
1605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1606             <actions>
1607                 <create permission="UPDATE_COPY">
1608                     <context link="target_copy" field="circ_lib"/>
1609                 </create>
1610                 <retrieve/>
1611                 <update permission="UPDATE_COPY">
1612                     <context link="target_copy" field="circ_lib"/>
1613                 </update>
1614                 <delete permission="UPDATE_COPY">
1615                     <context link="target_copy" field="circ_lib"/>
1616                 </delete>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <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">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1632                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <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">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <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">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1656                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1664                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669     <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">
1670         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1671             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1672             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1673             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1674             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1675             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1676             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1677             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1678             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1679             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1680             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1681             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1682             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1683             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1684             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1685             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1686             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1687             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1688         </fields>
1689         <links/>
1690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1691             <actions>
1692                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1693                 <retrieve/>
1694                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1695                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1696             </actions>
1697         </permacrud>
1698     </class>
1699
1700     <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">
1701         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1702             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1703             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1704             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1705             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1706             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1707             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1708             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1709             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1710             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1711             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1712             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1713             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1714             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1715             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1716             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1717             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1718             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1719             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1720             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1721         </fields>
1722         <links/>
1723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1724             <actions>
1725                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1726                 <retrieve/>
1727                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1728                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1729             </actions>
1730         </permacrud>
1731     </class>
1732
1733     <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">
1734         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1735             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1736             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1737             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1738             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1739             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1740         </fields>
1741         <links>
1742             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1743             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1744             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1745         </links>
1746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1747             <actions>
1748                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1749                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1750                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1751                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1752             </actions>
1753         </permacrud>
1754     </class>
1755
1756         <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">
1757                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1758                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1759                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1760                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1761                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1762                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1763                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1764                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1765                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1766                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1767                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1768                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1769                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1770                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1771                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1772                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1773                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1774             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1775                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1776                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1777                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1778                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1779                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1780                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1781                 </fields>
1782                 <links>
1783                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1784                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1785                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1786                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1787                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1788                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1789                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1790                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1791                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1792                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1793                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1794                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1795                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1796             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1797                 </links>
1798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1799             <actions>
1800                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1801                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1802                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1803                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1804             </actions>
1805         </permacrud>
1806         </class>
1807
1808         <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">
1809                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1810                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1811                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1812                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1813                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1814                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1815                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1816                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1817                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1818                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1819                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1820                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1821                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1822                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1823                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1824                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1825             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1826                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1827                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1828             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1829                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1830                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1831                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1832                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1833             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1834             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1835             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1836                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1837                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1838                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1839                 </fields>
1840                 <links>
1841                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1842                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1843                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1844                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1845                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1846                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1847                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1848                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1849                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1850                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1851                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1852                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1853                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1854                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1855             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1856                 </links>
1857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1858             <actions>
1859                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1860                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1861                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1862                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1863             </actions>
1864         </permacrud>
1865         </class>
1866
1867     <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">
1868         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1869             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1870             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1871             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1872         </fields>
1873         <links/>
1874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1875             <actions>
1876                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1877                 <retrieve/>
1878                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1879                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1880             </actions>
1881         </permacrud>
1882     </class>
1883
1884     <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">
1885         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1886             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1887             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1888             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1889             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1890             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1891             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1892             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1893         </fields>
1894         <links>
1895             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1896         </links>
1897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1898             <actions>
1899                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1900                 <retrieve/>
1901                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1902                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1903             </actions>
1904         </permacrud>
1905     </class>
1906
1907     <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">
1908         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1909             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1910             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1911             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1912             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1913             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1914         </fields>
1915         <links>
1916             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1917             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1918         </links>
1919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1920             <actions>
1921                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1922                     <context link="matchpoint" field="org_unit"/>
1923                 </create>
1924                 <retrieve/>
1925                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1926                     <context link="matchpoint" field="org_unit"/>
1927                 </update>
1928                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1929                     <context link="matchpoint" field="org_unit"/>
1930                 </delete>
1931             </actions>
1932         </permacrud>
1933     </class>
1934
1935     <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">
1936         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1937             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1938             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1939             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1940         </fields>
1941         <links>
1942             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1943             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1944         </links>
1945         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1946             <actions>
1947                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1948                     <context link="limit_set" field="owning_lib"/>
1949                 </create>
1950                 <retrieve/>
1951                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1952                     <context link="limit_set" field="owning_lib"/>
1953                 </update>
1954                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1955                     <context link="limit_set" field="owning_lib"/>
1956                 </delete>
1957             </actions>
1958         </permacrud>
1959     </class>
1960     <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">
1961         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1962             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1963             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1964             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1965         </fields>
1966         <links>
1967             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1968             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1969         </links>
1970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1971             <actions>
1972                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1973                     <context link="limit_set" field="owning_lib"/>
1974                 </create>
1975                 <retrieve/>
1976                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1977                     <context link="limit_set" field="owning_lib"/>
1978                 </update>
1979                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1980                     <context link="limit_set" field="owning_lib"/>
1981                 </delete>
1982             </actions>
1983         </permacrud>
1984     </class>
1985
1986     <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">
1987         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1988             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1989             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1990             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1991             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1992         </fields>
1993         <links>
1994             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1995             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1996         </links>
1997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1998             <actions>
1999                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2000                     <context link="limit_set" field="owning_lib"/>
2001                 </create>
2002                 <retrieve/>
2003                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2004                     <context link="limit_set" field="owning_lib"/>
2005                 </update>
2006                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2007                     <context link="limit_set" field="owning_lib"/>
2008                 </delete>
2009             </actions>
2010         </permacrud>
2011     </class>
2012
2013         <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">
2014                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2015                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2016                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2017                 </fields>
2018                 <links/>
2019         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2020             <actions>
2021                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2022                 <retrieve/>
2023                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2024                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2025             </actions>
2026         </permacrud>
2027         </class>
2028
2029         <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">
2030                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2031                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2032                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2033                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2034                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2035                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2036                 </fields>
2037                 <links>
2038                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2039                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2040                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2041                 </links>
2042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2043             <actions>
2044                 <create permission="ADMIN_SURVEY">
2045                     <context link="survey" field="owner"/>
2046                 </create>
2047                 <retrieve/>
2048                 <update permission="ADMIN_SURVEY">
2049                     <context link="survey" field="owner"/>
2050                 </update>
2051                 <delete permission="ADMIN_SURVEY">
2052                     <context link="survey" field="owner"/>
2053                 </delete>
2054             </actions>
2055         </permacrud>
2056         </class>
2057         <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">
2058                 <fields oils_persist:primary="id" oils_persist:sequence="">
2059                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2060                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2061                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2062                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2063                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2064                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2065                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2066                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2067                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2068                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2069                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2070                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2071                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2072                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2073                 </fields>
2074                 <links>
2075                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2076                 </links>
2077                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2078                         <actions>
2079                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2080                                         <context link="usr" field="home_ou" />
2081                                 </retrieve>
2082                         </actions>
2083                 </permacrud>
2084         </class>
2085         <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">
2086                 <fields oils_persist:primary="id" oils_persist:sequence="">
2087                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2088                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2089                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2090                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2091                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2092                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2093                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2094                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2095                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2096                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2097                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2098                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2099                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2100                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2101                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2102                 </fields>
2103                 <links>
2104                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2105                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2106                 </links>
2107         </class>
2108         <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">
2109                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2110                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2111                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2112                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2113                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2114                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2115                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2116                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2117                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2118                 </fields>
2119                 <links>
2120                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2121                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2122                 </links>
2123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2124                         <actions> <!-- created magically, so no create action -->
2125                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2126                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2127                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2128                         </actions>
2129                 </permacrud>
2130         </class>
2131         <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)">
2132                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2133                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2134                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2135                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2136                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2137                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2138                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2139                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2140                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2141                 </fields>
2142                 <links>
2143                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2144                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2145                 </links>
2146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2147                         <actions> <!-- created magically, so no create action -->
2148                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2149                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2150                         </actions>
2151                 </permacrud>
2152         </class>
2153         <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">
2154                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2155                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2156                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2157                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2158                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2159                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2160                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2161                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2162                 </fields>
2163                 <links>
2164                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2165                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2166                 </links>
2167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2168             <actions>
2169                 <create permission="UPDATE_USER" context_field="owner">
2170                     <context link="usr" field="home_ou"/>
2171                 </create>
2172                                 <!-- note: public notes are still accessible via API -->
2173                 <retrieve permission="UPDATE_USER">
2174                     <context link="usr" field="home_ou"/>
2175                                 </retrieve>
2176                 <update permission="UPDATE_USER">
2177                     <context link="usr" field="home_ou"/>
2178                                 </update>
2179                 <delete permission="UPDATE_USER">
2180                     <context link="usr" field="home_ou"/>
2181                                 </delete>
2182             </actions>
2183         </permacrud>
2184         </class>
2185         <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">
2186                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2187                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2188                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2189                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2190                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2191                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2192                 </fields>
2193                 <links>
2194                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2195                 </links>
2196         </class>
2197         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2198                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2199                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2200                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2201                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2202                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2203                 </fields>
2204                 <links>
2205                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2206                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2207                 </links>
2208         </class>
2209         <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">
2210                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2211                         <field name="field" reporter:datatype="link"/>
2212                         <field name="id" reporter:datatype="id" />
2213                         <field name="source" reporter:datatype="link"/>
2214                         <field name="value" reporter:datatype="text"/>
2215                 </fields>
2216                 <links>
2217                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2218                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2219                 </links>
2220         </class>
2221         <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">
2222                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2223                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2224                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2225                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2226                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2227                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2228                 </fields>
2229                 <links>
2230                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2231                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2232                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2233                 </links>
2234         </class>
2235         <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">
2236                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2237                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2238                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2239                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2240                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2241                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2242                 </fields>
2243                 <links>
2244                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2245                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2246                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2247                 </links>
2248         </class>
2249         <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">
2250                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2251                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2252                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2253                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2254                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2255                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2256                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2257                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2258                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2259                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2260                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2261                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2262                 </fields>
2263                 <links>
2264                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2265                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2266                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2267                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2268                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2269                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2270                 </links>
2271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2272             <actions>
2273                 <create permission="TRANSIT_COPY" context_field="owner">
2274                     <context link="target_copy" field="circ_lib"/>
2275                 </create>
2276                 <retrieve/>
2277                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2278                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2279             </actions>
2280         </permacrud>
2281         </class>
2282         <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">
2283                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2284                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2285                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2286                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2287                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2288                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2289                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2290                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2291                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2292                 </fields>
2293                 <links>
2294                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2295                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2296                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2297                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2298                 </links>
2299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2300             <actions>
2301                 <create permission="ADMIN_SURVEY">
2302                     <context link="survey" field="owner"/>
2303                 </create>
2304                 <retrieve permission="VIEW_USER">
2305                     <context link="usr" field="home_ou"/>
2306                 </retrieve>
2307                 <update permission="ADMIN_SURVEY">
2308                     <context link="survey" field="owner"/>
2309                 </update>
2310                 <delete permission="ADMIN_SURVEY">
2311                     <context link="survey" field="owner"/>
2312                 </delete>
2313             </actions>
2314         </permacrud>
2315         </class>
2316         <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">
2317                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2318                         <field name="bucket" />
2319                         <field name="id" reporter:datatype="id" />
2320                         <field name="target_copy" reporter:datatype="link"/>
2321                         <field name="create_time" reporter:datatype="timestamp" />
2322                         <field name="pos" reporter:datatype="int" />
2323                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2324                 </fields>
2325                 <links>
2326                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2327                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2328             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2329                 </links>
2330         </class>
2331         <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">
2332                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2333                         <field name="id" reporter:datatype="id" />
2334                         <field name="item" reporter:datatype="link"/>
2335                         <field name="note" reporter:datatype="text" />
2336                 </fields>
2337                 <links>
2338                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2339                 </links>
2340         </class>
2341
2342         <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">
2343                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2344                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2345                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2346                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2347                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2348                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2349                 </fields>
2350                 <links>
2351                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2352                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2353                 </links>
2354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2355                         <actions>
2356                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2357                                 <retrieve/>
2358                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2359                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2360                         </actions>
2361                 </permacrud>
2362         </class>
2363
2364         <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">
2365                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2366                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2367                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2368                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2369                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2370                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2371                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2372                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2373                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2374                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2375                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2376                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2377                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2378                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2379                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2380                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2381                 </fields>
2382                 <links>
2383                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2384                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2385                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2386                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2387                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2388                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2389                 </links>
2390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2391                         <actions>
2392                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2393                                 <retrieve/>
2394                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2395                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2396                         </actions>
2397                 </permacrud>
2398         </class>
2399
2400         <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">
2401                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2402                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2403                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2404                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2405                 </fields>
2406                 <links>
2407                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2408                 </links>
2409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2410                         <actions>
2411                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2412                                 <retrieve/>
2413                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2414                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2415                         </actions>
2416                 </permacrud>
2417         </class>
2418
2419         <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">
2420                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2421                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2422                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2423                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2424                 </fields>
2425                 <links>
2426                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2427                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2428                 </links>
2429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2430                         <actions>
2431                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2432                                 <retrieve/>
2433                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2434                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2435                         </actions>
2436                 </permacrud>
2437         </class>
2438
2439         <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">
2440                 <fields oils_persist:primary="code">
2441                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2442                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2443                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2444                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2445                 </fields>
2446                 <links>
2447                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2448                 </links>
2449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2450                         <actions>
2451                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2452                                 <retrieve/>
2453                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2454                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2455                         </actions>
2456                 </permacrud>
2457         </class>
2458
2459         <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">
2460                 <fields oils_persist:primary="code">
2461                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2462                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2463                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2464                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2465                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2466                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2467                 </fields>
2468                 <links>
2469                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2470                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2471                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2472                 </links>
2473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2474                         <actions>
2475                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2476                                 <retrieve/>
2477                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2478                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2479                         </actions>
2480                 </permacrud>
2481         </class>
2482
2483     <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">
2484         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2485             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2486             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2487             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2488         </fields>
2489         <links>
2490             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2491             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2492         </links>
2493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2494             <actions>
2495                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2496                 <retrieve/>
2497                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2498                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2499             </actions>
2500         </permacrud>
2501     </class>
2502
2503         <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">
2504                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2505                         <field name="active" reporter:datatype="bool"/>
2506                         <field name="create_date" reporter:datatype="timestamp"/>
2507                         <field name="creator" />
2508                         <field name="deleted" reporter:datatype="bool"/>
2509                         <field name="edit_date" reporter:datatype="timestamp"/>
2510                         <field name="editor" />
2511                         <field name="id" reporter:datatype="id" />
2512                         <field name="last_xact_id" />
2513                         <field name="marc" />
2514                         <field name="source" />
2515                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2516                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2517                         <field name="heading" />
2518                         <field name="simple_heading" />
2519                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2520                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2521                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2522                 </fields>
2523                 <links>
2524                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2525                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2526                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2527                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2528                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2529                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2530                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2531                 </links>
2532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2533                         <actions>
2534                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2535                                 <retrieve/>
2536                                 <update permission="UPDATE_MARC" global_required="true"/>
2537                                 <delete permission="UPDATE_MARC" global_required="true"/>
2538                         </actions>
2539                 </permacrud>
2540         </class>
2541         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2542                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2543                         <field name="char_encoding" />
2544                         <field name="id" />
2545                         <field name="record" />
2546                         <field name="record_status" />
2547                         <field name="thesaurus" />
2548                 </fields>
2549                 <links>
2550                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2551                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2552                 </links>
2553         </class>
2554         <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">
2555                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2556                         <field name="id" reporter:datatype="id" />
2557                         <field name="bib" reporter:datatype="link" />
2558                         <field name="authority" reporter:datatype="link" />
2559                 </fields>
2560                 <links>
2561                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2562                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2563                 </links>
2564         </class>
2565         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2566                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2567                         <field name="id" reporter:datatype="id" />
2568                         <field name="record" reporter:datatype="link" />
2569                         <field name="atag" reporter:datatype="link" />
2570                         <field name="value" reporter:datatype="text" />
2571                 </fields>
2572                 <links>
2573                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2574                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2575                 </links>
2576         </class>
2577         <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">
2578                 <fields oils_persist:primary="code" oils_persist:sequence="">
2579                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2580                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2581                 </fields>
2582                 <links/>
2583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2584             <actions>
2585                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2586                 <retrieve/>
2587                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2588                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2589             </actions>
2590         </permacrud>
2591         </class>
2592         <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">
2593                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2594                         <field name="accepting_usr" />
2595                         <field name="amount" reporter:datatype="money" />
2596                         <field name="amount_collected" reporter:datatype="money" />
2597                         <field name="approval_code" reporter:datatype="text"/>
2598                         <field name="cash_drawer" reporter:datatype="link"/>
2599                         <field name="cc_number" reporter:datatype="text"/>
2600                         <field name="cc_order_number" reporter:datatype="text"/>
2601                         <field name="cc_processor" reporter:datatype="text"/>
2602                         <field name="id" reporter:datatype="id" />
2603                         <field name="note" reporter:datatype="text"/>
2604                         <field name="payment_ts" reporter:datatype="timestamp"/>
2605                         <field name="xact" reporter:datatype="link"/>
2606                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2607                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2608                 </fields>
2609                 <links>
2610                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2611                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2612                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2613                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2614                 </links>
2615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2616             <actions>
2617                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2618                     <context link="xact" jump="usr" field="home_ou"/>
2619                 </retrieve>
2620                         </actions>
2621                 </permacrud>
2622         </class>
2623         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
2624                 <fields oils_persist:primary="name">
2625                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2626                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2627                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2628                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2629                 </fields>
2630                 <links/>
2631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2632             <actions>
2633                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2634                 <retrieve/>
2635                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2636                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2637             </actions>
2638         </permacrud>
2639         </class>
2640
2641         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2642                 <fields oils_persist:primary="alias">
2643                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2644                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2645                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2646                 </fields>
2647                 <links>
2648                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2649                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2650                 </links>
2651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2652             <actions>
2653                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2654                 <retrieve/>
2655                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2656                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2657             </actions>
2658         </permacrud>
2659         </class>
2660
2661         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2662                 <fields oils_persist:primary="name">
2663                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2664                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2665                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2666                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2667                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2668                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2669                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2670                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2671                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2672                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2673                 </fields>
2674                 <links>
2675                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2676                 </links>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2680                 <retrieve/>
2681                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2682                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2683             </actions>
2684         </permacrud>
2685         </class>
2686
2687         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2688                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2689                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2690                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2691                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2692                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2693                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2694                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2695                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2696                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2697                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2698                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2699                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2700                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2701                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2702                 </fields>
2703                 <links>
2704                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2705                 </links>
2706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2707             <actions>
2708                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2709                 <retrieve/>
2710                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2711                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2712             </actions>
2713         </permacrud>
2714         </class>
2715         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2717                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2718                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2719                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2720                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2721                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2722                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2723                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2724                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2725                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2726                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2727                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2728                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2729                 </fields>
2730                 <links>
2731                 </links>
2732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2733                         <actions>
2734                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2735                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2736                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2737                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2738                         </actions>
2739                 </permacrud>
2740         </class>
2741         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2743                         <field name="id" reporter:datatype="id" />
2744                         <field name="name" reporter:datatype="text"/>
2745                         <field name="xpath" reporter:datatype="text"/>
2746                         <field name="format" reporter:datatype="link"/>
2747                         <field name="first_word" reporter:datatype="bool" />
2748                 </fields>
2749                 <links/>
2750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2751             <actions>
2752                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2753                 <retrieve/>
2754                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2755                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2756             </actions>
2757         </permacrud>
2758         </class>
2759         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
2760                 <fields oils_persist:primary="code" oils_persist:sequence="">
2761                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2762                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2763                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2764                 </fields>
2765                 <links/>
2766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2767             <actions>
2768                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2769                 <retrieve/>
2770                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2771                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2772             </actions>
2773         </permacrud>
2774         </class>
2775         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
2776                 <fields oils_persist:primary="code" oils_persist:sequence="">
2777                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2778                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2779                 </fields>
2780                 <links/>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2784                 <retrieve/>
2785                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2786                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2787             </actions>
2788         </permacrud>
2789         </class>
2790     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2791         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2792             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2793             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2794             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2795             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2796         </fields>
2797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2798             <actions>
2799                 <retrieve/>
2800             </actions>
2801         </permacrud>
2802     </class>
2803         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2804                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2805                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2806                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2807                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2808                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2809                 </fields>
2810                 <links>
2811                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2812                 </links>
2813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2814             <actions>
2815                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2816                 <retrieve/>
2817                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2818                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2819             </actions>
2820         </permacrud>
2821         </class>
2822         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2824                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2825                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2826                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2827                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2828                 </fields>
2829                 <links>
2830                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2831                 </links>
2832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2833             <actions>
2834                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2835                 <retrieve/>
2836                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2837                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2838             </actions>
2839         </permacrud>
2840         </class>
2841         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2843                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2844                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2845                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2846                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2847                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2848                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2849                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2850                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2851                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2852                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2853                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2854                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2855                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2856                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2857                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2858                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2859                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2860                 </fields>
2861                 <links>
2862                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2863                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2864                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2865                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2866                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2867                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2868                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2869                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2870                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2871                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2872                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2873                 </links>
2874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875             <actions>
2876                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2877                 <retrieve/>
2878                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2879                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2880             </actions>
2881         </permacrud>
2882         </class>
2883         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2885                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2886                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2887                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2888                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2889                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2890                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2891                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2892                 </fields>
2893                 <links>
2894                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2895                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2896         </links>
2897         </class>
2898         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
2899                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2901                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2902                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2903                 </fields>
2904                 <links>
2905                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2906                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2907                 </links>
2908         </class>
2909         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2911                         <field name="id" reporter:datatype="id" />
2912                         <field name="value" oils_persist:i18n="true" />
2913                 </fields>
2914                 <links/>
2915         </class>
2916         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
2917                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2918                         <field name="balance_owed" reporter:datatype="money" />
2919                         <field name="total_owed" reporter:datatype="money" />
2920                         <field name="total_paid" reporter:datatype="money" />
2921                         <field name="usr" reporter:datatype="link"/>
2922                 </fields>
2923                 <links>
2924                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2925         </links>
2926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2927             <actions>
2928                 <retrieve permission="VIEW_USER">
2929                     <context link="usr" field="home_ou"/>
2930                 </retrieve>
2931             </actions>
2932         </permacrud>
2933         </class>
2934         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
2935                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2936                         <field name="collector" />
2937                         <field name="enter_time" reporter:datatype="timestamp"/>
2938                         <field name="id" reporter:datatype="id" />
2939                         <field name="location" reporter:datatype="link"/>
2940                         <field name="usr" reporter:datatype="link"/>
2941                 </fields>
2942                 <links>
2943                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2944                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2945                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2946                 </links>
2947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2948             <actions>
2949                 <create permission="money.collections_tracker.create" context_field="location"/>
2950                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2951                 <delete permission="money.collections_tracker.create" context_field="location"/>
2952             </actions>
2953         </permacrud>
2954         </class>
2955         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
2956                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2957                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2960                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2961                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2962                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2963                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2964                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2965                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2966                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2967                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2968                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2969                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2970                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2971                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2972                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2973                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2974                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2975                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2979                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2980                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2981                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2982                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2984                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2985                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2986                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2987                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2988                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2989                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
2990                 </fields>
2991                 <links>
2992                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2993                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2994                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2995                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2996                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2997                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2998                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2999                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3000                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3001                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3002                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3003                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3004                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3005                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3006                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3007                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3008                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3009                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3010                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3011                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3012                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3013                 </links>
3014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3015             <actions>
3016                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3017                 <retrieve/>
3018                 <update permission="UPDATE_MARC" global_required="true"/>
3019                 <!-- 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. -->
3020                 <delete permission="DELETE_RECORD" global_required="true"/>
3021             </actions>
3022         </permacrud>
3023         </class>
3024         <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">
3025                 <fields oils_persist:primary="id">
3026                         <field name="dow_0_close" />
3027                         <field name="dow_0_open" />
3028                         <field name="dow_1_close" />
3029                         <field name="dow_1_open" />
3030                         <field name="dow_2_close" />
3031                         <field name="dow_2_open" />
3032                         <field name="dow_3_close" />
3033                         <field name="dow_3_open" />
3034                         <field name="dow_4_close" />
3035                         <field name="dow_4_open" />
3036                         <field name="dow_5_close" />
3037                         <field name="dow_5_open" />
3038                         <field name="dow_6_close" />
3039                         <field name="dow_6_open" />
3040                         <field name="id" reporter:datatype="id" />
3041                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3042                 </fields>
3043                 <links>
3044                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3045                 </links>
3046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3047             <actions>
3048                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3049                 <retrieve/>
3050                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3051                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3052             </actions>
3053         </permacrud>
3054         </class>
3055         <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">
3056                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3057                         <field name="id" reporter:datatype="id" />
3058                         <field name="record" reporter:datatype="link"/>
3059                         <field name="label" reporter:datatype="text"/>
3060                         <field name="label_sortkey" reporter:datatype="text"/>
3061                         <field name="deleted" reporter:datatype="bool"/>
3062                 </fields>
3063                 <links>
3064                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3065                 </links>
3066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3067             <actions>
3068                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3069                 <retrieve/>
3070                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3071                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3072             </actions>
3073         </permacrud>
3074         </class>
3075         <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">
3076                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3077                         <field name="id" reporter:datatype="id" />
3078                         <field name="target_copy" reporter:datatype="link" />
3079                         <field name="part" reporter:datatype="link"/>
3080                 </fields>
3081                 <links>
3082                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3083                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3084                 </links>
3085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3086             <actions>
3087                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3088                 <retrieve/>
3089                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3090                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3091             </actions>
3092         </permacrud>
3093         </class>
3094         <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">
3095                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3096                         <field name="close_end" reporter:datatype="timestamp" />
3097                         <field name="close_start" reporter:datatype="timestamp" />
3098                         <field name="id" reporter:datatype="id" />
3099                         <field name="org_unit" reporter:datatype="org_unit"/>
3100                         <field name="reason" reporter:datatype="text"/>
3101                 </fields>
3102                 <links>
3103                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3104                 </links>
3105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3106             <actions>
3107                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3108                 <retrieve/>
3109                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3110                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3111             </actions>
3112         </permacrud>
3113         </class>
3114         <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">
3115                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3116                         <field name="extended" reporter:datatype="interval"/>
3117                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3118                         <field name="max_renewals" reporter:datatype="int" />
3119                         <field name="name" reporter:datatype="text"/>
3120                         <field name="normal" reporter:datatype="interval"/>
3121                         <field name="shrt" reporter:datatype="interval"/>
3122                 </fields>
3123                 <links>
3124                 </links>
3125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3126             <actions>
3127                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3128                 <retrieve/>
3129                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3130                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3131             </actions>
3132         </permacrud>
3133         </class>
3134
3135         <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">
3136                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3137                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3138                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3139             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3140                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3141             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3142                 </fields>
3143                 <links>
3144             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3145                 </links>
3146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3147             <actions>
3148                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3149                 <retrieve/>
3150                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3151                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3152             </actions>
3153                 </permacrud>
3154         </class>
3155
3156         <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">
3157                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3158                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3159                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3160                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3161             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3162                 </fields>
3163                 <links>
3164                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3165                 </links>
3166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3167             <actions>
3168                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3169                 <retrieve/>
3170                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3171                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3172             </actions>
3173                 </permacrud>
3174         </class>
3175
3176         <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">
3177                 <fields oils_persist:primary="id" oils_persist:sequence="">
3178                         <field name="balance_owed" reporter:datatype="money"/>
3179                         <field name="id" reporter:datatype="id" />
3180                         <field name="last_billing_note" reporter:datatype="text"/>
3181                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3182                         <field name="last_billing_type" reporter:datatype="text"/>
3183                         <field name="last_payment_note" reporter:datatype="text"/>
3184                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3185                         <field name="last_payment_type" reporter:datatype="text"/>
3186                         <field name="total_owed" reporter:datatype="money"/>
3187                         <field name="total_paid" reporter:datatype="money"/>
3188                         <field name="usr" reporter:datatype="link"/>
3189                         <field name="xact_finish" reporter:datatype="timestamp" />
3190                         <field name="xact_start" reporter:datatype="timestamp" />
3191                         <field name="xact_type" reporter:datatype="text"/>
3192                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field name="billing_location" reporter:datatype="link"/>
3197                 </fields>
3198                 <links>
3199                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3200                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3201                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3202                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3203                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3204                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3205                 </links>
3206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3207                         <actions>
3208                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3209                                         <context link="usr" field="home_ou" />
3210                                 </retrieve>
3211                         </actions>
3212                 </permacrud>
3213         </class>
3214         <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">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3216                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3219                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3220                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3221                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3222                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3223                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3224                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3225                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3226                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3227                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3228                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3229                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3230                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3231                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3232                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3233                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3234                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3235                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3236                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3237                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3238                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3239                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3240                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3241                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3242                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3243                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3244                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3245                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3246                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3247                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3248                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3249                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3250                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3251                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3252                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3253                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3254                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3255                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3256                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3257                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3258                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3259                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3260                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3261                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3262                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3263                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3264                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3265                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3266                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3267                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3268                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3269                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3272                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3274                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3275                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3276                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3277                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3278                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3279                 </fields>
3280                 <links>
3281                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3282                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3283                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3284                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3285                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3286                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3287                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3288                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3289                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3290                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3291                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3292                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3293                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3294                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3295                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3296                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3297                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3298                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3299                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3300                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3301                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3302                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3303                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3304                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3305                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3306                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3307                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3308                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3309                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3310                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3311                 </links>
3312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3313                         <actions>
3314                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3315                         </actions>
3316                 </permacrud>
3317         </class>
3318         <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">
3319                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3320                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3321                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3322                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3323                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3324                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3325                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3326                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3327                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3328         </fields>
3329                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3330                         <actions>
3331                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3332                                 <retrieve/>
3333                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3334                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3335                         </actions>
3336                 </permacrud>
3337         </class>
3338         <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">
3339                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3340                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3341                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3342                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3343                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3344         </fields>
3345         <links>
3346                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3347                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3348                 </links>
3349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3350                         <actions>
3351                                 <retrieve permission="RUN_REPORTS">
3352                                         <context link="usr" field="home_ou" />
3353                                 </retrieve>
3354                         </actions>
3355                 </permacrud>
3356         </class>
3357         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3358                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3359                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3360                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3361                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3362                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3363                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3364                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3365         </fields>
3366         <links>
3367                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3368                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3369                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3370                 </links>
3371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3372                         <actions>
3373                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3374                                         <context link="usr" field="home_ou" />
3375                                         <context link="ws" field="owning_lib" />
3376                                 </retrieve>
3377                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3378                                         <context link="usr" field="home_ou" />
3379                                         <context link="ws" field="owning_lib" />
3380                                 </create>
3381                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3382                                         <context link="usr" field="home_ou" />
3383                                         <context link="ws" field="owning_lib" />
3384                                 </update>
3385                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3386                                         <context link="usr" field="home_ou" />
3387                                         <context link="ws" field="owning_lib" />
3388                                 </delete>
3389                         </actions>
3390                 </permacrud>
3391         </class>
3392         <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">
3393                 <fields oils_persist:primary="name">
3394                         <field name="name" reporter:datatype="text"/>
3395                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3396                 </fields>
3397                 <links/>
3398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3399                         <actions>
3400                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3401                                 <retrieve/>
3402                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3403                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3404                         </actions>
3405                 </permacrud>
3406         </class>
3407         <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">
3408                 <fields oils_persist:primary="name">
3409                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3410                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3411                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3412                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3413                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3414                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3415                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3416                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3417                 </fields>
3418                 <links>
3419                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3420                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3421                 </links>
3422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3423                         <actions>
3424                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3425                                 <retrieve/>
3426                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3427                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3428                         </actions>
3429                 </permacrud>
3430         </class>
3431         <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">
3432                 <fields oils_persist:primary="name">
3433                         <field name="name" reporter:datatype="text"/>
3434                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3435                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3436                         <field name="datatype" reporter:datatype="text"/>
3437                         <field name="view_perm" reporter:datatype="link"/>
3438                         <field name="update_perm" reporter:datatype="link"/>
3439                         <field name="fm_class" reporter:datatype="text"/>
3440                         <field name="grp" reporter:datatype="link"/>
3441                 </fields>
3442                 <links>
3443                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3444                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3445                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3446                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3447                 </links>
3448                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3449                         <actions>
3450                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3451                                 <retrieve/>
3452                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3453                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3454                         </actions>
3455                 </permacrud>
3456         </class>
3457         <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">
3458                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3459                         <field name="id" />
3460                         <field name="name"  reporter:datatype="text"/>
3461                         <field name="org_unit" reporter:datatype="org_unit"/>
3462                         <field name="value"  reporter:datatype="text"/>
3463                 </fields>
3464                 <links>
3465                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3466                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3467                 </links>
3468         </class>
3469         <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">
3470                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3471                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3472                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3473                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3474                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3475                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3476                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3477                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3478                 </fields>
3479                 <links>
3480                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3481                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3482                 </links>
3483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484             <actions>
3485                 <create permission="CREATE_COPY_NOTE">
3486                     <context link="owning_copy" field="circ_lib"/>
3487                 </create>
3488                 <retrieve permission="VIEW_COPY_NOTES">
3489                     <context link="owning_copy" field="circ_lib"/>
3490                 </retrieve>
3491                 <update permission="UPDATE_COPY_NOTE">
3492                     <context link="owning_copy" field="circ_lib"/>
3493                 </update>
3494                 <delete permission="DELETE_COPY_NOTE">
3495                     <context link="owning_copy" field="circ_lib"/>
3496                 </delete>
3497             </actions>
3498         </permacrud>
3499         </class>
3500         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3501                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3502                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3503                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3504                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3505                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3506                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3507                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3508                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3509                 </fields>
3510                 <links>
3511                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3512                 </links>
3513         </class>
3514         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3516                         <field name="fingerprint"  reporter:datatype="text"/>
3517                         <field name="id" reporter:datatype="id" />
3518                         <field name="master_record" reporter:datatype="link"/>
3519                         <field name="mods"  reporter:datatype="text"/>
3520                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3521                 </fields>
3522                 <links>
3523                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3524                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3525                 </links>
3526         </class>
3527         <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">
3528                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3529                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3530                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3531                 </fields>
3532                 <links/>
3533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3534             <actions>
3535                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3536                 <retrieve/>
3537                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3538                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3539             </actions>
3540         </permacrud>
3541         </class>
3542         <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">
3543                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3544                         <field name="code"  reporter:datatype="text"/>
3545                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3546                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3547                 </fields>
3548                 <links/>
3549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3550             <actions>
3551                 <create permission="CREATE_PERM" global_required="true"/>
3552                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3553                 <update permission="UPDATE_PERM" global_required="true"/>
3554                 <delete permission="DELETE_PERM" global_required="true"/>
3555             </actions>
3556         </permacrud>
3557         </class>
3558         <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">
3559                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3560                         <field name="id" reporter:datatype="id" />
3561                         <field name="metarecord" reporter:datatype="link"/>
3562                         <field name="source" reporter:datatype="link"/>
3563                 </fields>
3564                 <links>
3565                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3566                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3567                 </links>
3568         </class>
3569         <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">
3570                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3571                         <field name="id" reporter:datatype="id" />
3572                         <field name="field" reporter:datatype="link"/>
3573                         <field name="source" reporter:datatype="link"/>
3574                         <field name="value"  reporter:datatype="text"/>
3575                 </fields>
3576                 <links>
3577                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3578                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3579                 </links>
3580         </class>
3581         <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">
3582                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3583                         <field name="id" reporter:datatype="id" />
3584                         <field name="value" reporter:datatype="text"/>
3585                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3586                 </fields>
3587                 <links>
3588                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3589                 </links>
3590         </class>
3591         <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">
3592                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3593                         <field name="id" reporter:datatype="id" />
3594                         <field name="entry" reporter:datatype="link"/>
3595                         <field name="def" reporter:datatype="link"/>
3596                         <field name="source" reporter:datatype="link"/>
3597                 </fields>
3598                 <links>
3599                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3600                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3601                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3602                 </links>
3603         </class>
3604         <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">
3605                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3606                         <field name="id" reporter:datatype="id" />
3607                         <field name="entry" reporter:datatype="link"/>
3608                         <field name="simple_heading" reporter:datatype="link"/>
3609                 </fields>
3610                 <links>
3611                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3612                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3613                 </links>
3614         </class>
3615         <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">
3616                 <oils_persist:source_definition>
3617                         SELECT * FROM metabib.author_field_entry
3618                                                 UNION ALL
3619                         SELECT * FROM metabib.keyword_field_entry
3620                                                 UNION ALL
3621                         SELECT * FROM metabib.identifier_field_entry
3622                                                 UNION ALL
3623                         SELECT * FROM metabib.title_field_entry
3624                                                 UNION ALL
3625                         SELECT * FROM metabib.subject_field_entry
3626                                                 UNION ALL
3627                         SELECT * FROM metabib.series_field_entry
3628                 </oils_persist:source_definition>
3629                 <fields>
3630                         <field name="field" reporter:datatype="link"/>
3631                         <field name="id" reporter:datatype="id" />
3632                         <field name="source" reporter:datatype="link"/>
3633                         <field name="value"  reporter:datatype="text"/>
3634                 </fields>
3635                 <links>
3636                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3637                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3638                 </links>
3639         </class>
3640         <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">
3641                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3642                         <field name="field" reporter:datatype="link"/>
3643                         <field name="id" reporter:datatype="id" />
3644                         <field name="source" reporter:datatype="link"/>
3645                         <field name="value"  reporter:datatype="text"/>
3646                 </fields>
3647                 <links>
3648                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3649                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3650                 </links>
3651         </class>
3652         <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">
3653                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3654                         <field name="accepting_usr" reporter:datatype="link"/>
3655                         <field name="amount" reporter:datatype="money" />
3656                         <field name="amount_collected" reporter:datatype="money" />
3657                         <field name="cash_drawer" reporter:datatype="link"/>
3658                         <field name="id" reporter:datatype="id" />
3659                         <field name="note"  reporter:datatype="text"/>
3660                         <field name="payment_ts" reporter:datatype="timestamp"/>
3661                         <field name="xact" reporter:datatype="link"/>
3662                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3663                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3664                 </fields>
3665                 <links>
3666                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3667                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3668                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3669                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3670                 </links>
3671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3672             <actions>
3673                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3674                     <context link="xact" jump="usr" field="home_ou"/>
3675                 </retrieve>
3676                         </actions>
3677                 </permacrud>
3678         </class>
3679         <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">
3680                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3681                         <field name="accepting_usr" reporter:datatype="link"/>
3682                         <field name="amount" reporter:datatype="money" />
3683                         <field name="amount_collected" reporter:datatype="money" />
3684                         <field name="id" reporter:datatype="id" />
3685                         <field name="note"  reporter:datatype="text"/>
3686                         <field name="payment_ts" reporter:datatype="timestamp"/>
3687                         <field name="xact" reporter:datatype="link"/>
3688                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3689                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3690                 </fields>
3691                 <links>
3692                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3693                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3694                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3695                 </links>
3696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3697             <actions>
3698                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3699                     <context link="xact" jump="usr" field="home_ou"/>
3700                 </retrieve>
3701                         </actions>
3702                 </permacrud>
3703         </class>
3704         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3705                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3706                         <field name="accepting_usr" reporter:datatype="link"/>
3707                         <field name="amount" reporter:datatype="money" />
3708                         <field name="amount_collected" reporter:datatype="money" />
3709                         <field name="id" reporter:datatype="id" />
3710                         <field name="note"  reporter:datatype="text"/>
3711                         <field name="payment_ts" reporter:datatype="timestamp"/>
3712                         <field name="xact" reporter:datatype="link"/>
3713                         <field name="billing" reporter:datatype="link"/>
3714                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3715                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3716                 </fields>
3717                 <links>
3718                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3719                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3720                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3721                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3722                 </links>
3723         </class>
3724         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3725                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3726                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3727                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3728                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3729                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3730                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3731                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3732                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3733                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3734                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3735                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3736                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3737                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3738                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3739                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3740                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3741                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3742                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3743                 </fields>
3744                 <links>
3745                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3746                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3747                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3748                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3749                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3750                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3751                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3752                 </links>
3753         </class>
3754
3755         <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">
3756                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3757                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3758                         <field name="name"  reporter:datatype="text"/>
3759                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3760                         <field name="block_list" reporter:datatype="text"/>
3761                         <field name="staff_alert" reporter:datatype="bool"/>
3762                         <field name="org_depth" reporter:datatype="int"/>
3763                         <field name="ignore_proximity" reporter:datatype="int"/>
3764                 </fields>
3765                 <links/>
3766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3767             <actions>
3768                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3769                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3770                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3771                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3772             </actions>
3773         </permacrud>
3774         </class>
3775         <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">
3776                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3777                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3778                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3779                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3780                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3781                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3782                 </fields>
3783                 <links>
3784                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3785                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3786                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3787         </links>
3788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3789             <actions>
3790                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3791                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3792                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3793                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3794             </actions>
3795         </permacrud>
3796         </class>
3797         <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">
3798                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3799                         <field name="holdable" reporter:datatype="bool"/>
3800                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3801                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3802                         <field name="opac_visible" reporter:datatype="bool"/>
3803             <field name="copy_active" reporter:datatype="bool"/>
3804             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3805                 </fields>
3806                 <links/>
3807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3808             <actions>
3809                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3810                 <retrieve/>
3811                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3812                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3813             </actions>
3814         </permacrud>
3815         </class>
3816         <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">
3817                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3818                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3819                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3820                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3821                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3822                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3823                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3824                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3825                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3826                 </fields>
3827                 <links>
3828                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3829                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3830                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3831                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3832                 </links>
3833                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3834                         <actions>
3835                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3836                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3837                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3838                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3839                         </actions>
3840                 </permacrud>
3841         </class>
3842         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3843                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3844                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3845                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3846                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3847                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3848                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3849                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3850                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3851                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3852                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3853                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3854                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3855                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3856                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3857                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3858                 </fields>
3859                 <links>
3860                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3861                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3862                 </links>
3863         </class>
3864         <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">
3865                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3866                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3867                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3868                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3869                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3870                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3871                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3872                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3873                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3874                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3875                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3876                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3877                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3878                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3879                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3880                 </fields>
3881                 <links>
3882                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3883                 </links>
3884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3885                         <actions>
3886                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3887                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3888                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3889                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3890                         </actions>
3891                 </permacrud>
3892         </class>
3893
3894
3895         <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">
3896                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3897                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3898                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3899                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3900                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3901                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3902                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3903                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3904                 </fields>
3905                 <links>
3906                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3907                 </links>
3908         </class>
3909
3910         <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">
3911                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3912                         <field name="call_number" />
3913                         <field name="create_date" reporter:datatype="timestamp"/>
3914                         <field name="creator" reporter:datatype="link"/>
3915                         <field name="id" reporter:datatype="id" />
3916                         <field name="pub" reporter:datatype="bool"/>
3917                         <field name="title"  reporter:datatype="text"/>
3918                         <field name="value"  reporter:datatype="text"/>
3919                 </fields>
3920                 <links>
3921                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3922                 </links>
3923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3924             <actions>
3925                 <create permission="CREATE_VOLUME_NOTE">
3926                     <context link="call_number" field="owning_lib"/>
3927                 </create>
3928                 <retrieve permission="VIEW_VOLUME_NOTES">
3929                     <context link="call_number" field="owning_lib"/>
3930                 </retrieve>
3931                 <update permission="UPDATE_VOLUME_NOTE">
3932                     <context link="call_number" field="owning_lib"/>
3933                 </update>
3934                 <delete permission="DELETE_VOLUME_NOTE">
3935                     <context link="call_number" field="owning_lib"/>
3936                 </delete>
3937             </actions>
3938         </permacrud>
3939         </class>
3940         <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">
3941                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3942                         <field name="create_date" reporter:datatype="timestamp"/>
3943                         <field name="creator" reporter:datatype="link"/>
3944                         <field name="edit_date" reporter:datatype="timestamp"/>
3945                         <field name="editor" reporter:datatype="link"/>
3946                         <field name="id" reporter:datatype="id" />
3947                         <field name="record" reporter:datatype="link"/>
3948                         <field name="value" reporter:datatype="text"/>
3949                 </fields>
3950                 <links>
3951                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3952                 </links>
3953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3954             <actions>
3955                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3956                 <retrieve/>
3957                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3958                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3959             </actions>
3960         </permacrud>
3961         </class>
3962         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3963         <oils_persist:source_definition>
3964 SELECT  usr,
3965         SUM(
3966             CASE
3967                 WHEN (
3968                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3969                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3970                 ) THEN 1
3971                 ELSE 0
3972             END
3973         ) AS out,
3974
3975         SUM(
3976             CASE
3977                 WHEN (
3978                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3979                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3980                 ) THEN 1
3981                 ELSE 0
3982             END
3983         ) AS overdue,
3984
3985         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3986         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3987         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3988   FROM  action.circulation
3989   WHERE checkin_time IS NULL
3990   GROUP BY 1
3991         </oils_persist:source_definition>
3992         <fields oils_persist:primary="usr">
3993             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3994             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3995             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3996             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3997             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3998             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3999         </fields>
4000         <links>
4001             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4002         </links>
4003         </class>
4004         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4005         <oils_persist:source_definition>
4006 SELECT  usr,
4007         STRING_AGG(
4008             CASE
4009                 WHEN (
4010                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4011                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4012                 ) THEN id::TEXT
4013                 ELSE '0'
4014             END
4015         ,',') AS out,
4016
4017         STRING_AGG(
4018             CASE
4019                 WHEN (
4020                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4021                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4022                 ) THEN id::TEXT
4023                 ELSE '0'
4024             END
4025         ,',') AS overdue,
4026
4027         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4028         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4029         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4030   FROM  action.circulation
4031   WHERE checkin_time IS NULL
4032   GROUP BY 1
4033         </oils_persist:source_definition>
4034         <fields oils_persist:primary="usr">
4035             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4036             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4037             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4038             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4039             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4040             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4041         </fields>
4042         <links>
4043             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4044         </links>
4045         </class>
4046         <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">
4047                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4048                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4049                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4050                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4051                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4052                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4053                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4054                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4055                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4056                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4057                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4058                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4059                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4060                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4061                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4062                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4063                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4064                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4065                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4066                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4067                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4068                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4069                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4070                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4071                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4072                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4073                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4074                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4075                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4076                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4077                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4078                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4079                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4080                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4081                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4082                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4083                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4084                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4085                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4086                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4087                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4088                 </fields>
4089                 <links>
4090                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4091                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4092                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4093                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4094                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4095                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4096                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4097                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4098                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4099                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4100                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4101                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4102                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4103                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4104                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4105                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4106                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4107                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4108                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4109                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4110                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4111                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4112                 </links>
4113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4114                         <actions>
4115                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4116                         </actions>
4117                 </permacrud>
4118         </class>
4119         <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">
4120                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4121                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4122                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4123                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4124                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4125                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4126                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4127                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4128                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4129                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4130                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4131                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4132                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4133                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4134                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4135                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4136                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4137                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4138                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4139                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4140                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4141                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4142                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4143                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4144                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4145                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4146                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4147                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4148                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4149                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4150                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4151                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4152                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4153                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4154                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4155                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4156                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4157                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4158                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4159                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4160                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4161                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4162                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4163                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4164                 </fields>
4165                 <links>
4166                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4167                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4168                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4169                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4170                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4171                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4172                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4173                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4174                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4175                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4176                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4177                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4178                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4179                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4180                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4181                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4182                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4183                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4184                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4185                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4186                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4187                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4188                 </links>
4189         </class>
4190         <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">
4191                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4192                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4193                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4194                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4195                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4196                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4197                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4198                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4199                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4200                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4201                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4202                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4203                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4204                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4205                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4206                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4207                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4208                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4209                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4210                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4211                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4212                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4213                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4214                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4215                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4216                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4217                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4218                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4219                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4220                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4221                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4222                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4223                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4224                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4225                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4226                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4227                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4228                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4229                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4230                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4231                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4232                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4233                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4234                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4235                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4236                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4237                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4238                 </fields>
4239                 <links>
4240                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4241                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4242                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4243                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4244                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4245                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4246                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4247                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4248                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4249                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4250                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4251                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4252                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4253                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4254                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4255                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4256                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4257                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4258                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4259                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4260                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4261                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4262                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4263                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4264                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4265                 </links>
4266         </class>
4267         <class id="auch" 
4268                 controller="open-ils.cstore" 
4269                 oils_obj:fieldmapper="action::user_circ_history" 
4270                 oils_persist:tablename="action.usr_circ_history" 
4271                 reporter:label="User Checkout History">
4272                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4273                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4274                         <!-- prevent reporting on the user that owns the checkout history -->
4275                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4276                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4277                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4278                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4279                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4280                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4281                 </fields>
4282                 <links>
4283                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4284                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4285                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4286                 </links>
4287         </class>
4288         <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">
4289                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4290                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4291                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4292                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4293                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4294                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4295                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4296                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4297                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4298                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4299                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4300                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4301                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4302                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4303                 </fields>
4304                 <links>
4305                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4306                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4307                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4308                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4309                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4310                 </links>
4311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4312                         <actions>
4313                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4314                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4315                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4316                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4317                         </actions>
4318                 </permacrud>
4319         </class>
4320
4321         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4322                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4323                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4324                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4325                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4326                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4327                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4328                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4329                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4330                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4331                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4332                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4333                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4334                         <field reporter:label="Catalog Item" name="catalog_item" 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="type" reltype="has_a" key="id" map="" class="brt"/>
4339                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4340                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4341                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4342                 </links>
4343                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4344                         <actions>
4345                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4346                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4347                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4348                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4349                         </actions>
4350                 </permacrud>
4351         </class>
4352         
4353         <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">
4354                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4355                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4356                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4357                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4358                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4359                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4360                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4361                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4362                 </fields>
4363                 <links>
4364                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4365                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4366                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4367                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4368                 </links>
4369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4370                         <actions>
4371                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4372                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4373                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4374                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4375                         </actions>
4376                 </permacrud>
4377         </class>
4378         
4379         <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">
4380                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4381                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4382                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4383                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4384                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4385                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4386                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4387                 </fields>
4388                 <links>
4389                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4390                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4391                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4392                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4393                 </links>
4394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4395                         <actions>
4396                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4397                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4398                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4399                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4400                         </actions>
4401                 </permacrud>
4402         </class>
4403         
4404         <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">
4405                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4406                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4407                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4408                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4409                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4410                 </fields>
4411                 <links>
4412                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4413                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4414                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4415                 </links>
4416                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4417                         <actions>
4418                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4419                     <context link="resource" field="owner" />
4420                 </create>
4421                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4422                     <context link="resource" field="owner" />
4423                 </retrieve>
4424                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4425                     <context link="resource" field="owner" />
4426                 </update>
4427                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4428                     <context link="resource" field="owner" />
4429                 </delete>
4430                         </actions>
4431                 </permacrud>
4432         </class>
4433         
4434         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4435                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4436                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4437                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4438                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4439                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4440                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4441                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4442                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4443                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4444                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4445                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4446                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4447                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4448                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4449                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4450                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4451                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4452                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4453                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4454                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4455                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4456                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4457                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4458                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4459                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4460                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4461                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4462                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4463                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4464                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4465                 </fields>
4466                 <links>
4467                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4468                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4469                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4470                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4471                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4472                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4473                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4474                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4475                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4476                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4477                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4478                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4479                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4480                 </links>
4481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4482                         <actions>
4483                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4484                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4485                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4486                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4487                         </actions>
4488                 </permacrud>
4489         </class>
4490         
4491         <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">
4492                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4493                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4494                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4495                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4496                 </fields>
4497                 <links>
4498                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4499                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4500                 </links>
4501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4502                         <actions>
4503                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4504                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4505                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4506                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4507                         </actions>
4508                 </permacrud>
4509         </class>
4510
4511         <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">
4512                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4513                         <field name="bucket" reporter:datatype="link"/>
4514                         <field name="id" reporter:datatype="id" />
4515                         <field name="target_call_number" reporter:datatype="link" />
4516                         <field name="create_time" reporter:datatype="timestamp" />
4517                         <field name="pos" reporter:datatype="int" />
4518                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4519                 </fields>
4520                 <links>
4521                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4522                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4523             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4524                 </links>
4525         </class>
4526         <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">
4527                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4528                         <field name="id" reporter:datatype="id" />
4529                         <field name="item" reporter:datatype="link"/>
4530                         <field name="note" reporter:datatype="text" />
4531                 </fields>
4532                 <links>
4533                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4534                 </links>
4535         </class>
4536         <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">
4537                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4538                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4539                         <field name="btype" reporter:datatype="text"/>
4540                         <field name="id" reporter:datatype="id" />
4541                         <field name="name" reporter:datatype="text"/>
4542                         <field name="description" reporter:datatype="text"/>
4543                         <field name="owner" reporter:datatype="link"/>
4544                         <field name="pub" reporter:datatype="bool"/>
4545                         <field name="create_time" reporter:datatype="timestamp" />
4546                 </fields>
4547                 <links>
4548                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4549                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4550                 </links>
4551         </class>
4552         <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">
4553                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4554                         <field name="id" reporter:datatype="id" />
4555                         <field name="bucket" reporter:datatype="link"/>
4556                         <field name="note" reporter:datatype="text" />
4557                 </fields>
4558                 <links>
4559                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4560                 </links>
4561         </class>
4562         <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">
4563                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4564                         <field name="hold" reporter:datatype="link"/>
4565                         <field name="id" reporter:datatype="id" />
4566                         <field name="target_copy" reporter:datatype="link"/>
4567                         <field name="proximity" reporter:datatype="number"/>
4568                 </fields>
4569                 <links>
4570                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4571                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4572                 </links>
4573         </class>
4574         <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">
4575                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4576                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4577                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4578                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4579                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4580                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4581                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4582                 </fields>
4583                 <links>
4584                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4585                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4586                 </links>
4587         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4588             <actions>
4589                 <create permission="CREATE_HOLD_NOTIFICATION">
4590                                         <context link="hold" jump="usr" field="home_ou" />
4591                                 </create>
4592                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4593                                         <context link="hold" jump="usr" field="home_ou" />
4594                                 </retrieve>
4595                 <update permission="CREATE_HOLD_NOTIFICATION">
4596                                         <context link="hold" jump="usr" field="home_ou" />
4597                                 </update>
4598                 <delete permission="CREATE_HOLD_NOTIFICATION">
4599                                         <context link="hold" jump="usr" field="home_ou" />
4600                                 </delete>
4601             </actions>
4602         </permacrud>
4603         </class>
4604         <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">
4605                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4606                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4607                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4608                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4609                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4610                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4611                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4612                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4613                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4614                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4615                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4616                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4617                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4618                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4619                 </fields>
4620                 <links>
4621                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4622                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4623                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4624                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4625                 </links>
4626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4627             <actions>
4628                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4629                 <retrieve/>
4630                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4631                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4632             </actions>
4633         </permacrud>
4634         </class>
4635         <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">
4636                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4637                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4638                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4639                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4640                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4641             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4642             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4643             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4644                 </fields>
4645                 <links>
4646                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4647                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4648                 </links>
4649         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4650             <actions>
4651                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4652                 <retrieve/>
4653                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4654                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4655             </actions>
4656         </permacrud>
4657         </class>
4658         <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">
4659                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4660                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4661             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4662             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4663                 </fields>
4664                 <links>
4665                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4666                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4667                 </links>
4668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4669             <actions>
4670                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4671                                         <context link="lgroup" field="owner" />
4672                 </create>
4673                 <retrieve/>
4674                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4675                                         <context link="lgroup" field="owner" />
4676                 </update>
4677                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4678                                         <context link="lgroup" field="owner" />
4679                 </delete>
4680             </actions>
4681         </permacrud>
4682         </class>
4683
4684     <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">
4685         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4686             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4687             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4688             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4689             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4690         </fields>
4691         <links>
4692             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4693             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4694         </links>
4695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4696             <actions>
4697                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4698                 <retrieve/>
4699                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4700                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4701             </actions>
4702         </permacrud>
4703     </class>
4704
4705         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4706                 <fields>
4707                         <field name="sre_id" oils_persist:virtual="true" />
4708                         <field name="location" oils_persist:virtual="true" />
4709                         <field name="owning_lib" oils_persist:virtual="true" />
4710                         <field name="basic_holdings" oils_persist:virtual="true" />
4711                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4712                         <field name="supplement_holdings" oils_persist:virtual="true" />
4713                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4714                         <field name="index_holdings" oils_persist:virtual="true" />
4715                         <field name="index_holdings_add" oils_persist:virtual="true" />
4716                         <field name="online" oils_persist:virtual="true" />
4717                         <field name="missing" oils_persist:virtual="true" />
4718                         <field name="incomplete" oils_persist:virtual="true" />
4719                 </fields>
4720         </class>
4721
4722         <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">
4723                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4724                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4725                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4726                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4727                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4728                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4729                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4730                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4731                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4732                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4733                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4734                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4735                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4736                 </fields>
4737                 <links>
4738                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4739                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4740                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4741                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4742                 </links>
4743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4744                         <actions>
4745                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4746                                 <retrieve/>
4747                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4748                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4749                         </actions>
4750                 </permacrud>
4751         </class>
4752
4753         <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">
4754                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4755                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4756                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4757                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4758                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4759                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4760                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4761                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4762                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4763                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4764                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4765                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4766                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4767                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4768                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4769                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4770                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4771                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4772                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4773                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4774                 </fields>
4775                 <links>
4776                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4777                 </links>
4778                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4779                         <actions>
4780                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4781                                         <context link="subscription" field="owning_lib" />
4782                                 </create>
4783                                 <retrieve />
4784                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4785                                         <context link="subscription" field="owning_lib" />
4786                                 </update>
4787                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4788                                         <context link="subscription" field="owning_lib" />
4789                                 </delete>
4790                         </actions>
4791                 </permacrud>
4792         </class>
4793
4794         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4795                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4796                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4797                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4798                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4799                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4800                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4801                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4802                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4803                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4804                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4805                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4806                 </fields>
4807                 <links>
4808                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4809                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4810                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4811                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4812                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4813                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4814                 </links>
4815                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4816                         <actions>
4817                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4818                                 <retrieve />
4819                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4820                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4821                         </actions>
4822                 </permacrud>
4823         </class>
4824
4825         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4826                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4827                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4828                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4829                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4830                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4831                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4832                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4833                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4834                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4835                 </fields>
4836                 <links>
4837                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4838                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4839                 </links>
4840         </class>
4841
4842         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4843                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4844                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4845                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4846                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4847                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4848                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4849                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4850                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4851                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4852                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4853                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4854                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4855                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4856                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4857                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4858                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4859                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4860                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4861                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4862                 </fields>
4863                 <links>
4864                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4865                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4866                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4867                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4868                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4869                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4870                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4871                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4872                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4873                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4874                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4875                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4876                 </links>
4877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4878                         <actions>
4879                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4880                                 <retrieve />
4881                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4882                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4883                         </actions>
4884                 </permacrud>
4885         </class>
4886
4887         <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">
4888                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4889                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4890                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4891                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4892                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4893                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4894                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4895                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4896                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4897                 </fields>
4898                 <links>
4899                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4900                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4901                 </links>
4902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4903                         <actions>
4904                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4905                                         <context link="distribution" field="holding_lib" />
4906                                 </create>
4907                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4908                                         <context link="distribution" field="holding_lib" />
4909                                 </retrieve>
4910                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4911                                         <context link="distribution" field="holding_lib" />
4912                                 </update>
4913                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4914                                         <context link="distribution" field="holding_lib" />
4915                                 </delete>
4916                         </actions>
4917                 </permacrud>
4918         </class>
4919
4920         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4921                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4922                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4923                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4924                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4925                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4926                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4927                 </fields>
4928                 <links>
4929                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4930                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4931                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4932                 </links>
4933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4934                         <actions>
4935                                 <create permission="ADMIN_SERIAL_STREAM">
4936                                         <context link="distribution" field="holding_lib" />
4937                                 </create>
4938                                 <retrieve />
4939                                 <update permission="ADMIN_SERIAL_STREAM">
4940                                         <context link="distribution" field="holding_lib" />
4941                                 </update>
4942                                 <delete permission="ADMIN_SERIAL_STREAM">
4943                                         <context link="distribution" field="holding_lib" />
4944                                 </delete>
4945                         </actions>
4946                 </permacrud>
4947         </class>
4948
4949         <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">
4950                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4951                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4952                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4953                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4954                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4955                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4956                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4957                 </fields>
4958                 <links>
4959                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4960                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4961                 </links>
4962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4963                         <actions>
4964                                 <create permission="ADMIN_SERIAL_STREAM">
4965                                         <context link="stream" jump="distribution" field="holding_lib" />
4966                                 </create>
4967                                 <retrieve permission="RECEIVE_SERIAL">
4968                                         <context link="stream" jump="distribution" field="holding_lib" />
4969                                 </retrieve>
4970                                 <update permission="ADMIN_SERIAL_STREAM">
4971                                         <context link="stream" jump="distribution" field="holding_lib" />
4972                                 </update>
4973                                 <delete permission="ADMIN_SERIAL_STREAM">
4974                                         <context link="stream" jump="distribution" field="holding_lib" />
4975                                 </delete>
4976                         </actions>
4977                 </permacrud>
4978         </class>
4979
4980         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4981                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4982                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4983                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4984                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4985                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4986                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4987                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4988                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4989                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4990                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4991                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4992                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4993                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4994                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4995                 </fields>
4996                 <links>
4997                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4998                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4999                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5000                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5001                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5002                 </links>
5003                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5004                         <actions>
5005                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5006                                         <context link="subscription" field="owning_lib" />
5007                                 </create>
5008                                 <retrieve/>
5009                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5010                                         <context link="subscription" field="owning_lib" />
5011                                 </update>
5012                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5013                                         <context link="subscription" field="owning_lib" />
5014                                 </delete>
5015                         </actions>
5016                 </permacrud>
5017         </class>
5018
5019         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5020                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5021                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5022                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5023                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5024                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5025                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5026                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5027                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5028                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5029                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5030                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5031                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5032                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5033                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5034                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5035                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5036                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5037                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5038                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5039                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5040                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5041                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5042                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5043                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5044                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5045                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5046                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5047                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5048                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5049                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5050                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5051                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5052                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5053                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5054                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5055                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5056                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5057                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5058                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5059                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5060                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5061                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5062                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5063                 </fields>
5064                 <links>
5065                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5066                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5067                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5068                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5069                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5070                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5071                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5072                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5073                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5074                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5075                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5076                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5077                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5078                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5079                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5080                 </links>
5081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5082                         <actions>
5083                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5084                                 <retrieve/>
5085                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5086                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5087                         </actions>
5088                 </permacrud>
5089         </class>
5090
5091         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5092                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5093                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5094                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5095                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5096                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5097                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5098                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5099                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5100                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5101                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5102                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5103                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5104                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5105                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5106                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5107                 </fields>
5108                 <links>
5109                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5110                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5111                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5112                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5113                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5114                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5115                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5116                 </links>
5117                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5118                         <actions>
5119                                 <create permission="ADMIN_SERIAL_ITEM">
5120                                         <context link="stream" jump="distribution" field="holding_lib" />
5121                                 </create>
5122                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5123                                         <context link="stream" jump="distribution" field="holding_lib" />
5124                                 </retrieve>
5125                                 <update permission="ADMIN_SERIAL_ITEM">
5126                                         <context link="stream" jump="distribution" field="holding_lib" />
5127                                 </update>
5128                                 <delete permission="ADMIN_SERIAL_ITEM">
5129                                         <context link="stream" jump="distribution" field="holding_lib" />
5130                                 </delete>
5131                         </actions>
5132                 </permacrud>
5133         </class>
5134
5135         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5136                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5137                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5138                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5139                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5140                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5141                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5142                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5143                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5144                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5145                 </fields>
5146                 <links>
5147                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5148                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5149                 </links>
5150                 <!-- Not available via PCRUD at this time -->
5151         </class>
5152         <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">
5153                 <fields>
5154                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5155                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5156                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5157                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5158                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5159                 </fields>
5160                 <links>
5161                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5162                 </links>
5163         </class>
5164         <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">
5165                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5166                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5167                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5168                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5169                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5170                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5171                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5172                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5173                 </fields>
5174                 <links>
5175                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5176                 </links>
5177         </class>
5178         <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">
5179                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_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="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">
5206                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_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="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">
5233                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5234                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5235                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5236                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5237                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5238                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5239                 </fields>
5240                 <links>
5241                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5242                 </links>
5243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5244                         <actions>
5245                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5246                                         <context link="distribution" field="holding_lib" />
5247                                 </create>
5248                                 <retrieve/>
5249                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5250                                         <context link="distribution" field="holding_lib" />
5251                                 </update>
5252                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5253                                         <context link="distribution" field="holding_lib" />
5254                                 </delete>
5255                         </actions>
5256                 </permacrud>
5257         </class>
5258
5259         <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">
5260                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5261                         <field name="id" reporter:datatype="id" />
5262                         <field name="owning_copy" reporter:datatype="link"/>
5263                         <field name="stat_cat" reporter:datatype="link"/>
5264                         <field name="stat_cat_entry" reporter:datatype="link"/>
5265                 </fields>
5266                 <links>
5267                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5268                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5269                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5270                 </links>
5271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5272                         <actions>
5273                                 <retrieve/>
5274                         </actions>
5275                 </permacrud>
5276         </class>
5277         <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">
5278                 <fields oils_persist:primary="code">
5279                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5280                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5281                 </fields>
5282                 <links/>
5283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5284             <actions>
5285                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5286                 <retrieve/>
5287                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5288                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5289             </actions>
5290         </permacrud>
5291         </class>
5292         <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">
5293                 <fields oils_persist:primary="code">
5294                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5295                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5296                 </fields>
5297                 <links/>
5298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5299             <actions>
5300                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5301                 <retrieve/>
5302                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5303                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5304             </actions>
5305         </permacrud>
5306         </class>
5307         <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">
5308                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5309                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5310                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5311                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5312                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5313                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5314                 </fields>
5315                 <links>
5316             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5317         </links>
5318         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5319             <actions>
5320                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5321                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5322                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5323                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5324             </actions>
5325         </permacrud>
5326         </class>
5327         <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">
5328                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5329                         <field name="id" reporter:datatype="id" />
5330                         <field name="name" reporter:datatype="text"/>
5331                 </fields>
5332                 <links/>
5333         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5334             <actions>
5335                 <create permission="CREATE_LASSO" global_required="true"/>
5336                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5337                 <update permission="UPDATE_LASSO" global_required="true"/>
5338                 <delete permission="DELETE_LASSO" global_required="true"/>
5339             </actions>
5340         </permacrud>
5341         </class>
5342         <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">
5343                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5344                         <field name="id" reporter:datatype="id" />
5345                         <field name="lasso" reporter:datatype="link"/>
5346                         <field name="org_unit" reporter:datatype="org_unit"/>
5347                 </fields>
5348                 <links>
5349                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5350                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5351                 </links>
5352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5353             <actions>
5354                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5355                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5356                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5357                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5358             </actions>
5359         </permacrud>
5360         </class>
5361         <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">
5362                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5363                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5364                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5365                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5366                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5367                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5368                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5369                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5370                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5371                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5372                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5373                 </fields>
5374                 <links>
5375                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5376                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5377                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5378                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5379                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5380                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5381                 </links>
5382         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5383             <actions>
5384                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5385                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5386                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5387                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5388             </actions>
5389         </permacrud>
5390         </class>
5391         <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">
5392                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5393                         <field name="id" reporter:datatype="id" />
5394                         <field name="from_org" reporter:datatype="org_unit"/>
5395                         <field name="to_org" reporter:datatype="org_unit"/>
5396                         <field name="prox" reporter:datatype="int" />
5397                 </fields>
5398                 <links>
5399                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5400                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5401                 </links>
5402         </class>
5403         <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">
5404                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5405                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5406                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5407                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5408                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5409                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5410                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5411                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5412                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5413                 </fields>
5414                 <links/>
5415         </class>
5416         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5417                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5418                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5419                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5420                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5421                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5422                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5423                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5424                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5425                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5426                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5427                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5428                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5429                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5430                 </fields>
5431                 <links>
5432                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5433                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5434                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5435                 </links>
5436         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5437             <actions>
5438                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5439                 <retrieve/>
5440                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5441                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5442             </actions>
5443         </permacrud>
5444         </class>
5445         <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">
5446                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5447                         <field name="address_type"  reporter:datatype="text"/>
5448                         <field name="city"  reporter:datatype="text"/>
5449                         <field name="country"  reporter:datatype="text"/>
5450                         <field name="county"  reporter:datatype="text"/>
5451                         <field name="id" reporter:datatype="id" />
5452                         <field name="org_unit" reporter:datatype="org_unit"/>
5453                         <field name="post_code"  reporter:datatype="text"/>
5454                         <field name="state"  reporter:datatype="text"/>
5455                         <field name="street1"  reporter:datatype="text"/>
5456                         <field name="street2"  reporter:datatype="text"/>
5457                         <field name="valid" reporter:datatype="bool"/>
5458                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5459                 </fields>
5460                 <links>
5461                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5462                 </links>
5463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5464             <actions>
5465                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5466                 <retrieve/>
5467                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5468                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5469             </actions>
5470         </permacrud>
5471         </class>
5472         <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">
5473                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5474                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5475                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5476                         <field name="query_text" reporter:datatype="text"/>
5477                 </fields>
5478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5479             <actions>
5480                 <retrieve/>
5481             </actions>
5482         </permacrud>
5483         </class>
5484
5485         <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">
5486                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5487                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5488                         <field name="owner" reporter:datatype="org_unit"/>
5489                         <field name="code" reporter:datatype="text"/>
5490                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5491                         <field name="create_date" reporter:datatype="timestamp"/>
5492                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5493                 </fields>
5494                 <links>
5495                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5496                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5497                 </links>
5498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5499             <actions>
5500                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5501                 <retrieve/>
5502                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5503                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5504             </actions>
5505         </permacrud>
5506         </class>
5507         <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">
5508                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5509                         <field name="id" reporter:datatype="id"/>
5510                         <field name="grp" reporter:datatype="link"/>
5511                         <field name="pos" reporter:datatype="int"/>
5512                         <field name="query" reporter:datatype="link"/>
5513                 </fields>
5514                 <links>
5515                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5516                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5517                 </links>
5518         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5519             <actions>
5520                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5521                     <context link="grp" field="owner"/>
5522                 </create>
5523                 <retrieve/>
5524                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5525                     <context link="grp" field="owner"/>
5526                 </update>
5527                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5528                     <context link="grp" field="owner"/>
5529                 </delete>
5530             </actions>
5531         </permacrud>
5532         </class>
5533
5534         <!-- A note: Please update alhr and ahopl when updating ahr -->
5535         <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">
5536                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5537                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5538                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5539                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5540                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5541                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5542                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5543                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5544                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5545                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5546                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5547                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5548                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5549                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5550                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5551                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5552                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5553                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5554                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5555                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5556                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5557                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5558                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5559                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5560                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5561                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5562                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5563                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5564                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5565                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5566                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5567                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5568                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5569                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5570                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5571                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5572                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5573                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5574                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5575                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5576                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5577                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5578                 </fields>
5579                 <links>
5580                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5581                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5582                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5583                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5584                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5585                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5586                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5587                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5588                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5589                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5590                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5591                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5592                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5593                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5594                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5595                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5596                 </links>
5597                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5598                         <actions>
5599                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5600                         </actions>
5601                 </permacrud>
5602         </class>
5603         <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">
5604                 <oils_persist:source_definition><![CDATA[
5605                 SELECT
5606                         ahr.*,
5607                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5608                                 copy_location_order_position,
5609                         CASE WHEN au.alias IS NOT NULL THEN
5610                                 au.alias
5611                         ELSE
5612                                 au.first_given_name
5613                         END AS usr_alias_or_first_given_name,
5614                         au.first_given_name AS usr_first_given_name,
5615                         au.second_given_name AS usr_second_given_name,
5616                         au.family_name AS usr_family_name,
5617                         au.prefix AS usr_prefix,
5618                         au.suffix AS usr_suffix,
5619                         au.alias AS usr_alias,
5620                         CASE WHEN au.alias IS NOT NULL THEN
5621                                 au.alias
5622                         ELSE
5623                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5624                                         COALESCE(au.family_name, ''),
5625                                         COALESCE(au.suffix, ''),
5626                                         ', ',
5627                                         COALESCE(au.prefix, ''),
5628                                         COALESCE(au.first_given_name, ''),
5629                                         COALESCE(au.second_given_name, '')
5630                                 ], ' '), E'\\s+,', ',')
5631                         END AS usr_alias_or_display_name,
5632                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5633                                 COALESCE(au.family_name, ''),
5634                                 COALESCE(au.suffix, ''),
5635                                 ', ',
5636                                 COALESCE(au.prefix, ''),
5637                                 COALESCE(au.first_given_name, ''),
5638                                 COALESCE(au.second_given_name, '')
5639                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5640                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5641                                 AS call_number_label,
5642                         siss.label AS issuance_label,
5643                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5644                         ahcm_1.copy_count AS potential_copies
5645                 FROM action.hold_request ahr
5646                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5647                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5648                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5649                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5650                 JOIN actor.usr au ON (au.id = ahr.usr)
5651                 JOIN (
5652                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5653                         FROM asset.copy_location
5654                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5655                 LEFT JOIN actor.usr_standing_penalty ausp 
5656                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5657                 LEFT JOIN config.standing_penalty csp
5658                         ON (
5659                                 csp.id = ausp.standing_penalty AND 
5660                                 csp.block_list LIKE '%CAPTURE%' AND (
5661                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5662                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5663                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5664                                         )
5665                                 )
5666                         )
5667                 JOIN (
5668                         SELECT COUNT(target_copy) AS copy_count, hold
5669                         FROM action.hold_copy_map
5670                         GROUP BY 2
5671                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5672                 LEFT JOIN serial.issuance siss
5673                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5674                 LEFT JOIN asset.copy_location_order acplo
5675                         ON (acp.location = acplo.location AND
5676                                 acp.circ_lib = acplo.org)
5677                 WHERE
5678                         ahr.capture_time IS NULL AND
5679                         ahr.cancel_time IS NULL AND
5680                         csp.id IS NULL AND
5681                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5682                         acp.status IN (0,7)
5683                 ]]></oils_persist:source_definition>
5684                 <fields oils_persist:primary="id">
5685                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5686                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5687                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5688                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5689                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5690                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5691                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5692                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5693                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5694                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5695                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5696                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5697                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5698                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5699                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5700                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5701                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5702                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5703                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5704                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5705                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5706                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5707                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5708                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5709                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5710                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5711                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5712                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5713                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5714                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5715                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5716                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5717                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5718                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5719                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5720                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5721                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5722                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5723                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5724                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5725                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5726                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5727                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5728                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5729                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5730                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5731                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5732                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5733                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5734                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5735                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5736                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5737                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5738                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5739                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5740                 </fields>
5741                 <links>
5742                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5743                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5744                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5745                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5746                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5747                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5748                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5749                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5750                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5751                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5752                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5753                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5754                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5755                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5756                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5757                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5758                 </links>
5759                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5760                         <actions>
5761                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5762                         </actions>
5763                 </permacrud>
5764         </class>
5765         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5766                 <oils_persist:source_definition>
5767                         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)
5768                 </oils_persist:source_definition>
5769                 <fields oils_persist:primary="id">
5770                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5771                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5772                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5773                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5774                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5775                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5776                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5777                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5778                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5779                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5780                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5781                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5782                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5783                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5784                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5785                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5786                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5787                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5788                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5789                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5790                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5791                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5792                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5793                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5794                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5795                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5796                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5797                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5798                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5799                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5800                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5801                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5802                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5803                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5804                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5805                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5806                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5807                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5808                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5809                 </fields>
5810                 <links>
5811                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5812                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5813                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5814                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5815                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5816                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5817                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5818                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5819                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5820                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5821                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5822                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5823                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5824                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5825                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5826                 </links>
5827         </class>
5828
5829         <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">
5830                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5831                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5832                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5833                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5834                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5835                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5836                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5837                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5838                 </fields>
5839                 <links>
5840                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5841                 </links>
5842                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5843                         <actions>
5844                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5845                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5846                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5847                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5848                         </actions>
5849                 </permacrud>
5850         </class>
5851         <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">
5852                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5853                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5854                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5855                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5856                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5857                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5858                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5859                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5860                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5861                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5862                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5863                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5864                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5865                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5866                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5867                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5868                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5869                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5870                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5871                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5872                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5873                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5874                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5875                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5876                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5877                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5878                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5879                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5880                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5881                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5882                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5883                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5884                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5885                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5886                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5887                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5888                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5889                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5890                 </fields>
5891                 <links>
5892                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5893                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5894                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5895                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5896                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5897                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5898                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5899                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5900                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5901                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5902                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5903                 </links>
5904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5905                         <actions>
5906                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5907                         </actions>
5908                 </permacrud>
5909         </class>
5910         <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">
5911                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5912                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5913                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5914                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5915                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5916                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5917                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5918                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5919                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5920                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5921                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5922                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5923                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5924                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5925                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5926                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5927                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5928                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5929                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5930                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5931                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5932                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5933                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5934                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5935                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5936                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5937                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5938                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5939                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5940                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5941                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5942                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5943                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5944                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5945                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5946                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5947                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5948                 </fields>
5949                 <links>
5950                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5951                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5952                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5953                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5954                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5955                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5956                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5957                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5958                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5959                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5960                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5961                 </links>
5962                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5963                         <actions>
5964                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5965                         </actions>
5966                 </permacrud>
5967         </class>
5968
5969         <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">
5970                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5971                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5972                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5973                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5974                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5975                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5976                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5977                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5978                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5979                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5980                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5981                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5982                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5983                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5984                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5985                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5986                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5987                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5988                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5989                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5990                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5991                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5992                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5993                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5994                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5995                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5996                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5997                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5998                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5999                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6000                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6001                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6002                 </fields>
6003                 <links>
6004                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6005                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6006                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6007                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6008                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6009                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6010                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6011                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6012                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6013                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6014                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6015                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6016                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6017                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6018                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6019                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6020                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6021                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6022                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6023                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6024                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6025                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6026                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6027                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6028                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6029                 </links>
6030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6031             <actions>
6032                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6033                 <retrieve />
6034                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6035                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6036             </actions>
6037         </permacrud>
6038         </class>
6039         <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">
6040                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6041                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6042                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6043                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6044                 </fields>
6045                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6046                         <actions>
6047                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6048                                 <retrieve/>
6049                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6050                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6051                         </actions>
6052                 </permacrud>
6053         </class>
6054         <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">
6055                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6056                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6057                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6058                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6059                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6060                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6061                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6062                 </fields>
6063                 <links>
6064                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6065                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6066                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6067                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6068                 </links>
6069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6070                         <actions>
6071                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6072                                 <retrieve/>
6073                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6074                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6075                         </actions>
6076                 </permacrud>
6077         </class>
6078         <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">
6079                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6080                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6081                         <field name="btype" reporter:datatype="text"/>
6082                         <field name="id" reporter:datatype="id" />
6083                         <field name="name"  reporter:datatype="text"/>
6084                         <field name="description" reporter:datatype="text"/>
6085                         <field name="owner" reporter:datatype="link"/>
6086                         <field name="pub" reporter:datatype="bool"/>
6087                         <field name="create_time" reporter:datatype="timestamp" />
6088                 </fields>
6089                 <links>
6090                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6091                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6092                 </links>
6093         </class>
6094         <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">
6095                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6096                         <field name="id" reporter:datatype="id" />
6097                         <field name="bucket" reporter:datatype="link"/>
6098                         <field name="note" reporter:datatype="text" />
6099                 </fields>
6100                 <links>
6101                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6102                 </links>
6103         </class>
6104         <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">
6105                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6106                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6107                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6108                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6109                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6110                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6111                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6112                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6113                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6114                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6115                 </fields>
6116                 <links>
6117                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6118                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6119                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6120                 </links>
6121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6122                         <actions>
6123                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6124                         </actions>
6125                 </permacrud>
6126         </class>
6127         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6128                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6129                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6130                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6131                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6132                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6133                 </fields>
6134                 <links>
6135                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6136                 </links>
6137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6138                         <actions>
6139                                 <retrieve permission="VIEW_USER">
6140                                         <context link="usr" field="home_ou" />
6141                                 </retrieve>
6142                         </actions>
6143                 </permacrud>
6144         </class>
6145     <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">
6146         <fields oils_persist:primary="field">
6147             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6148             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6149             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6150         </fields>
6151         <links/>
6152         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6153             <actions>
6154                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6155                 <retrieve />
6156                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6157                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6158             </actions>
6159         </permacrud>
6160     </class>
6161         <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">
6162                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6163                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6164                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6165                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6166                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6167                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6168                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6169                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6170                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6171                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6172                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6173                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6174                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6175                 </fields>
6176                 <links>
6177                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6178                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6179                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6180                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6181                 </links>
6182         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6183             <actions>
6184                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6185                 <retrieve />
6186                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6187                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6188             </actions>
6189         </permacrud>
6190         </class>
6191         <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">
6192                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6193                         <field name="field" reporter:datatype="link"/>
6194                         <field name="id" reporter:datatype="id" />
6195                         <field name="source" reporter:datatype="link"/>
6196                         <field name="value"  reporter:datatype="text"/>
6197                 </fields>
6198                 <links>
6199                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6200                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6201                 </links>
6202         </class>
6203         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6204                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6205                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6206                         <field name="btype" reporter:datatype="text"/>
6207                         <field name="id" reporter:datatype="id" />
6208                         <field name="name"  reporter:datatype="text"/>
6209                         <field name="description" reporter:datatype="text"/>
6210                         <field name="owner" reporter:datatype="link"/>
6211                         <field name="pub" reporter:datatype="bool"/>
6212                         <field name="create_time" reporter:datatype="timestamp" />
6213                 </fields>
6214                 <links>
6215                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6216                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6217                 </links>
6218         </class>
6219         <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">
6220                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6221                         <field name="id" reporter:datatype="id" />
6222                         <field name="bucket" reporter:datatype="link"/>
6223                         <field name="note" reporter:datatype="text" />
6224                 </fields>
6225                 <links>
6226                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6227                 </links>
6228         </class>
6229         <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">
6230                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6231                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6232                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6233                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6234                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6235                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6236                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6237                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6238                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6239                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6240                 </fields>
6241                 <links>
6242                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6243                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6244                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6245                 </links>
6246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6247             <actions>
6248                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6249                     <context link="xact" jump="usr" field="home_ou"/>
6250                 </retrieve>
6251                         </actions>
6252                 </permacrud>
6253         </class>
6254         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6255                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6256                         <field name="id" reporter:datatype="id" />
6257                         <field name="ind1" />
6258                         <field name="ind2" />
6259                         <field name="record" />
6260                         <field name="subfield" />
6261                         <field name="tag" />
6262                         <field name="value" />
6263                 </fields>
6264                 <links>
6265                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6266                 </links>
6267         </class>
6268         <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">
6269                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6270                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6271                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6272                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6273                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6274                 </fields>
6275                 <links>
6276                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6277                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6278                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6279                 </links>
6280         </class>
6281         <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">
6282                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6283                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6284                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6285                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6286                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6287                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6288                 </fields>
6289                 <links>
6290                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6291                 </links>
6292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6293             <actions>
6294                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6295                 <retrieve/>
6296                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6297                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6298             </actions>
6299         </permacrud>
6300
6301         </class>
6302         <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">
6303                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6304                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6305                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6306                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6307                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6308                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6309                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6310                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6311                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6312                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6313                 </fields>
6314                 <links>
6315                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6316                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6317                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6318                 </links>
6319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6320             <actions>
6321                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6322                 <retrieve/>
6323                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6324                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6325             </actions>
6326         </permacrud>
6327         </class>
6328         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6329                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6330                         <field name="create_date" reporter:datatype="timestamp"/>
6331                         <field name="creator" reporter:datatype="link"/>
6332                         <field name="edit_date" reporter:datatype="timestamp"/>
6333                         <field name="editor" reporter:datatype="link"/>
6334                         <field name="id" reporter:datatype="id" />
6335                         <field name="pub" reporter:datatype="bool"/>
6336                         <field name="record" reporter:datatype="link"/>
6337                         <field name="value"  reporter:datatype="text"/>
6338                 </fields>
6339                 <links>
6340                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6341                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6342                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6343                 </links>
6344         </class>
6345         <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">
6346                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6347                         <field name="balance_owed" reporter:datatype="money" />
6348                         <field name="total_owed" reporter:datatype="money" />
6349                         <field name="total_paid" reporter:datatype="money" />
6350                         <field name="usr" reporter:datatype="link"/>
6351                 </fields>
6352                 <links>
6353                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6354                 </links>
6355         </class>
6356         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6357                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6358                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6359                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6360                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6361                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6362                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6363                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6364                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6365                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6366                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6367                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6368                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6369                 </fields>
6370                 <links>
6371                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6372                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6373                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6374                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6375                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6376                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6377                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6378                 </links>
6379         </class>
6380         <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">
6381                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6382                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6383                         <field name="quality" reporter:datatype="int" />
6384                         <field name="source" reporter:datatype="text"/>
6385                         <field name="transcendant" reporter:datatype="bool"/>
6386                         <field name="can_have_copies" reporter:datatype="bool"/>
6387                 </fields>
6388                 <links/>
6389         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6390             <actions>
6391                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6392                 <retrieve/>
6393                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6394                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6395             </actions>
6396         </permacrud>
6397         </class>
6398         <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">
6399                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6400                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6401                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6402                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6403                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6404                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6405                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6406                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6407                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6408                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6409                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6410                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6411                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6412                 </fields>
6413                 <links>
6414                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6415                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6416                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6417                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6418                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6419                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6420                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6421                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6422                 </links>
6423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6424                         <actions>
6425                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6426                                         <context link="usr" field="home_ou" />
6427                                 </retrieve>
6428                         </actions>
6429                 </permacrud>
6430         </class>
6431         <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">
6432                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6433                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6434                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6435                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6436                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6437                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6438                 </fields>
6439                 <links>
6440                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6441                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6442                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6443                 </links>
6444         </class>
6445         <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">
6446                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6447                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6448                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6449                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6450                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6451                 </fields>
6452                 <links>
6453                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6454                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6455                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6456                 </links>
6457         </class>
6458         <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">
6459                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6460                         <field name="bucket" reporter:datatype="link"/>
6461                         <field name="id" reporter:datatype="id" />
6462                         <field name="target_user" reporter:datatype="link"/>
6463                         <field name="create_time" reporter:datatype="timestamp" />
6464                         <field name="pos" reporter:datatype="int" />
6465                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6466                 </fields>
6467                 <links>
6468                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6469                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6470             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6471                 </links>
6472         </class>
6473         <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">
6474                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6475                         <field name="id" reporter:datatype="id" />
6476                         <field name="item" reporter:datatype="link"/>
6477                         <field name="note" reporter:datatype="text" />
6478                 </fields>
6479                 <links>
6480                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6481                 </links>
6482         </class>
6483         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6484                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6485                         <field name="balance_owed" reporter:datatype="money" />
6486                         <field name="total_owed" reporter:datatype="money" />
6487                         <field name="total_paid" reporter:datatype="money" />
6488                         <field name="usr" reporter:datatype="link"/>
6489                 </fields>
6490                 <links>
6491                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6492                 </links>
6493         </class>
6494         <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">
6495                 <fields oils_persist:primary="code" oils_persist:sequence="">
6496                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6497                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6498                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6499                 </fields>
6500                 <links/>
6501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6502             <actions>
6503                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6504                 <retrieve/>
6505                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6506                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6507             </actions>
6508         </permacrud>
6509         </class>
6510         <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">
6511                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6512                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6513                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6514                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6515                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6516                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6517                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6518                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6519                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6520                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6521                 </fields>
6522                 <links>
6523                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6524                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6525                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6526                 </links>
6527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6528             <actions>
6529                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6530                     <context link="xact" jump="usr" field="home_ou"/>
6531                 </retrieve>
6532                         </actions>
6533                 </permacrud>
6534         </class>
6535         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6536                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6537                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6538                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6539                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6540                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6541                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6542                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6543                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6544                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6545                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6546                 </fields>
6547                 <links>
6548                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6549                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6550                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6551                 </links>
6552         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6553             <actions>
6554                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6555                     <context link="xact" jump="usr" field="home_ou"/>
6556                 </retrieve>
6557                         </actions>
6558                 </permacrud>
6559         </class>
6560         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6561                 <fields oils_persist:primary="id" oils_persist:sequence="">
6562                         <field name="checkin_lib" reporter:datatype="link"/>
6563                         <field name="checkin_staff" reporter:datatype="link"/>
6564                         <field name="checkin_time" reporter:datatype="timestamp"/>
6565                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6566                         <field name="circ_staff" reporter:datatype="link"/>
6567                         <field name="desk_renewal" reporter:datatype="bool"/>
6568                         <field name="due_date" reporter:datatype="timestamp"/>
6569                         <field name="duration" reporter:datatype="interval"/>
6570                         <field name="duration_rule" reporter:datatype="link"/>
6571                         <field name="fine_interval" reporter:datatype="interval"/>
6572                         <field name="id" reporter:datatype="id" />
6573                         <field name="max_fine" reporter:datatype="money" />
6574                         <field name="max_fine_rule" reporter:datatype="link"/>
6575                         <field name="opac_renewal" reporter:datatype="bool"/>
6576                         <field name="phone_renewal" reporter:datatype="bool"/>
6577                         <field name="recurring_fine" reporter:datatype="money" />
6578                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6579                         <field name="renewal_remaining" reporter:datatype="int" />
6580             <field name="grace_period" reporter:datatype="interval" />
6581                         <field name="stop_fines" reporter:datatype="text"/>
6582                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6583                         <field name="target_copy" reporter:datatype="link"/>
6584                         <field name="usr" reporter:datatype="link"/>
6585                         <field name="xact_finish" reporter:datatype="timestamp" />
6586                         <field name="xact_start" reporter:datatype="timestamp" />
6587                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6588                 </fields>
6589                 <links>
6590                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6591                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6592                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6593                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6594                 </links>
6595         </class>
6596         <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">
6597                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6598                         <field name="field" reporter:datatype="link"/>
6599                         <field name="id" reporter:datatype="id" />
6600                         <field name="source" reporter:datatype="link"/>
6601                         <field name="value" reporter:datatype="text"/>
6602                 </fields>
6603                 <links>
6604                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6605                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6606                 </links>
6607         </class>
6608         <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">
6609                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6610                         <field name="high" reporter:datatype="money" />
6611                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6612                         <field name="low" reporter:datatype="money" />
6613                         <field name="name" reporter:datatype="text"/>
6614                         <field name="normal" reporter:datatype="money" />
6615                         <field name="recurrence_interval" reporter:datatype="interval"/>
6616             <field name="grace_period" reporter:datatype="interval" />
6617                 </fields>
6618                 <links/>
6619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6620             <actions>
6621                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6622                 <retrieve/>
6623                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6624                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6625             </actions>
6626         </permacrud>
6627         </class>
6628         <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">
6629                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6630                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6631                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6632                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6633                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6634                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6635                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6636                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6637                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6638                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6639                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6640                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6641                 </fields>
6642                 <links>
6643                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6644                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6645                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6646                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6647                 </links>
6648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6649             <actions>
6650                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6651                     <context link="xact" jump="usr" field="home_ou"/>
6652                 </retrieve>
6653                         </actions>
6654                 </permacrud>
6655         </class>
6656         <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">
6657                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6658                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6659                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6660                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6661                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6662                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6663                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6664                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6665                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6666                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6667                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6668                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6669                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6670                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6671                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6672                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6673                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6674                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6675                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6676                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6677                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6678                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6679                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6680                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6681                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6682                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6683                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6684                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6685                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6686                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6687                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6688                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6689                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6690                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6691                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6692                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6693                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6694                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6695                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6696                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6697                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6698                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6699                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6700                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6701                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6702                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6703                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6704                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6705                 </fields>
6706                 <links>
6707                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6708                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6709                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6710                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6711                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6712                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6713                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6714                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6715                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6716                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6717                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6718                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6719                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6720                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6721                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6722                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6723                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6724                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6725                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6726                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6727                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6728                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6729                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6730                 </links>
6731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6732             <actions>
6733                 <create permission="CREATE_COPY">
6734                     <context link="call_number" field="owning_lib"/>
6735                 </create>
6736                 <retrieve/>
6737                 <update permission="UPDATE_COPY">
6738                     <context link="call_number" field="owning_lib"/>
6739                 </update>
6740                 <delete permission="DELETE_COPY">
6741                     <context link="call_number" field="owning_lib"/>
6742                 </delete>
6743             </actions>
6744         </permacrud>
6745         </class>
6746
6747         <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">
6748                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6749                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6750                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6751                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6752                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6753                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6754                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6755                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6756                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6757                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6758                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6759                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6760                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6761                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6762                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6763                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6764                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6765                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6766                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6767                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6768                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6769                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6770                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6771                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6772                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6773                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6774                 </fields>
6775                 <links>
6776                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6777                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6778                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6779                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6780                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6781                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6782                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6783                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6784                 </links>
6785                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6786                         <actions>
6787                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6788                                 <retrieve />
6789                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6790                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6791                         </actions>
6792                 </permacrud>
6793         </class>
6794
6795         <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">
6796                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6797                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6798                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6799                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6800                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6801                 </fields>
6802                 <links/>
6803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6804             <actions>
6805                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6806                 <retrieve/>
6807                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6808                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6809             </actions>
6810         </permacrud>
6811         </class>
6812         <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">
6813                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6814                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6815                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6816                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6817                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6818                 </fields>
6819                 <links/>
6820         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6821             <actions>
6822                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6823                 <retrieve/>
6824                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6825                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6826             </actions>
6827         </permacrud>
6828         </class>
6829         <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">
6830                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6831                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6832                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6833                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6834                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6835                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6836                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6837                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6838                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6839                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6840                 </fields>
6841                 <links>
6842                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6843                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6844                 </links>
6845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6846             <actions>
6847                 <create permission="CREATE_PERM" global_required="true"/>
6848                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6849                 <update permission="UPDATE_PERM" global_required="true"/>
6850                 <delete permission="DELETE_PERM" global_required="true"/>
6851             </actions>
6852         </permacrud>
6853         </class>
6854         <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">
6855                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6856                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6857                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6858                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6859                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6860                 </fields>
6861                 <links>
6862                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6863                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6864                 </links>
6865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6866             <actions>
6867                 <create permission="ADMIN_SURVEY">
6868                     <context link="question" jump="survey" field="owner"/>
6869                 </create>
6870                 <retrieve/>
6871                 <update permission="ADMIN_SURVEY">
6872                     <context link="question" jump="survey" field="owner"/>
6873                 </update>
6874                 <delete permission="ADMIN_SURVEY">
6875                     <context link="question" jump="survey" field="owner"/>
6876                 </delete>
6877             </actions>
6878         </permacrud>
6879         </class>
6880         <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">
6881                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6882                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6883                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6884                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6885                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6886                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6887                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6888                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6889                 </fields>
6890                 <links>
6891                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6892                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6893                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6894                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6895                 </links>
6896                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6897                         <actions>
6898                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6899                         </actions>
6900                 </permacrud>
6901         </class>
6902         <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">
6903                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6904                         <field name="balance_owed" reporter:datatype="money" />
6905                         <field name="total_owed" reporter:datatype="money" />
6906                         <field name="total_paid" reporter:datatype="money" />
6907                         <field name="usr" reporter:datatype="link"/>
6908                 </fields>
6909                 <links>
6910                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6911                 </links>
6912         </class>
6913         <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">
6914                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6915                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6916                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6917                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6918                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6919                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6920                 </fields>
6921                 <links>
6922                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6923                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6924                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6925                 </links>
6926         </class>
6927         <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">
6928                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6929                         <field name="field" reporter:datatype="link"/>
6930                         <field name="id" reporter:datatype="id" />
6931                         <field name="source" reporter:datatype="link"/>
6932                         <field name="value" reporter:datatype="text"/>
6933                 </fields>
6934                 <links>
6935                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6936                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6937                 </links>
6938         </class>
6939         <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">
6940                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6941                         <field name="field" reporter:datatype="link"/>
6942                         <field name="id" reporter:datatype="id" />
6943                         <field name="source" reporter:datatype="link"/>
6944                         <field name="value" reporter:datatype="text"/>
6945                 </fields>
6946                 <links>
6947                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6948                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6949                 </links>
6950         </class>
6951         <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">
6952                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6953                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6954                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6955                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6956                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6957                 </fields>
6958                 <links>
6959                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6960                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6961                 </links>
6962         </class>
6963         <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">
6964                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6965                         <field name="depth" reporter:datatype="int" />
6966                         <field name="grantable" reporter:datatype="bool"/>
6967                         <field name="grp" reporter:datatype="link"/>
6968                         <field name="id" reporter:datatype="id" />
6969                         <field name="perm" reporter:datatype="link"/>
6970                 </fields>
6971                 <links>
6972                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6973                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6974                 </links>
6975         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6976             <actions>
6977                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6978                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6979                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6980                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6981             </actions>
6982         </permacrud>
6983         </class>
6984         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6985                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6986                         <field name="items" oils_persist:virtual="true" />
6987                         <field name="btype" reporter:datatype="text"/>
6988                         <field name="id" reporter:datatype="id" />
6989                         <field name="name" reporter:datatype="text"/>
6990                         <field name="description" reporter:datatype="text"/>
6991                         <field name="owner" reporter:datatype="link"/>
6992                         <field name="pub" reporter:datatype="bool"/>
6993                         <field name="create_time" reporter:datatype="timestamp" />
6994                 </fields>
6995                 <links>
6996                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6997                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6998                 </links>
6999         </class>
7000         <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">
7001                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7002                         <field name="id" reporter:datatype="id" />
7003                         <field name="bucket" reporter:datatype="link"/>
7004                         <field name="note" reporter:datatype="text" />
7005                 </fields>
7006                 <links>
7007                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7008                 </links>
7009         </class>
7010         <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">
7011                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7012                         <field name="id" reporter:datatype="int" />
7013                         <field name="usr" reporter:datatype="link"/>
7014                         <field name="work_ou" reporter:datatype="link"/>
7015                 </fields>
7016                 <links>
7017                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7018                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7019                 </links>
7020         </class>
7021         <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">
7022                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7023                         <field name="depth" reporter:datatype="int"/>
7024                         <field name="grantable" reporter:datatype="bool"/>
7025                         <field name="id" reporter:datatype="id" />
7026                         <field name="perm" reporter:datatype="link"/>
7027                         <field name="usr" reporter:datatype="link"/>
7028                 </fields>
7029                 <links>
7030                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7031                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7032                 </links>
7033         </class>
7034         <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">
7035                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7036                         <field name="object_id" reporter:datatype="text"/>
7037                         <field name="grantable" reporter:datatype="bool"/>
7038                         <field name="id" reporter:datatype="id" />
7039                         <field name="perm" reporter:datatype="link"/>
7040                         <field name="usr" reporter:datatype="link"/>
7041                         <field name="object_type" reporter:datatype="text"/>
7042                 </fields>
7043                 <links>
7044                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7045                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7046                 </links>
7047         </class>
7048         <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">
7049                 <fields oils_persist:primary="id" oils_persist:sequence="">
7050                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7051                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7052                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7053                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7054                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7055                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7056                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7057                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7058                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7059                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7061                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7063                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7064                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7065                 </fields>
7066                 <links>
7067                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7068                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7069                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7070                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7071                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7072                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7073                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7074                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7075                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7076                 </links>
7077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7078             <actions>
7079                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7080                     <context link="xact" jump="usr" field="home_ou"/>
7081                 </retrieve>
7082                         </actions>
7083                 </permacrud>
7084         </class>
7085         <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">
7086                 <fields oils_persist:primary="id" oils_persist:sequence="">
7087                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7088                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7089                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7090                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7091                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7092                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7093                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7094                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7095                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7096                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7097                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7098                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
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="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7103                 </fields>
7104                 <links>
7105                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7106                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7107                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7108                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7109                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7110                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7111                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7112                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7113                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7114                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7115                 </links>
7116         </class>
7117         <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">
7118                 <fields oils_persist:primary="id" oils_persist:sequence="">
7119                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7120                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7121                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7122                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7123                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7124                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7125                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7126                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7127                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7128                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7129                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7130                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7131                 </fields>
7132                 <links>
7133                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7134                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7135                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7136                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7137                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7138                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7139                 </links>
7140         </class>
7141         <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">
7142                 <fields oils_persist:primary="id" oils_persist:sequence="">
7143                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7144                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7145                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7146                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7147                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7148                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7149                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7150                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7151                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7152                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7153                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7154                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7155                 </fields>
7156                 <links>
7157                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7158                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7159                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7160                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7161                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7162                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7163                 </links>
7164         </class>
7165         <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">
7166                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7167                         <field name="bucket" reporter:datatype="link"/>
7168                         <field name="id" reporter:datatype="id" />
7169                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7170                         <field name="create_time" reporter:datatype="timestamp" />
7171                         <field name="pos" reporter:datatype="int" />
7172                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7173                 </fields>
7174                 <links>
7175                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7176                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7177             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7178                 </links>
7179         </class>
7180         <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">
7181                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7182                         <field name="id" reporter:datatype="id" />
7183                         <field name="item" reporter:datatype="link"/>
7184                         <field name="note" reporter:datatype="text" />
7185                 </fields>
7186                 <links>
7187                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7188                 </links>
7189         </class>
7190         <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">
7191                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7192                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7193                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7194                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7195                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7196                 </fields>
7197                 <links>
7198                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7199                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7200                 </links>
7201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7202                         <actions>
7203                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7204                         </actions>
7205                 </permacrud>
7206         </class>
7207     <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">
7208         <fields oils_persist:primary="field">
7209             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7210             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7211             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7212         </fields>
7213         <links/>
7214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7215             <actions>
7216                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7217                 <retrieve />
7218                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7219                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7220             </actions>
7221         </permacrud>
7222     </class>
7223         <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">
7224                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7225                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7226                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7227                 </fields>
7228                 <links/>
7229         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7230             <actions>
7231                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7232                 <retrieve/>
7233                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7234                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7235             </actions>
7236         </permacrud>
7237         </class>
7238
7239
7240         <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">
7241                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7242                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7243                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7244                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7245                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7246                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7247                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7248                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7249                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7250                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7251                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7252                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7253                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7254                 </fields>
7255                 <links>
7256                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7257                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7258                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7259                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7260                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7261                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7262                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7263                 </links>
7264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7265             <actions>
7266                 <create permission="TRANSIT_COPY">
7267                     <context link="target_copy" field="owner"/>
7268                 </create>
7269                 <retrieve/>
7270                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7271                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7272             </actions>
7273         </permacrud>
7274         </class>
7275         <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">
7276                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7277                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7278                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7279                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7280                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7281                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7282                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7283                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7284                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7285                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7286                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7287                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7288                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7289                 </fields>
7290                 <links>
7291                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7292                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7293                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7294                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7295                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7296                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7297                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7298                 </links>
7299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7300             <actions>
7301                 <create permission="TRANSIT_COPY" context_field="owner">
7302                     <context link="target_copy" field="circ_lib"/>
7303                 </create>
7304                 <retrieve/>
7305                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7306                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7307             </actions>
7308         </permacrud>
7309         </class>
7310         <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">
7311                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7312                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7313                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7314                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7315                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7316                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7317                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7318                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7319                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7320                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7321                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7322                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7323                 </fields>
7324                 <links>
7325                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7326                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7327                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7328                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7329                 </links>
7330         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7331             <actions>
7332                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7333                     <context link="xact" jump="usr" field="home_ou"/>
7334                 </retrieve>
7335                         </actions>
7336                 </permacrud>
7337         </class>
7338         <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">
7339                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7340                         <field name="grp" />
7341                         <field name="id" reporter:datatype="id" />
7342                         <field name="usr" />
7343                 </fields>
7344                 <links>
7345                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7346                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7347                 </links>
7348         </class>
7349         <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">
7350                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7351                         <field name="id" reporter:datatype="id" />
7352                         <field name="fq_field" reporter:datatype="text"/>
7353                         <field name="identity_value" reporter:datatype="text"/>
7354                         <field name="translation" reporter:datatype="text"/>
7355                         <field name="string" reporter:datatype="text"/>
7356                 </fields>
7357                 <links>
7358                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7359                 </links>
7360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7361             <actions>
7362                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7363                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7364                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7365                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7366             </actions>
7367         </permacrud>
7368         </class>
7369         <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">
7370                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7371                         <field name="id" reporter:datatype="id" />
7372                         <field name="fm_class" reporter:datatype="text"/>
7373                         <field name="field" reporter:datatype="text"/>
7374                         <field name="owner" reporter:datatype="org_unit"/>
7375                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7376                 </fields>
7377                 <links>
7378                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7379                 </links>
7380         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7381             <actions>
7382                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7383                 <retrieve/>
7384                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7385                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7386             </actions>
7387         </permacrud>
7388         </class>
7389         <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">
7390                 <fields oils_persist:primary="code">
7391                         <field name="code" reporter:datatype="id" />
7392                         <field name="marc_code" reporter:datatype="text"/>
7393                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7394                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7395                 </fields>
7396                 <links/>
7397         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7398             <actions>
7399                 <create permission="CREATE_LOCALE" global_required="true"/>
7400                 <retrieve/>
7401                 <update permission="UPDATE_LOCALE" global_required="true"/>
7402                 <delete permission="DELETE_LOCALE" global_required="true"/>
7403             </actions>
7404         </permacrud>
7405         </class>
7406         <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">
7407                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7408                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7409                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7410                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7411             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7412                 </fields>
7413                 <links>
7414                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7415                 </links>
7416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7417             <actions>
7418                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7419                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7420                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7421                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7422             </actions>
7423         </permacrud>
7424         </class>
7425
7426         <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">
7427                 <fields oils_persist:primary="id">
7428                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7429                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7430                 </fields>
7431                 <links/>
7432         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7433             <actions>
7434                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7435                 <retrieve/>
7436                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7437                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7438             </actions>
7439         </permacrud>
7440         </class>
7441
7442         <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">
7443                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7444                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7445                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7446                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7447                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7448                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7449                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7450                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7451                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7452                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7453                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7454                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7455                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7456                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7457                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7458                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7459                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7460                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7461                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7462                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7463                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7464                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7465                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7466                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7467                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7468                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7469                 </fields>
7470                 <links>
7471                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7472                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7473                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7474                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7475                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7476                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7477                 </links>
7478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7479             <actions>
7480                 <create permission="user_request.create">
7481                     <context link="usr" field="home_ou"/>
7482                                 </create>
7483                 <retrieve permission="user_request.view">
7484                     <context link="usr" field="home_ou"/>
7485                                 </retrieve>
7486                 <update permission="user_request.update">
7487                     <context link="usr" field="home_ou"/>
7488                                 </update>
7489                 <delete permission="user_request.delete">
7490                     <context link="usr" field="home_ou"/>
7491                                 </delete>
7492             </actions>
7493         </permacrud>
7494         </class>
7495
7496         <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">
7497                 <fields oils_persist:primary="code">
7498                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7499                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7500                 </fields>
7501                 <links/>
7502         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7503             <actions>
7504                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7505                 <retrieve/>
7506                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7507                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7508             </actions>
7509         </permacrud>
7510         </class>
7511
7512         <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">
7513                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7514                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7515                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7516                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7517                         <field reporter:label="Ratio" name="ratio" />
7518                 </fields>
7519                 <links>
7520                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7521                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7522                 </links>
7523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7524                         <actions>
7525                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7526                                 <retrieve/>
7527                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7528                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7529                         </actions>
7530                 </permacrud>
7531         </class>
7532
7533         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7534                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7535                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7536                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7537                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7538                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7539                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7540                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7541                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7542                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7543                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7544                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7545                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7546                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7547                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7548                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7549                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7550                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7551                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7552                 </fields>
7553                 <links>
7554                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7555                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7556             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7557             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7558             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7559                 </links>
7560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7561             <actions>
7562                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7563                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7564                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7565                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7566             </actions>
7567         </permacrud>
7568         </class>
7569
7570         <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">
7571                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7572                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7573                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7574                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7575                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7576                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7577                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7578                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7579                 </fields>
7580                 <links>
7581                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7582                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7583                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7584                 </links>
7585         </class>
7586
7587         <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">
7588                 <fields oils_persist:primary="code">
7589                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7590                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7591                 </fields>
7592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7593             <actions>
7594                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7595                 <retrieve/>
7596                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7597                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7598             </actions>
7599                 </permacrud>
7600         </class>
7601
7602         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7603                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7604                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7605                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7606                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7607                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7608                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7609                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7610                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7611                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7612                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7613                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7614                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7615                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7616                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7617                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7618                 </fields>
7619                 <links>
7620                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7621                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7622                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7623                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7624                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7625                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7626                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7627                 </links>
7628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7629             <actions>
7630                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7631                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7632                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7633                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7634             </actions>
7635         </permacrud>
7636         </class>
7637
7638         <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">
7639                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7640                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7641                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7642                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7643                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7644                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7645                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7646                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7647                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7648                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7649                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7650                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7651                 </fields>
7652                 <links>
7653                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7654                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7655                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7656                 </links>
7657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7658             <actions>
7659                 <create   permission="ADMIN_INVOICE">
7660                                         <context link="invoice" field="receiver"/>
7661                                 </create>
7662                 <retrieve permission="ADMIN_INVOICE">
7663                                         <context link="invoice" field="receiver"/>
7664                                 </retrieve>
7665                 <update   permission="ADMIN_INVOICE">
7666                                         <context link="invoice" field="receiver"/>
7667                                 </update>
7668                                 <delete   permission="ADMIN_INVOICE">
7669                                         <context link="invoice" field="receiver"/>
7670                                 </delete>
7671             </actions>
7672         </permacrud>
7673         </class>
7674
7675         <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">
7676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7677                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7678                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7679                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7680                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7681                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7682                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7683                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7684                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7685                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7686                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7687                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7688                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7689                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7690                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7691                 </fields>
7692                 <links>
7693                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7694                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7695                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7696                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7697                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7698                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7699                 </links>
7700         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7701             <actions>
7702                 <create   permission="ADMIN_INVOICE">
7703                                         <context link="invoice" field="receiver"/>
7704                                 </create>
7705                 <retrieve permission="ADMIN_INVOICE">
7706                                         <context link="invoice" field="receiver"/>
7707                                 </retrieve>
7708                 <update   permission="ADMIN_INVOICE">
7709                                         <context link="invoice" field="receiver"/>
7710                                 </update>
7711                                 <delete   permission="ADMIN_INVOICE">
7712                                         <context link="invoice" field="receiver"/>
7713                                 </delete>
7714             </actions>
7715         </permacrud>
7716         </class>
7717
7718         <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">
7719                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7720                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7721                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7722                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7723                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7724                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7725                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7726                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7727                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7728                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7729                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7730                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7731                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7732                 </fields>
7733                 <links>
7734                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7735                 </links>
7736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7737             <actions>
7738                 <create permission="ADMIN_PROVIDER">
7739                     <context link="provider" field="owner"/>
7740                 </create>
7741                 <retrieve permission="ADMIN_PROVIDER">
7742                     <context link="provider" field="owner"/>
7743                 </retrieve>
7744                 <update permission="ADMIN_PROVIDER">
7745                     <context link="provider" field="owner"/>
7746                 </update>
7747                 <delete permission="ADMIN_PROVIDER">
7748                     <context link="provider" field="owner"/>
7749                 </delete>
7750             </actions>
7751         </permacrud>
7752         </class>
7753
7754         <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">
7755                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7756                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7757                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7758                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7759                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7760                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7761                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7762         </fields>
7763                 <links>
7764                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7765                 </links>
7766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7767             <actions>
7768                 <create permission="ADMIN_PROVIDER">
7769                     <context link="provider" field="owner"/>
7770                 </create>
7771                 <retrieve permission="ADMIN_PROVIDER">
7772                     <context link="provider" field="owner"/>
7773                 </retrieve>
7774                 <update permission="ADMIN_PROVIDER">
7775                     <context link="provider" field="owner"/>
7776                 </update>
7777                 <delete permission="ADMIN_PROVIDER">
7778                     <context link="provider" field="owner"/>
7779                 </delete>
7780             </actions>
7781         </permacrud>
7782     </class>
7783         <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">
7784                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7785                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7786                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7787                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7788                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7789                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7790                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7791                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7792                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7793                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7794                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7795                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7796                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7797                 </fields>
7798                 <links>
7799                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7800                 </links>
7801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7802             <actions>
7803                 <create permission="ADMIN_PROVIDER">
7804                     <context link="contact" jump='provider' field="owner"/>
7805                 </create>
7806                 <retrieve permission="ADMIN_PROVIDER">
7807                     <context link="contact" jump='provider' field="owner"/>
7808                 </retrieve>
7809                 <update permission="ADMIN_PROVIDER">
7810                     <context link="contact" jump='provider' field="owner"/>
7811                 </update>
7812                 <delete permission="ADMIN_PROVIDER">
7813                     <context link="contact" jump='provider' field="owner"/>
7814                 </delete>
7815             </actions>
7816         </permacrud>
7817         </class>
7818
7819         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7820                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7821                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7822                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7823                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7824                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7825                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7826                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7827                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7828                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7829                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7830                 </fields>
7831                 <links>
7832                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7833                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7834                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7835                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7836                 </links>
7837         </class>
7838
7839         <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">
7840                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7841                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7842                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7843                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7844                 </fields>
7845                 <links>
7846             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7847                 </links>
7848                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7849                         <actions>
7850                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7851                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7852                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7853                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7854                         </actions>
7855                 </permacrud>
7856         </class>
7857
7858         <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">
7859                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7860                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7861                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7862                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7863                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7864                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7865                 </fields>
7866                 <links>
7867                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7868                 </links>
7869                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7870                         <actions>
7871                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7872                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7873                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7874                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7875                         </actions>
7876                 </permacrud>
7877         </class>
7878
7879         <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">
7880                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7881                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7882                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7883                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7884                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7885                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7886                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7887                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7888                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7889                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7890                 </fields>
7891                 <links>
7892                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7893                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7894             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7895             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7896                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7897                 </links>
7898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7899             <actions>
7900                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7901                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7902                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7903                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7904             </actions>
7905         </permacrud>
7906         </class>
7907
7908         <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">
7909                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7910                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7911                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7912                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7913                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7914                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7915                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7916                 </fields>
7917                 <links>
7918                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7919                 </links>
7920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7921                         <actions>
7922                                 <create permission="ADMIN_FUNDING_SOURCE">
7923                     <context link="funding_source" field="owner"/>
7924                 </create>
7925                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7926                     <context link="funding_source" field="owner"/>
7927                 </retrieve>
7928                                 <update permission="ADMIN_FUNDING_SOURCE">
7929                     <context link="funding_source" field="owner"/>
7930                 </update>
7931                                 <delete permission="ADMIN_FUNDING_SOURCE">
7932                     <context link="funding_source" field="owner"/>
7933                 </delete>
7934                         </actions>
7935                 </permacrud>
7936         </class>
7937
7938         <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">
7939                 <fields oils_persist:primary="id">
7940                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7941                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7942                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7943                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7944                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7945                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7946                 </fields>
7947                 <links>
7948                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7949                 </links>
7950         </class>
7951
7952         <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">
7953                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7954                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7955                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7956                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7957                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7958                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7959                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7960                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7961                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7962                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
7963                 </fields>
7964                 <links>
7965                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7966                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7967                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
7968                 </links>
7969                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7970                         <actions>
7971                                 <create permission="ADMIN_ACQ_FUND">
7972                     <context link="fund" field="org"/>
7973                 </create>
7974                                 <retrieve permission="ADMIN_ACQ_FUND">
7975                     <context link="fund" field="org"/>
7976                 </retrieve>
7977                                 <update permission="ADMIN_ACQ_FUND">
7978                     <context link="fund" field="org"/>
7979                 </update>
7980                                 <delete permission="ADMIN_ACQ_FUND">
7981                     <context link="fund" field="org"/>
7982                 </delete>
7983                         </actions>
7984                 </permacrud>
7985         </class>
7986
7987         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7988                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7989                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7990                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7991                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7992                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7993                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7994                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7995                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7996                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7997                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7998                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7999                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8000                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8001                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8002                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8003                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8004                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8005                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8006                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8007                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8008                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8009                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8010                 </fields>
8011                 <links>
8012                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8013                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8014             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8015             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8016             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8017             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8018             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8019             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8020             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8021             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8022             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8023                 </links>
8024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8025             <actions>
8026                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8027                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8028                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8029                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8030             </actions>
8031         </permacrud>
8032         </class>
8033
8034         <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">
8035                 <fields oils_persist:primary="fund">
8036                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8037                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8038                 </fields>
8039                 <links>
8040                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8041                 </links>
8042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8043             <actions>
8044                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8045                                         <context link="fund" field="org" />
8046                 </retrieve>
8047             </actions>
8048         </permacrud>
8049         </class>
8050
8051         <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">
8052                 <fields oils_persist:primary="fund">
8053                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8054                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8055                 </fields>
8056                 <links>
8057                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8058                 </links>
8059         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8060             <actions>
8061                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8062                                         <context link="fund" field="org" />
8063                 </retrieve>
8064             </actions>
8065         </permacrud>
8066         </class>
8067
8068         <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">
8069                 <fields oils_persist:primary="fund">
8070                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8071                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8072                 </fields>
8073                 <links>
8074                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8075                 </links>
8076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8077             <actions>
8078                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8079                                         <context link="fund" field="org" />
8080                 </retrieve>
8081             </actions>
8082         </permacrud>
8083         </class>
8084
8085         <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">
8086                 <fields oils_persist:primary="fund">
8087                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8088                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8089                 </fields>
8090                 <links>
8091                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8092                 </links>
8093         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8094             <actions>
8095                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8096                                         <context link="fund" field="org" />
8097                 </retrieve>
8098             </actions>
8099         </permacrud>
8100         </class>
8101
8102         <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">
8103                 <fields oils_persist:primary="fund">
8104                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8105                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8106                 </fields>
8107                 <links>
8108                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8109                 </links>
8110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8111             <actions>
8112                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8113                                         <context link="fund" field="org" />
8114                 </retrieve>
8115             </actions>
8116         </permacrud>
8117         </class>
8118
8119    <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">
8120         <fields oils_persist:primary="fund">
8121             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8122             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8123         </fields>
8124         <links>
8125             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8126         </links>
8127     </class>
8128
8129    <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">
8130         <fields oils_persist:primary="fund">
8131             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8132             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8133         </fields>
8134         <links>
8135             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8136         </links>
8137     </class>
8138
8139    <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">
8140         <fields oils_persist:primary="fund">
8141             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8142             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8143         </fields>
8144         <links>
8145             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8146         </links>
8147     </class>
8148
8149    <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">
8150         <fields oils_persist:primary="fund">
8151             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8152             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8153         </fields>
8154         <links>
8155             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8156         </links>
8157     </class>
8158
8159    <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">
8160         <fields oils_persist:primary="fund">
8161             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8162             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8163         </fields>
8164         <links>
8165             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8166         </links>
8167     </class>
8168
8169         <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">
8170                 <fields oils_persist:primary="funding_source">
8171                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8172                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8173                 </fields>
8174                 <links>
8175                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8176                 </links>
8177         </class>
8178
8179         <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">
8180                 <fields oils_persist:primary="funding_source">
8181                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8182                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8183                 </fields>
8184                 <links>
8185                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8186                 </links>
8187         </class>
8188
8189         <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">
8190                 <fields oils_persist:primary="funding_source">
8191                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8192                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8193                 </fields>
8194                 <links>
8195                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8196                 </links>
8197         </class>
8198
8199         <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">
8200                 <fields oils_persist:primary="fund">
8201                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8202                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8203                 </fields>
8204                 <links>
8205                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8206                 </links>
8207         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8208             <actions>
8209                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8210                                         <context link="fund" field="org" />
8211                 </retrieve>
8212             </actions>
8213         </permacrud>
8214     </class>
8215     <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">
8216         <oils_persist:source_definition><![CDATA[
8217             SELECT
8218                 acqf.*,
8219                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8220                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8221                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8222                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8223             FROM
8224                 acq.fund acqf
8225                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8226                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8227                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8228                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8229         ]]></oils_persist:source_definition>
8230         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8231             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8232             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8233             <field reporter:label="Name" name="name" reporter:datatype="text" />
8234             <field reporter:label="Year" name="year" reporter:datatype="int" />
8235             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8236             <field reporter:label="Code" name="code" reporter:datatype="text" />
8237             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8238             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8239             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8240             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8241             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8242
8243             <!-- non fund-native fields -->
8244             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8245             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8246             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8247             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8248         </fields>
8249         <links>
8250             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8251             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8252             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8253         </links>
8254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8255             <actions>
8256                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8257             </actions>
8258         </permacrud>
8259         </class>
8260         <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">
8261                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8262                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8263                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8264                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8265                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8266                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8267                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8268                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8269                 </fields>
8270                 <links>
8271                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8272                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8273                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8274                 </links>
8275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8276                         <actions>
8277                                 <create permission="ADMIN_ACQ_FUND">
8278                     <context link="fund" field="org"/>
8279                 </create>
8280                                 <retrieve permission="ADMIN_ACQ_FUND">
8281                     <context link="fund" field="org"/>
8282                 </retrieve>
8283                                 <update permission="ADMIN_ACQ_FUND">
8284                     <context link="fund" field="org"/>
8285                 </update>
8286                                 <delete permission="ADMIN_ACQ_FUND">
8287                     <context link="fund" field="org"/>
8288                 </delete>
8289                         </actions>
8290                 </permacrud>
8291         </class>
8292
8293     <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">
8294         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8295             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8296             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8297             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8298             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8299             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8300             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8301             <field reporter:label="Note" name="note" reporter:datatype="text" />
8302             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8303         </fields>
8304         <links>
8305             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8306             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8307             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8308         </links>
8309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8310                         <actions>
8311                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8312                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8313                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8314                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8315                         </actions>
8316                 </permacrud>
8317     </class>
8318
8319         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8320                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8321                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8322                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8323                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8324                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8325                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8326                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8327                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8328                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8329                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8330                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8331                 </fields>
8332                 <links>
8333                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8334                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8335                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8336                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8337                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8338                 </links>
8339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8340                         <actions>
8341                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8342                         </actions>
8343                 </permacrud>
8344         </class>
8345
8346         <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">
8347                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8348                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8349                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8350                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8351                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8352                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8353                 </fields>
8354                 <links>
8355                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8356                 </links>
8357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8358                         <actions>
8359                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8360                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8361                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8362                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8363                         </actions>
8364                 </permacrud>
8365         </class>
8366
8367         <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">
8368                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8369                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8370                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8371                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8372                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8373                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8374                         <field reporter:label="State" name="state" reporter:datatype="text" />
8375                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8376                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8377                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8378                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8379                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8380                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8381                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8382                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8383                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8384                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8385                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8386                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8387                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8388                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8389                 </fields>
8390                 <links>
8391                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8392                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8393                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8394                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8395                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8396                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8397                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8398                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8399                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8400                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8401                 </links>
8402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8403                         <actions>
8404                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8405                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8406                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8407                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8408                         </actions>
8409                 </permacrud>
8410         </class>
8411
8412         <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">
8413                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8414                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8415                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8416                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8417                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8418                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8419                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8420                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8421                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8422                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8423                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8424                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8425                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8426                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8427                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8428                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8429                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8430                 </fields>
8431                 <links>
8432                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8433                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8434                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8435                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8436                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8437                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8438                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8439                 </links>
8440                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8441             <actions>
8442                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8443             </actions>
8444                 </permacrud>
8445         </class>
8446
8447         <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">
8448                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8449                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8450                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8451                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8452                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8453                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8454                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8455                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8456                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8457                 </fields>
8458                 <links>
8459                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8460                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8461                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8462                 </links>
8463                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8464             <actions>
8465                 <create permission="CREATE_PURCHASE_ORDER">
8466                     <context link="purchase_order" field="ordering_agency"/>
8467                 </create>
8468                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8469                     <context link="purchase_order" field="ordering_agency"/>
8470                 </retrieve>
8471                 <update permission="CREATE_PURCHASE_ORDER">
8472                     <context link="purchase_order" field="ordering_agency"/>
8473                 </update>
8474                 <delete permission="CREATE_PURCHASE_ORDER">
8475                     <context link="purchase_order" field="ordering_agency"/>
8476                 </delete>
8477             </actions>
8478                 </permacrud>
8479         </class>
8480
8481         <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">
8482                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8483                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8484                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8485                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8486                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8487                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8488                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8489                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8490                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8491                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8492                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8493                 </fields>
8494                 <links>
8495                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8496                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8497                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8498                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8499                 </links>
8500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8501             <actions>
8502                 <create permission="CREATE_PURCHASE_ORDER">
8503                     <context link="purchase_order" field="ordering_agency"/>
8504                 </create>
8505                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8506                     <context link="purchase_order" field="ordering_agency"/>
8507                 </retrieve>
8508                 <update permission="CREATE_PURCHASE_ORDER">
8509                     <context link="purchase_order" field="ordering_agency"/>
8510                 </update>
8511                 <delete permission="CREATE_PURCHASE_ORDER">
8512                     <context link="purchase_order" field="ordering_agency"/>
8513                 </delete>
8514             </actions>
8515                 </permacrud>
8516         </class>
8517
8518         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8519                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8520                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8521                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8522                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8523                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8524                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8525                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8526                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8527                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8528                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8529                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8530                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8531                         <field reporter:label="State" name="state" reporter:datatype="text" />
8532                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8533                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8534                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8535                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8536                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8537                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8538                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8539                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8540                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8541                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8542                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8543                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8544                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8545                 </fields>
8546                 <links>
8547                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8548                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8549                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8550                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8551                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8552                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8553                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8554                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8555                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8556                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8557                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8558                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8559                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8560                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8561                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8562                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8563                 </links>
8564                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8565                         <actions>
8566                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8567                                         <context link="purchase_order" field="ordering_agency"/>
8568                                         <context link="picklist" field="org_unit"/>
8569                                 </retrieve>
8570                         </actions>
8571                 </permacrud>
8572         </class>
8573
8574         <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">
8575                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8576                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8577                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8578                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8579                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8580                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8581                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8582                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8583                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8584                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8585                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8586                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8587                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8588                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8589                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8590                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8591                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8592                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8593                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8594                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8595                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8596                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8597                 </fields>
8598                 <links>
8599                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8600                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8601                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8602                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8603                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8604                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8605                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8606                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8607                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8608                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8609                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8610                 </links>
8611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8612                         <actions>
8613                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8614                                         <context link="purchase_order" field="ordering_agency"/>
8615                                         <context link="picklist" field="org_unit"/>
8616                                 </retrieve>
8617                         </actions>
8618                 </permacrud>
8619         </class>
8620
8621         <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">
8622                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8623                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8624                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8625                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8626                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8627                 </fields>
8628                 <links>
8629                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8630                 </links>
8631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8632                         <actions>
8633                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8634                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8635                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8636                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8637                         </actions>
8638                 </permacrud>
8639         </class>
8640
8641         <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">
8642                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8643                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8644                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8645                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8646                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8647                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8648                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8649                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8650                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8651                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8652                 </fields>
8653                 <links>
8654                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8655                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8656                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8657                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8658                 </links>
8659         </class>
8660
8661         <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">
8662                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8663                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8664                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8665                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8666                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8667                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8668                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8669                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8670                 </fields>
8671                 <links>
8672                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8673                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8674                 </links>
8675         </class>
8676
8677         <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">
8678                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8679                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8680                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8681                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8682                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8683                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8684                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8685                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8686                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8687                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8688                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8689                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8690                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8691                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8692                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8693                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8694                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8695                 </fields>
8696                 <links>
8697                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8698                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8699                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8700                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8701                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8702                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8703                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8704                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8705                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8706                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8707                 </links>
8708         </class>
8709
8710         <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">
8711                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8712                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8713                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8714                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8715                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8716                 </fields>
8717                 <links/>
8718                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8719                         <actions>
8720                                 <retrieve />
8721                         </actions>
8722                 </permacrud>
8723         </class>
8724
8725         <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">
8726                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8727                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8728                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8729                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8730                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8731                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8732             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8733                 </fields>
8734                 <links/>
8735         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8736             <actions>
8737                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8738                 <retrieve />
8739                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8740                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8741             </actions>
8742         </permacrud>
8743         </class>
8744
8745         <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">
8746                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8747                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8748                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8749                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8750                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8751                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8752                 </fields>
8753                 <links/>
8754         </class>
8755         <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">
8756                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8757                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8758                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8759                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8760                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8761                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8762                 </fields>
8763                 <links>
8764                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8765                 </links>
8766         </class>
8767
8768         <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">
8769             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8770                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8771                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8772                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8773                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8774                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8775                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8776         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8777
8778             </fields>
8779             <links>
8780                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8781             </links>
8782             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8783                 <actions>
8784                     <create permission="ADMIN_PROVIDER">
8785                         <context link="provider" field="owner"/>
8786                     </create>
8787                     <retrieve permission="ADMIN_PROVIDER">
8788                         <context link="provider" field="owner"/>
8789                     </retrieve>
8790                     <update permission="ADMIN_PROVIDER">
8791                         <context link="provider" field="owner"/>
8792                     </update>
8793                     <delete permission="ADMIN_PROVIDER">
8794                         <context link="provider" field="owner"/>
8795                     </delete>
8796                 </actions>
8797             </permacrud>
8798         </class>
8799         
8800         <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">
8801             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8802                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8803                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8804                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8805                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8806             </fields>
8807             <links>
8808                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8809             </links>
8810             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8811                 <actions>
8812                     <create permission="ADMIN_PROVIDER">
8813                         <context link="provider" field="owner"/>
8814                     </create>
8815                     <retrieve permission="ADMIN_PROVIDER">
8816                         <context link="provider" field="owner"/>
8817                     </retrieve>
8818                     <update permission="ADMIN_PROVIDER">
8819                         <context link="provider" field="owner"/>
8820                     </update>
8821                     <delete permission="ADMIN_PROVIDER">
8822                         <context link="provider" field="owner"/>
8823                     </delete>
8824                 </actions>
8825             </permacrud>
8826         </class>
8827         
8828         <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">
8829             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8830                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8831                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8832                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8833                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8834                 </fields>
8835                 <links/>
8836         </class>
8837
8838         <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">
8839                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8840                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8841                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8842                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8843                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8844                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8845                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8846                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8847                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8848                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8849                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8850                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8851                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8852                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8853                 </fields>
8854                 <links>
8855                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8856                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8857                 </links>
8858         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8859             <actions>
8860                 <create permission="ADMIN_PROVIDER">
8861                     <context link="provider" field="owner"/>
8862                 </create>
8863                 <retrieve permission="ADMIN_PROVIDER">
8864                     <context link="provider" field="owner"/>
8865                 </retrieve>
8866                 <update permission="ADMIN_PROVIDER">
8867                     <context link="provider" field="owner"/>
8868                 </update>
8869                 <delete permission="ADMIN_PROVIDER">
8870                     <context link="provider" field="owner"/>
8871                 </delete>
8872             </actions>
8873         </permacrud>
8874         </class>
8875
8876         <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">
8877                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8878                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8879                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8880                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8881                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8882                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8883                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8884                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8885                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8886                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8887                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8888                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8889                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8890                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8891                 </fields>
8892                 <links>
8893                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8894                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8895                 </links>
8896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8897             <actions>
8898                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8899                     <context link="account" jump="provider" field="owner"/>
8900                 </retrieve>
8901                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8902                     <context link="account" jump="provider" field="owner"/>
8903                 </update>
8904                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8905                     <context link="account" jump="provider" field="owner"/>
8906                 </delete>
8907             </actions>
8908         </permacrud>
8909         </class>
8910
8911
8912         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8913                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8914                         <field name="id" reporter:datatype="id" />
8915                         <field name="parent" reporter:datatype="link"/>
8916                         <field name="owner" reporter:datatype="link"/>
8917                         <field name="create_time" reporter:datatype="timestamp"/>
8918                         <field name="name" reporter:datatype="text"/>
8919                         <field name="shared" reporter:datatype="bool"/>
8920                         <field name="share_with" reporter:datatype="link"/>
8921                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8922                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8923                 </fields>
8924                 <links>
8925                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8926                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8927                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8928                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8929                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8930                 </links>
8931         </class>
8932         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8933                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8934                         <field name="id" reporter:datatype="id" />
8935                         <field name="parent" reporter:datatype="link"/>
8936                         <field name="owner" reporter:datatype="link"/>
8937                         <field name="create_time" reporter:datatype="timestamp"/>
8938                         <field name="name" reporter:datatype="text"/>
8939                         <field name="shared" reporter:datatype="bool"/>
8940                         <field name="share_with" reporter:datatype="link"/>
8941                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8942                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8943                 </fields>
8944                 <links>
8945                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8946                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8947                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8948                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8949                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8950                 </links>
8951         </class>
8952         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8953                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8954                         <field name="id" reporter:datatype="id" />
8955                         <field name="parent" reporter:datatype="link"/>
8956                         <field name="owner" reporter:datatype="link"/>
8957                         <field name="create_time" reporter:datatype="timestamp"/>
8958                         <field name="name" reporter:datatype="text"/>
8959                         <field name="shared" reporter:datatype="bool"/>
8960                         <field name="share_with" reporter:datatype="link"/>
8961                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8962                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8963                 </fields>
8964                 <links>
8965                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8966                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8967                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8968                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8969                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8970                 </links>
8971         </class>
8972         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8973                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8974                         <field name="id" reporter:datatype="id" />
8975                         <field name="owner" reporter:datatype="link"/>
8976                         <field name="create_time" reporter:datatype="timestamp"/>
8977                         <field name="name" reporter:datatype="text"/>
8978                         <field name="data" reporter:datatype="text"/>
8979                         <field name="folder" reporter:datatype="link"/>
8980                         <field name="description" reporter:datatype="text"/>
8981                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8982                 </fields>
8983                 <links>
8984                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8985                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8986                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8987                 </links>
8988         </class>
8989         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8990                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8991                         <field name="id" reporter:datatype="id" />
8992                         <field name="owner" reporter:datatype="link"/>
8993                         <field name="create_time" reporter:datatype="timestamp"/>
8994                         <field name="template" reporter:datatype="link"/>
8995                         <field name="data" reporter:datatype="text"/>
8996                         <field name="folder" reporter:datatype="link"/>
8997                         <field name="recur" reporter:datatype="bool"/>
8998                         <field name="recurrence" reporter:datatype="interval"/>
8999                         <field name="name" reporter:datatype="text"/>
9000                         <field name="description" reporter:datatype="text"/>
9001                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9002                 </fields>
9003                 <links>
9004                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9005                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9006                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9007                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9008                 </links>
9009         </class>
9010         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9011                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9012                         <field name="id" reporter:datatype="id" />
9013                         <field name="runner" reporter:datatype="link"/>
9014                         <field name="start_time" reporter:datatype="timestamp"/>
9015                         <field name="complete_time" reporter:datatype="timestamp"/>
9016                         <field name="run_time" reporter:datatype="timestamp"/>
9017                         <field name="email" reporter:datatype="text"/>
9018                         <field name="excel_format" reporter:datatype="bool"/>
9019                         <field name="csv_format" reporter:datatype="bool"/>
9020                         <field name="html_format" reporter:datatype="bool"/>
9021                         <field name="error_code" reporter:datatype="int"/>
9022                         <field name="error_text" reporter:datatype="text"/>
9023                         <field name="report" reporter:datatype="link"/>
9024                         <field name="folder" reporter:datatype="link"/>
9025                         <field name="chart_pie" reporter:datatype="bool"/>
9026                         <field name="chart_bar" reporter:datatype="bool"/>
9027                         <field name="chart_line" reporter:datatype="bool"/>
9028                 </fields>
9029                 <links>
9030                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9031                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9032                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9033                 </links>
9034         </class>
9035         <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">
9036                 <fields oils_persist:primary="id">
9037                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9038                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9039                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9040                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9041                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9042                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9043                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9044                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9045                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9046                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9047                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9048                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9049                 </fields>
9050                 <links>
9051                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9052                 </links>
9053                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9054                         <actions>
9055                                 <retrieve />
9056                         </actions>
9057                 </permacrud>
9058         </class>
9059         <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">
9060                 <fields oils_persist:primary="id">
9061                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9062                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9063                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9064                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9065                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9066                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9067                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9068                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9069                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9070                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9071                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9072                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9073                 </fields>
9074                 <links>
9075                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9076                 </links>
9077         </class>
9078         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9079                 <fields oils_persist:primary="id">
9080                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9081                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9082                         <field reporter:label="Fingerprint" name="fingerprint" />
9083                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9084                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9085                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9086                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9087                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9088                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9089                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9090                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9091                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9092                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9093                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9094                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9095                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9096                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9097                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9098                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9099                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9100                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9101                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9102                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9103                 </fields>
9104                 <links>
9105                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9106                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9107                 </links>
9108         </class>
9109         <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">
9110                 <fields oils_persist:primary="id">
9111                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9112                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9113                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9114                 </fields>
9115                 <links>
9116                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9117                 </links>
9118         </class>
9119         <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">
9120                 <fields oils_persist:primary="id">
9121                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9122                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9123                 </fields>
9124                 <links>
9125                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9126                 </links>
9127         </class>
9128         <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">
9129                 <fields oils_persist:primary="id">
9130                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9131                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9132                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9133                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9134                 </fields>
9135                 <links>
9136                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9137                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9138                 </links>
9139         </class>
9140         <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">
9141                 <fields oils_persist:primary="xact">
9142                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9143                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9144                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9145                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9146                 </fields>
9147                 <links>
9148                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9149                 </links>
9150         </class>
9151         <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">
9152                 <fields oils_persist:primary="xact">
9153                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9154                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9155                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9156                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9157                 </fields>
9158                 <links>
9159                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9160                 </links>
9161         </class>
9162         <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)">
9163                 <fields oils_persist:primary="id">
9164                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9165                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9166                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9167                 </fields>
9168                 <links>
9169                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9170                 </links>
9171         </class>
9172         <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">
9173                 <fields oils_persist:primary="id">
9174                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9175                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9176                 </fields>
9177                 <links>
9178                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9179                 </links>
9180         </class>
9181         <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">
9182                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9183                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9184                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9185                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9186                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9187                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9188                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9189                 </fields>
9190                 <links>
9191                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9192                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9193                 </links>
9194                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9195                         <actions>
9196                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9197                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9198                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9199                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9200                         </actions>
9201                 </permacrud>
9202         </class>
9203         <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">
9204                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9205                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9206                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9207                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9208                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9209                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9210                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9211                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9212                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9213                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9214                 </fields>
9215                 <links>
9216                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9217                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9218                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9219                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9220                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9221                 </links>
9222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9223                         <actions>
9224                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9225                                         <context link="formula" field="owner"/>
9226                                 </create>
9227                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9228                                         <context link="formula" field="owner"/>
9229                                 </retrieve>
9230                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9231                                         <context link="formula" field="owner"/>
9232                                 </update>
9233                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9234                                         <context link="formula" field="owner"/>
9235                                 </delete>
9236                         </actions>
9237                 </permacrud>
9238         </class>
9239
9240         <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">
9241                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9242                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9243                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9244                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9245                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9246                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9247                 </fields>
9248                 <links>
9249                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9250                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9251                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9252                 </links>
9253                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9254                         <actions>
9255                                 <create permission="CREATE_PURCHASE_ORDER">
9256                                         <context link="formula" field="owner"/>
9257                 </create>
9258                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9259                                         <context link="formula" field="owner"/>
9260                 </retrieve>
9261                                 <update permission="CREATE_PURCHASE_ORDER">
9262                                         <context link="formula" field="owner"/>
9263                 </update>
9264                                 <delete permission="CREATE_PURCHASE_ORDER">
9265                                         <context link="formula" field="owner"/>
9266                 </delete>
9267                         </actions>
9268                 </permacrud>
9269         </class>
9270
9271         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9272                 <fields oils_persist:primary="id">
9273                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9274                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9275                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9276                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9277                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9278                 </fields>
9279                 <links>
9280                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9281                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9282                 </links>
9283         </class>
9284
9285         <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">
9286                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9287                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9288                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9289                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9290                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9291                 </fields>
9292                 <links>
9293                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9294                 </links>
9295                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9296                         <actions>
9297                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9298                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9299                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9300                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9301                         </actions>
9302                 </permacrud>
9303         </class>
9304
9305         <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">
9306                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9307                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9308                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9309                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9310                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9311                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9312                 </fields>
9313                 <links>
9314                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9315                 </links>
9316                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9317                         <actions>
9318                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9319                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9320                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9321                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9322                         </actions>
9323                 </permacrud>
9324         </class>
9325
9326         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9327                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9328                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9329                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9330                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9331                 </fields>
9332                 <links>
9333                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9334                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9335                 </links>
9336         </class>
9337
9338         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9339                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9340                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9341                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9342                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9343                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9344                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9345                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9346                 </fields>
9347                 <links>
9348                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9349                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9350                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9351                 </links>
9352         </class>
9353
9354         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9355                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9356                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9357                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9358                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9359                 </fields>
9360                 <links>
9361                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9362                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9363                 </links>
9364         </class>
9365
9366         <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">
9367                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9368                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9369                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9370                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9371                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9372                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9373                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9374                 </fields>
9375                 <links>
9376                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9377                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9378                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9379                 </links>
9380         </class>
9381
9382         <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">
9383                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9384                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9385                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9386                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9387                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9388                 </fields>
9389                 <links>
9390                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9391                 </links>
9392                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9393             <actions>
9394                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9395                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9396                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9397                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9398             </actions>
9399                 </permacrud>
9400         </class>
9401
9402         <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">
9403                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9404                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9405                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9406                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9407                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9408                 </fields>
9409                 <links>
9410                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9411                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9412                 </links>
9413                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9414                         <actions>
9415                                 <create permission="ADMIN_CLAIM_POLICY">
9416                                         <context link="claim_policy" field="org_unit"/>
9417                 </create>
9418                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9419                                         <context link="claim_policy" field="org_unit"/>
9420                 </retrieve>
9421                                 <update permission="ADMIN_CLAIM_POLICY">
9422                                         <context link="claim_policy" field="org_unit"/>
9423                 </update>
9424                                 <delete permission="ADMIN_CLAIM_POLICY">
9425                                         <context link="claim_policy" field="org_unit"/>
9426                 </delete>
9427                         </actions>
9428                 </permacrud>
9429         </class>
9430
9431     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9432         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9433             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9434             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9435             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9436             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9437             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9438             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9439             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9440             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9441             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9442             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9443             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9444             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9445             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9446             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9447             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9448             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9449         </fields>
9450         <links>
9451             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9452         </links>
9453     </class>
9454
9455     <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">
9456         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9457             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9458             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9459             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9460             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9461             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9462         </fields>
9463     </class>
9464
9465     <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">
9466         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9467             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9468             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9469             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9470             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9471             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9472             <field reporter:label="City" name="city" reporter:datatype="text"/>
9473             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9474             <field reporter:label="State" name="state" reporter:datatype="text"/>
9475             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9476             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9477             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9478         </fields>
9479     </class>
9480
9481     <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">
9482         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9483             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9484             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9485             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9486             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9487             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9488             <field reporter:label="City" name="city" reporter:datatype="text"/>
9489             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9490             <field reporter:label="State" name="state" reporter:datatype="text"/>
9491             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9492             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9493             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9494         </fields>
9495     </class>
9496
9497     <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">
9498         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9499             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9500             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9501             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9502             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9503             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9504             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9505         </fields>
9506     </class>
9507
9508         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9509                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9510                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9511                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9512                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9513                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9514                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9515                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9516                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9517                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9518                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9519                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9520                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9521                 </fields>
9522                 <links>
9523                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9524                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9525                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9526                 </links>
9527         </class>
9528
9529         <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">
9530                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9531                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9532                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9533                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9534                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9535                 </fields>
9536                 <links>
9537                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9538                 </links>
9539         </class>
9540
9541     <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">
9542         <fields>
9543             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9544             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9545             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9546         </fields>
9547                 <links>
9548                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9549                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9550                 </links>
9551     </class>
9552
9553     <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">
9554         <fields>
9555             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9556             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9557         </fields>
9558                 <links>
9559                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9560                 </links>
9561     </class>
9562
9563     <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">
9564         <fields>
9565             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9566             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9567             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9568         </fields>
9569                 <links>
9570                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9571                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9572                 </links>
9573     </class>
9574
9575     <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">
9576         <fields>
9577             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9578             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9579         </fields>
9580                 <links>
9581                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9582                 </links>
9583     </class>
9584
9585     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9586                 <oils_persist:source_definition>
9587
9588             SELECT  DISTINCT l.*
9589               FROM  action.unfulfilled_hold_loops l
9590                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9591               WHERE l.count = m.max
9592
9593                 </oils_persist:source_definition>
9594         <fields>
9595             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9596             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9597             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9598         </fields>
9599                 <links>
9600                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9601                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9602                 </links>
9603     </class>
9604
9605         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9606                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9607                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9608                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9609                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9610                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9611                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9612                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9613                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9614                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9615                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9616                 </fields>
9617                 <links>
9618                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9619                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9620                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9621                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9622                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9623                 </links>
9624         </class>
9625
9626         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9627                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9628                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9629                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9630                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9631                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9632                 </fields>
9633                 <links>
9634                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9635                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9636                 </links>
9637         </class>
9638
9639         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9640                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9641                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9642                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9643                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9644                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9645                 </fields>
9646                 <links>
9647                 </links>
9648         </class>
9649
9650         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9651                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9652                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9653                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9654                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9655                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9656                 </fields>
9657                 <links>
9658                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9659                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9660                 </links>
9661         </class>
9662         
9663         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9664                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9665                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9666                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9667                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9668                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9669                 </fields>
9670                 <links>
9671                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9672                 </links>
9673         </class>
9674         
9675         <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">
9676                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9677                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9678                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9679                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9680                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9681                 </fields>
9682                 <links>
9683                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9684                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9685                 </links>
9686         </class>
9687
9688         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9689                 <fields oils_persist:primary="name">
9690                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9691                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9692                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9693                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9694                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9695                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9696                 </fields>
9697                 <links>
9698                 </links>
9699         </class>
9700
9701         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9702                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9703                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9704                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9705                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9706                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9707                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9708                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9709                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9710                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9711                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9712                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9713                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9714                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9715                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9716                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9717                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9718                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9719                 </fields>
9720                 <links>
9721                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9722                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9723                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9724                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9725                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9726                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9727                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9728                 </links>
9729         </class>
9730
9731         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9732                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9733                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9734                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9735                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9736                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9737                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9738                 </fields>
9739                 <links>
9740                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9741                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9742                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9743                 </links>
9744         </class>
9745
9746         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9747                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9748                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9749                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9750                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9751                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9752                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9753                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9754                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9755                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9756                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9757                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9758                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9759                 </fields>
9760                 <links>
9761                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9762                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9763                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9764                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9765                 </links>
9766         </class>
9767
9768         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9769                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9770                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9771                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9772                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9773                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9774                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9775                 </fields>
9776                 <links>
9777                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9778                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9779                 </links>
9780         </class>
9781
9782         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9783                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9784                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9785                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9786                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9787                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9788                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9789                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9790                 </fields>
9791                 <links>
9792                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9793                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9794                 </links>
9795         </class>
9796
9797         <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">
9798                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9799                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9800                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9801                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9802                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9803                 </fields>
9804                 <links>
9805                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9806                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9807                 </links>
9808         </class>
9809
9810         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9811                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9812                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9813                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9814                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9815                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9816                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9817                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9818                 </fields>
9819                 <links>
9820                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9821                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9822                 </links>
9823         </class>
9824
9825         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9826                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9827                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9828                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9829                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9830                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9831                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9832                 </fields>
9833                 <links>
9834                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9835                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9836                 </links>
9837         </class>
9838
9839         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9840                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9841                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9842                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9843                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9844                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9845                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9846                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9847                 </fields>
9848                 <links>
9849                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9850                 </links>
9851         </class>
9852
9853         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9854                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9855                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9856                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9857                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9858                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9859                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9860                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9861                 </fields>
9862                 <links>
9863                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9864                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9865                 </links>
9866         </class>
9867
9868         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9869                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9870                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9871                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9872                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9873                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9874                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9875                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9876                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9877                 </fields>
9878                 <links>
9879                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9880                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9881                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9882                 </links>
9883         </class>
9884
9885         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9886                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9887                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9888                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9889                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9890                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9891                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9892                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9893                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9894                 </fields>
9895                 <links>
9896                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9897                 </links>
9898         </class>
9899
9900         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9901                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9902                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9903                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9904                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9905                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9906                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9907                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9908                 </fields>
9909                 <links>
9910                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9911                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9912                 </links>
9913         </class>
9914
9915         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9916                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9917                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9918                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9919                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9920                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9921                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9922                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9923                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9924                 </fields>
9925                 <links>
9926                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9927                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9928                 </links>
9929         </class>
9930
9931         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9932                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9933                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9934                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9935                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9936                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9937                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9938                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9939                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9940                 </fields>
9941                 <links>
9942                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9943                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9944                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9945                 </links>
9946         </class>
9947
9948         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9949                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9950                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9951                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9952                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9953                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9954                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9955                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9956                 </fields>
9957                 <links>
9958                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9959                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9960                 </links>
9961         </class>
9962
9963         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9964                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9965                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9966                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9967                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9968                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9969                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9970                 </fields>
9971                 <links>
9972                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9973                 </links>
9974         </class>
9975
9976         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9977                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9978                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9979                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9980                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9981                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9982                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9983                 </fields>
9984                 <links>
9985                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9986                 </links>
9987         </class>
9988
9989         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9990                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9991                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9992                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9993                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9994                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9995                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9996                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9997                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9998                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9999                 </fields>
10000                 <links>
10001                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10002                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10003                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10004                 </links>
10005         </class>
10006
10007         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator 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="Operator" name="operator" reporter:datatype="text"/>
10014                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10015                 </fields>
10016                 <links>
10017                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10018                 </links>
10019         </class>
10020
10021         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10022                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10023                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10024                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10025                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10026                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10027                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10028                 </fields>
10029                 <links>
10030                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10031                 </links>
10032         </class>
10033
10034         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10035                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10036                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10037                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10038                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10039                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10040                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10041                 </fields>
10042                 <links>
10043                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10044                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10045                 </links>
10046         </class>
10047
10048         <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">
10049                 <fields oils_persist:primary="id">
10050                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10051                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10052                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10053                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10054                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10055                 </fields>
10056                 <links>
10057                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10058                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10059                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10060                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10061                 </links>
10062         </class>
10063
10064         <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">
10065                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10066                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10067                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10068                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10069                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10070                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10071                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10072                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10073                 </fields>
10074                 <links/>
10075                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10076                         <actions>
10077                                 <retrieve/>
10078                         </actions>
10079                 </permacrud>
10080         </class>
10081
10082         <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">
10083                 <fields oils_persist:primary="ptype_key">
10084                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10085                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10086                 </fields>
10087                 <links/>
10088                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10089                         <actions>
10090                                 <retrieve/>
10091                         </actions>
10092                 </permacrud>
10093         </class>
10094
10095         <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">
10096                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10097                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10098                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10099                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10100                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10101                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10102                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10103                 </fields>
10104                 <links>
10105                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10106                 </links>
10107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10108                         <actions>
10109                                 <retrieve/>
10110                         </actions>
10111                 </permacrud>
10112         </class>
10113
10114         <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">
10115                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10116                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10117                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10118                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10119                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10120                 </fields>
10121                 <links>
10122                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10123                 </links>
10124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10125                         <actions>
10126                                 <retrieve/>
10127                         </actions>
10128                 </permacrud>
10129         </class>
10130
10131     <class
10132         id="uvs"
10133         controller="open-ils.cstore open-ils.pcrud"
10134         oils_obj:fieldmapper="url_verify::session"
10135         oils_persist:tablename="url_verify.session"
10136         reporter:label="URL Verification Session"
10137     >
10138         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10139             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10140             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10141                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10142             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10143             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10144             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10145             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10146             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10147             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10148         </fields>
10149
10150         <links>
10151             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10152             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10153             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10154             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10155             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10156         </links>
10157
10158         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10159             <actions>
10160                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10161             </actions>
10162         </permacrud>
10163
10164     </class>
10165
10166     <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">
10167         <oils_persist:source_definition>
10168             SELECT
10169                 cbrebi.id AS id,  -- so we can have a pkey in our view
10170                 uvs.id AS session,
10171                 uvs.owning_lib,
10172                 cbrebi.target_biblio_record_entry
10173             FROM url_verify.session uvs
10174             JOIN container.biblio_record_entry_bucket cbreb
10175                 ON (uvs.container = cbreb.id)
10176             JOIN container.biblio_record_entry_bucket_item cbrebi
10177                 ON (cbrebi.bucket = cbreb.id)
10178         </oils_persist:source_definition>
10179         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10180             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10181             <field reporter:label="Session" name="session" reporter:datatype="link" />
10182             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10183             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10184         </fields>
10185         <links>
10186             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10187             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10188             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10189         </links>
10190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10191             <actions>
10192                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10193             </actions>
10194         </permacrud>
10195     </class>
10196
10197     <class
10198         id="uvus"
10199         controller="open-ils.cstore open-ils.pcrud"
10200         oils_obj:fieldmapper="url_verify::url_selector"
10201         oils_persist:tablename="url_verify.url_selector"
10202         reporter:label="URL Verification URL Selector"
10203     >
10204         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10205             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10206             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10207                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10208             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10209         </fields>
10210
10211         <links>
10212             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10213             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10214         </links>
10215
10216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10217             <actions>
10218                 <create permission="URL_VERIFY">
10219                     <context link="session" field="owning_lib"/>
10220                 </create>
10221                 <retrieve permission="URL_VERIFY">
10222                     <context link="session" field="owning_lib"/>
10223                 </retrieve>
10224                 <update permission="URL_VERIFY">
10225                     <context link="session" field="owning_lib"/>
10226                 </update>
10227                 <delete permission="URL_VERIFY">
10228                     <context link="session" field="owning_lib"/>
10229                 </delete>
10230             </actions>
10231         </permacrud>
10232
10233     </class>
10234
10235     <class
10236         id="uvu"
10237         controller="open-ils.cstore open-ils.pcrud"
10238         oils_obj:fieldmapper="url_verify::url"
10239         oils_persist:tablename="url_verify.url"
10240         reporter:label="URL Verification URL"
10241     >
10242         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10243             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10244                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10245                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10246                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10247                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10248             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10249             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10250             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10251             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10252             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10253             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10254             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10255             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10256             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10257             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10258             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10259             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10260             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10261         </fields>
10262
10263         <links>
10264             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10265             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10266             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10267             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10268             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10269         </links>
10270
10271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10272             <actions>
10273                 <create permission="URL_VERIFY">
10274                     <context link="session" field="owning_lib"/>
10275                 </create>
10276                 <retrieve permission="URL_VERIFY">
10277                     <context link="session" field="owning_lib"/>
10278                 </retrieve>
10279                 <update permission="URL_VERIFY">
10280                     <context link="session" field="owning_lib"/>
10281                 </update>
10282                 <delete permission="URL_VERIFY">
10283                     <context link="session" field="owning_lib"/>
10284                 </delete>
10285             </actions>
10286         </permacrud>
10287
10288     </class>
10289
10290     <class
10291         id="uvva"
10292         controller="open-ils.cstore open-ils.pcrud"
10293         oils_obj:fieldmapper="url_verify::verification_attempt"
10294         oils_persist:tablename="url_verify.verification_attempt"
10295         reporter:label="URL Verification Attempt"
10296     >
10297         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10298             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10299                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10300                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10301             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10302             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10303         </fields>
10304
10305         <links>
10306             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10307             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10308         </links>
10309
10310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10311             <actions>
10312                 <create permission="URL_VERIFY">
10313                     <context link="session" field="owning_lib"/>
10314                 </create>
10315                 <retrieve permission="URL_VERIFY">
10316                     <context link="session" field="owning_lib"/>
10317                 </retrieve>
10318                 <update permission="URL_VERIFY">
10319                     <context link="session" field="owning_lib"/>
10320                 </update>
10321                 <delete permission="URL_VERIFY">
10322                     <context link="session" field="owning_lib"/>
10323                 </delete>
10324             </actions>
10325         </permacrud>
10326
10327     </class>
10328
10329     <class
10330         id="uvuv"
10331         controller="open-ils.cstore open-ils.pcrud"
10332         oils_obj:fieldmapper="url_verify::url_verification"
10333         oils_persist:tablename="url_verify.url_verification"
10334         reporter:label="URL Verification"
10335     >
10336         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10337             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10338                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10339                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10340             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10341             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10342             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10343             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10344                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10345         </fields>
10346
10347         <links>
10348             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10349             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10350             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10351         </links>
10352
10353         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10354             <actions>
10355                 <create permission="URL_VERIFY">
10356                     <context link="attempt" jump="session" field="owning_lib"/>
10357                 </create>
10358                 <retrieve permission="URL_VERIFY">
10359                     <context link="attempt" jump="session" field="owning_lib"/>
10360                 </retrieve>
10361                 <update permission="URL_VERIFY">
10362                     <context link="attempt" jump="session" field="owning_lib"/>
10363                 </update>
10364                 <delete permission="URL_VERIFY">
10365                     <context link="attempt" jump="session" field="owning_lib"/>
10366                 </delete>
10367             </actions>
10368         </permacrud>
10369
10370     </class>
10371
10372         <class
10373                 id="cfdi"
10374                 controller="open-ils.cstore open-ils.pcrud"
10375                 oils_obj:fieldmapper="config::filter_dialog_interface"
10376                 oils_persist:tablename="config.filter_dialog_interface"
10377                 reporter:label="FilterDialog Interface">
10378                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10379                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10380                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10381                 </fields>
10382                 <links>
10383                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10384                 </links>
10385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10386                         <actions>
10387                                 <retrieve />
10388                         </actions>
10389                 </permacrud>
10390         </class>
10391
10392         <class
10393                 id="cfdfs"
10394                 controller="open-ils.cstore open-ils.pcrud"
10395                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10396                 oils_persist:tablename="config.filter_dialog_filter_set"
10397                 reporter:label="FilterDialog Filter Set">
10398                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10399                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10400                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10401                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10402                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10403                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10404                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10405                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10406                 </fields>
10407                 <links>
10408                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10409                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10410                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10411                 </links>
10412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10413                         <actions>
10414                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10415                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10416                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10417                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10418                         </actions>
10419                 </permacrud>
10420
10421         </class>
10422
10423         <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">
10424                 <fields oils_persist:primary="code">
10425                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10426                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10427                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10428                 </fields>
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="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">
10438                 <oils_persist:source_definition>
10439
10440             SELECT  b.id,
10441                     MAX(dcp.edit_date) AS last_delete_date
10442              FROM   biblio.record_entry b
10443                     JOIN asset.call_number cn ON (cn.record = b.id)
10444                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10445              WHERE  NOT b.deleted
10446              GROUP BY b.id
10447              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10448
10449                 </oils_persist:source_definition>
10450                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10451                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10452                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10453                 </fields>
10454                 <links>
10455                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10456                 </links>
10457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10458                         <actions>
10459                                 <retrieve/>
10460                         </actions>
10461                 </permacrud>
10462         </class>
10463
10464         <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">
10465                 <oils_persist:source_definition>
10466
10467             -- -- 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.
10468             -- -- 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
10469             -- -- may not.
10470             -- SELECT
10471             --     bre.id AS "bib_id",
10472             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10473             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10474             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10475             -- FROM (
10476                 SELECT
10477                     y.bre AS "id",
10478                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10479                     y.hold_count AS "hold_count",
10480                     (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"
10481                 FROM (
10482                         SELECT
10483                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10484                             COUNT(*) AS "hold_count"
10485                         FROM action.hold_request h
10486                         WHERE
10487                             cancel_time IS NULL
10488                             AND fulfillment_time IS NULL
10489                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10490                         GROUP BY 1
10491                     )y LEFT JOIN (
10492                         SELECT 
10493                             (SELECT id
10494                                 FROM biblio.record_entry 
10495                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10496                             ) AS "bre", 
10497                             COUNT(*) AS "copy_count"
10498                         FROM asset.copy
10499                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10500                         WHERE copy.holdable 
10501                             AND NOT copy.deleted 
10502                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10503                         GROUP BY 1
10504                     )x ON x.bre = y.bre
10505                 -- )z RIGHT JOIN (
10506                 --     SELECT id
10507                 --     FROM biblio.record_entry
10508                 --     WHERE NOT deleted
10509                 -- )bre ON (z.bib_id = bre.id)
10510                 
10511
10512                 </oils_persist:source_definition>
10513                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10514                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10515                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10516                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10517                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10518                 </fields>
10519                 <links>
10520                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10521                 </links>
10522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10523                         <actions>
10524                                 <retrieve/>
10525                         </actions>
10526                 </permacrud>
10527         </class>
10528
10529         <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">
10530                 <oils_persist:source_definition>
10531             SELECT *,
10532                 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,
10533                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10534             FROM
10535                 (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
10536                     FROM
10537                         action.hold_request ahr
10538                         JOIN reporter.hold_request_record rhrr USING (id)
10539                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10540                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10541                     WHERE
10542                         ahr.cancel_time IS NULL
10543                         AND ahr.fulfillment_time IS NULL
10544                     GROUP BY bib_record, pickup_lib
10545                 )x
10546                 JOIN
10547                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10548                     FROM
10549                         action.hold_request ahr
10550                         JOIN reporter.hold_request_record rhrr USING (id)
10551                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10552                     WHERE
10553                         ahr.cancel_time IS NULL
10554                         AND ahr.fulfillment_time IS NULL
10555                     GROUP BY bib_record
10556                 )y
10557                 USING (id)
10558                 </oils_persist:source_definition>
10559                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10560                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10561                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10562                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10563                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10564                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10565                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10566                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10567                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10568                 </fields>
10569                 <links>
10570                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10571                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10572                 </links>
10573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10574                         <actions>
10575                                 <retrieve/>
10576                         </actions>
10577                 </permacrud>
10578         </class>
10579
10580         <class id="rhcrpbapd" controller="open-ils.cstore open-ils.pcrud open-ils.reporter-store" oils_obj:fieldmapper="reporter::hold_copy_ratio_per_bib_and_pickup_desc" oils_persist:readonly="true" reporter:label="Hold/Copy Ratio per Bib and Pickup Library (and Descendants) ">
10581                 <oils_persist:source_definition>
10582             WITH counts_at_ou AS (
10583                 SELECT bib_record, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, 
10584                     COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10585                 FROM action.hold_request ahr
10586                 JOIN reporter.hold_request_record rhrr USING (id)
10587                 LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10588                 LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10589                 WHERE ahr.cancel_time IS NULL
10590                 AND ahr.fulfillment_time IS NULL
10591                 GROUP BY bib_record, pickup_lib
10592             )
10593             SELECT *,
10594                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE holds_at_or_below::FLOAT/copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
10595                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10596             FROM
10597                 (SELECT bib_record AS id, aou.id AS pickup_lib_or_desc, SUM(holds_at_pickup_library) AS holds_at_or_below, SUM(copy_count_at_pickup_library) AS copy_count_at_or_below
10598                 FROM actor.org_unit aou
10599                 JOIN counts_at_ou cao ON (cao.pickup_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))) 
10600                 GROUP BY bib_record, pickup_lib_or_desc
10601                 )x
10602                 JOIN
10603                 (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10604                     FROM
10605                         action.hold_request ahr
10606                         JOIN reporter.hold_request_record rhrr USING (id)
10607                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10608                     WHERE
10609                         ahr.cancel_time IS NULL
10610                         AND ahr.fulfillment_time IS NULL
10611                     GROUP BY bib_record
10612                 )y
10613                 USING (id)
10614                 </oils_persist:source_definition>
10615                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10616                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10617                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10618                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10619                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10620                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10621                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10622                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10623                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10624                 </fields>
10625                 <links>
10626                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10627                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10628                 </links>
10629                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10630                         <actions>
10631                                 <retrieve/>
10632                         </actions>
10633                 </permacrud>
10634         </class>
10635
10636         <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">
10637                 <oils_persist:source_definition>
10638             SELECT
10639                 ac.id,
10640                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10641                 MAX(actac.xact_start) AS last_circ
10642             FROM asset.copy ac
10643                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10644             GROUP BY ac.id
10645
10646             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10647             --SELECT
10648             --    ac.id,
10649             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10650             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10651             --FROM asset.copy ac
10652             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10653             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10654             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10655                 </oils_persist:source_definition>
10656                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10657                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10658                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10659                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10660                 </fields>
10661                 <links>
10662                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10663                 </links>
10664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10665                         <actions>
10666                                 <retrieve/>
10667                         </actions>
10668                 </permacrud>
10669         </class>
10670
10671         <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">
10672                 <fields oils_persist:primary="id">
10673                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10674                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10675                 </fields>
10676                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10677                         <actions>
10678                                 <retrieve/>
10679                         </actions>
10680                 </permacrud>
10681         </class>
10682
10683         <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">
10684                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10685                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10686                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10687                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10688                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10689                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10690                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10691                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10692                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10693                 </fields>
10694                 <links>
10695                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10696                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10697                 </links>
10698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10699                         <actions>
10700                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10701                                 <retrieve/>
10702                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10703                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10704                         </actions>
10705                 </permacrud>
10706         </class>
10707
10708         <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">
10709                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10710                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10711                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10712                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10713                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10714                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10715                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10716                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10717                 </fields>
10718                 <links>
10719                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10720                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10721                 </links>
10722                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10723                         <actions>
10724                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10725                                 <retrieve/>
10726                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10727                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10728                         </actions>
10729                 </permacrud>
10730         </class>
10731
10732
10733         <!-- ********************************************************************************************************************* -->
10734         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10735         <!-- ********************************************************************************************************************* -->
10736         <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">
10737                 <fields oils_persist:primary="id">
10738                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10739                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10740                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10741                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10742                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10743                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10744                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10745                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10746                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10747                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10748                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10749                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10750                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10751                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10752                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10753                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10754                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10755                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10756                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10757                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10758                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10759                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10760                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10761                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10762                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10763                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10764                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10765                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10766                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10767                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10768                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10769                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10770                 </fields>
10771                 <links>
10772                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10773                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10774                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10775                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10776                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10777                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10778                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10779                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10780                 </links>
10781         </class>
10782
10783         <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">
10784                 <fields oils_persist:primary="id">
10785                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10786                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10787                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10788                 </fields>
10789                 <links>
10790                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10791                 </links>
10792         </class>
10793
10794         <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">
10795                 <fields oils_persist:primary="id">
10796                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10797                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10798                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10799                 </fields>
10800                 <links>
10801                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10802                 </links>
10803         </class>
10804
10805         <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">
10806                 <fields oils_persist:primary="id">
10807                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10808
10809                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10810                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10811                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10812
10813                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10814                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10815                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10816
10817                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10818                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10819
10820                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10821                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10822                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10823
10824                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10825                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10826
10827                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10828                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10829                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10830
10831                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10832                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10833                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10834
10835                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10836                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10837                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10838                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10839
10840                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10841                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10842
10843                 </fields>
10844                 <links>
10845                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10846                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10847                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10848                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10849                 </links>
10850         </class>
10851
10852         <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">
10853                 <oils_persist:source_definition>
10854
10855             SELECT
10856                 po.ordering_agency AS ordering_agency,
10857                 po.id AS purchase_order,
10858                 li.id AS lineitem,
10859                 lid.id AS lineitem_detail,
10860                 cpa.id AS claim_policy_action
10861             FROM
10862                 acq.lineitem_detail lid
10863                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10864                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10865                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10866                 JOIN acq.claim_policy_action cpa ON (
10867                     cpa.claim_policy = cp.id
10868
10869                     -- we only care about claim policy actions whose claim
10870                     -- interval we'd reached or exceeded
10871                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10872
10873                     -- filter out all claim policy actions where claim events
10874                     -- have occurred on or after the action's action_interval
10875                     AND NOT EXISTS (
10876                         SELECT 1
10877                         FROM
10878                             acq.claim_event evt
10879                             JOIN acq.claim claim ON (
10880                                 claim.id = evt.claim
10881                                 AND claim.lineitem_detail = lid.id
10882                             )
10883                         WHERE
10884                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10885                     )
10886                 )
10887             WHERE
10888                 lid.cancel_reason IS NULL
10889                 AND li.cancel_reason IS NULL -- belt/suspenders
10890                 AND po.cancel_reason IS NULL -- belt/suspenders
10891                 AND lid.recv_time IS NULL
10892                 AND po.state = 'on-order'
10893             ORDER BY 1, 2, 3, 4, 5
10894
10895                 </oils_persist:source_definition>
10896                 <fields>
10897                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10898                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10899                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10900                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10901                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10902                 </fields>
10903                 <links>
10904                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10905                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10906                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10907                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10908                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10909                 </links>
10910         </class>
10911         <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">
10912                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10913                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10914                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10915                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10916                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10917                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10918                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10919                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10920                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10921                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10922                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10923                 </fields>
10924                 <links>
10925                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10926                 </links>
10927     </class>
10928         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10929                 <oils_persist:source_definition>
10930             SELECT * FROM acq.lineitem_summary 
10931                                 WHERE item_count > (invoice_count + cancel_count)
10932         </oils_persist:source_definition>
10933                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10934                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10935                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10936                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10937                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10938                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10939                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10940                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10941                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10942                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10943                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10944                 </fields>
10945                 <links>
10946                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10947                 </links>
10948     </class>
10949         <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">
10950                 <oils_persist:source_definition>
10951
10952                         SELECT  t.*
10953                           FROM  action.transit_copy t
10954                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10955                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10956                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10957
10958                 </oils_persist:source_definition>
10959                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10960                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10961                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10962                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10963                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10964                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10965                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10966                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10967                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10968                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10969                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10970                 </fields>
10971                 <links>
10972                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10973                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10974                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10975                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10976                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10977                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10978                 </links>
10979         </class>
10980
10981     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10982                 <oils_persist:source_definition>
10983
10984         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10985                 SELECT
10986                         cp.id as copy,
10987                         COUNT(circ.id),
10988                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10989                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10990                 FROM
10991                         asset.copy cp
10992                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10993                 GROUP BY 1, 3, 4
10994                 UNION ALL
10995                 SELECT
10996                         cp.id as copy,
10997                         COUNT(circ.id),
10998                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10999                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11000                 FROM
11001                         asset.copy cp
11002                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11003                 GROUP BY 1, 3, 4
11004                 UNION ALL
11005                 SELECT
11006                         id as copy,
11007                         circ_count,
11008                         -1 AS year,
11009                         false as is_renewal
11010                 FROM
11011                         extend_reporter.legacy_circ_count
11012         )x GROUP BY 1, 3, 4
11013
11014                 </oils_persist:source_definition>
11015         <fields>
11016             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11017             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11018             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11019             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11020         </fields>
11021                 <links>
11022                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11023                 </links>
11024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11025                         <actions>
11026                                 <retrieve/>
11027                         </actions>
11028                 </permacrud>
11029     </class>
11030
11031         <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">
11032                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11033                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11034                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11035                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11036                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11037                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11038                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11039                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11040                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11041                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11042                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11043                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11044                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11045                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11046                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11047                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11048                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11049                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11050                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11051                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11052                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11053                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11054                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11055                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11056                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11057                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11058                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11059                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11060                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11061                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11062                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11063                 </fields>
11064                 <links>
11065                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11066                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11067                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11068                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11069                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11070                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11071                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11072                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11073                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11074                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11075                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11076                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11077                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11078                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11079                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11080                 </links>
11081         </class>
11082
11083     <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">
11084         <fields oils_persist:primary="id">
11085             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11086             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11087             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11088             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11089             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11090             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11091             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11092             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11093             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11094             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11095             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11096             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11097             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11098             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11099             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11100             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11101             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11102             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11103             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11104             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11105             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11106             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11107             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11108             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11109             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11110             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11111             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11112             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11113             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11114             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11115             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11116             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11117             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11118             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11119         </fields>
11120         <links>
11121             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11122             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11123             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11124             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11125             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11126             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11127             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11128             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11129         </links>
11130     </class>
11131
11132     <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">
11133         <fields oils_persist:primary="id">
11134             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11135             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11136             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11137             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11138         </fields>
11139         <links>
11140             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11141             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11142         </links>
11143     </class>
11144
11145     <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">
11146         <fields oils_persist:primary="owning_lib">
11147             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11148             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11149             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11150         </fields>
11151         <links>
11152             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11153         </links>
11154     </class>
11155
11156     <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">
11157         <fields oils_persist:primary="id">
11158             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11159             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11160             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11161             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11162             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11163         </fields>
11164         <links>
11165             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11166             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11167             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11168         </links>
11169     </class>
11170
11171     <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">
11172         <fields oils_persist:primary="circ_lib">
11173             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11174             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11175             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11176             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11177         </fields>
11178         <links>
11179             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11180             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11181         </links>
11182     </class>
11183
11184     <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">
11185         <fields oils_persist:primary="id">
11186             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11187             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11188             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11189             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11190             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11191         </fields>
11192         <links>
11193             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11194             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11195             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11196         </links>
11197     </class>
11198
11199     <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">
11200         <fields oils_persist:primary="home_ou">
11201             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11202             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11203             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11204             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11205         </fields>
11206         <links>
11207             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11208             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11209         </links>
11210     </class>
11211         <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">
11212                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11213                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11214                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11215                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11216                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11217                 </fields>
11218                 <links>
11219                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11220                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11221                 </links>
11222                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11223                         <actions>
11224                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11225                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11226                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11227                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11228                         </actions>
11229                 </permacrud>
11230         </class>
11231         <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">
11232                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11233                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11234                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11235                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11236                 </fields>
11237                 <links>
11238                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11239                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11240                         </links>
11241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11242                 <actions>
11243                                 <create permission="ADMIN_ACQ_FUND_TAG">
11244                                         <context link="tag" field="owner"/>
11245                                 </create>
11246                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11247                                         <context link="tag" field="owner"/>
11248                                 </retrieve>
11249                                 <update permission="ADMIN_ACQ_FUND_TAG">
11250                                         <context link="tag" field="owner"/>
11251                                 </update>
11252                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11253                                         <context link="tag" field="owner"/>
11254                                 </delete>
11255                         </actions>
11256                 </permacrud>
11257         </class>
11258         <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">
11259                 <oils_persist:source_definition><![CDATA[
11260                 SELECT
11261                         poi.purchase_order AS purchase_order,
11262                         ii.invoice AS invoice,
11263                         NULL AS lineitem,
11264                         poi.id AS po_item,
11265                         NULL AS picklist
11266                 FROM
11267                         acq.po_item poi
11268                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11269                 UNION SELECT
11270                         jub.purchase_order AS purchase_order,
11271                         ie.invoice AS invoice,
11272                         jub.id AS lineitem,
11273                         NULL AS po_item,
11274                         jub.picklist AS picklist
11275                 FROM
11276                         acq.lineitem jub
11277                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11278                 UNION SELECT
11279                         ii.purchase_order AS purchase_order,
11280                         ii.invoice AS invoice,
11281                         NULL AS lineitem,
11282                         NULL AS po_item,
11283                         NULL AS picklist
11284                 FROM
11285                         acq.invoice_item ii
11286                 WHERE ii.po_item IS NULL
11287                 UNION SELECT
11288                         ie.purchase_order AS purchase_order,
11289                         ie.invoice AS invoice,
11290                         NULL AS lineitem,
11291                         NULL AS po_item,
11292                         NULL AS picklist
11293                 FROM
11294                         acq.invoice_entry ie
11295                 WHERE ie.lineitem IS NULL
11296                 UNION SELECT
11297                         NULL AS purchase_order,
11298                         NULL AS invoice,
11299                         jub.id AS lineitem,
11300                         NULL AS po_item,
11301                         jub.picklist AS picklist
11302                 FROM
11303                         acq.lineitem jub
11304                 WHERE jub.purchase_order IS NULL
11305                 ]]></oils_persist:source_definition>
11306                 <fields>
11307                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11308                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11309                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11310                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11311                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11312                 </fields>
11313                 <links>
11314                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11315                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11316                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11317                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11318                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11319                 </links>
11320         </class>
11321         <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">
11322                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11323                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11324                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11325                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11326                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11327                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11328                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11329                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11330                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11331                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11332                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11333                 </fields>
11334                 <links>
11335                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11336                 </links>
11337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11338                         <actions>
11339                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11340                                 <retrieve/>
11341                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11342                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11343                         </actions>
11344                 </permacrud>
11345         </class>
11346
11347         <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">
11348                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11349                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11350                         <field name="date_applied" reporter:datatype="timestamp"/>
11351                         <field name="org" reporter:datatype="org_unit"/>
11352                         <field name="original_value" reporter:datatype="text"/>
11353                         <field name="new_value" reporter:datatype="text"/>
11354                         <field name="field_name" reporter:datatype="link"/>
11355                 </fields>
11356                 <links>
11357                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11358                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11359                 </links>
11360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11361                         <actions>
11362                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11363                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11364                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11365                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11366                         </actions>
11367                 </permacrud>
11368         </class>
11369         <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">
11370                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11371                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11372                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11373                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11374                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11375                 </fields>
11376                 <links>
11377                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11378                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11379                 </links>
11380         </class>
11381         <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">
11382                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11383                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11384                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11385                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11386                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11387                 </fields>
11388                 <links>
11389                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11390                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11391                 </links>
11392         </class>
11393         <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">
11394                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11395                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11396                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11397                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11398                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11399                 </fields>
11400                 <links>
11401                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11402                 </links>
11403                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11404                         <actions>
11405                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11406                                 <retrieve/>
11407                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11408                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11409                         </actions>
11410                 </permacrud>
11411         </class>
11412         <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">
11413                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11414                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11415                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11416                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11417                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11418                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11419                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11420                 </fields>
11421                 <links>
11422                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11423                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11424                 </links>
11425                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11426                         <actions>
11427                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11428                                 <retrieve/>
11429                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11430                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11431                         </actions>
11432                 </permacrud>
11433         </class>
11434         <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">
11435         <oils_persist:source_definition>
11436         SELECT ahcm.target_copy AS "id",count(*) AS "count"
11437          FROM
11438          action.hold_request ahr,
11439          action.hold_copy_map ahcm
11440          WHERE
11441          ahr.cancel_time IS NULL AND
11442          ahr.fulfillment_time IS NULL AND
11443          ahr.capture_time IS NULL AND
11444          ahr.id = ahcm.hold
11445          GROUP BY ahcm.target_copy
11446         </oils_persist:source_definition>
11447         <fields oils_persist:primary="id">
11448             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11449             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11450         </fields>
11451         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11452             <actions>
11453                <retrieve/>
11454             </actions>
11455         </permacrud>
11456         </class>
11457
11458         <!-- ********************************************************************************************************************* -->
11459
11460 </IDL>
11461
11462 <!--
11463     vim:noet:ts=4:sw=4:
11464 -->