]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
7c8201d9273a85487aa10717548e23ebaf6ee580
[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                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <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">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <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">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
228                     <context link="grp" field="owner"/>
229                 </create>
230                                 <retrieve/>
231                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
232                     <context link="grp" field="owner"/>
233                 </update>
234                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
235                     <context link="grp" field="owner"/>
236                 </delete>
237                         </actions>
238                 </permacrud>
239         </class>
240
241         <class  id="vibtg" 
242             controller="open-ils.cstore open-ils.pcrud" 
243             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
244             oils_persist:tablename="vandelay.import_bib_trash_group" 
245             reporter:label="Import/Overlay Field Groups for Removal">
246                 <fields oils_persist:primary="id" 
247                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
248                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
249                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
250                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
251                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
252                 </fields>
253                 <links>
254                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
255                 </links>
256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
257                         <actions>
258                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
259                                 <retrieve/>
260                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                         </actions>
263                 </permacrud>
264         </class>
265
266
267         <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">
268                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
269                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
270                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
271                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
272                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
273                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
274                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
275                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
276                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
277                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
278                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
279                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
280                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
281                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
282                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
283                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
285                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
286                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
287                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
288                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
289                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
290                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
291                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
292                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
293                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
294                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
295                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
296                 </fields>
297                 <links>
298                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
299                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
300                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
301                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
302                 </links>
303                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
304                         <actions>
305                                 <create permission="CREATE_IMPORT_ITEM">
306                     <context link="definition" field="owner"/>
307                                 </create>
308                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
309                     <context link="definition" field="owner"/>
310                                 </retrieve>
311                                 <update permission="UPDATE_IMPORT_ITEM">
312                     <context link="definition" field="owner"/>
313                                 </update>
314                                 <delete permission="DELETE_IMPORT_ITEM">
315                     <context link="definition" field="owner"/>
316                                 </delete>
317                         </actions>
318                 </permacrud>
319         </class>
320
321         <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">
322                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
323                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
324                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
325                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
326                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
327                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
328                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
329                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
330                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
331                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
332                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
333                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
334                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
335                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
336                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
337                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
338                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
339                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
340                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
341                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
342                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
343                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
344                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
345                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
346                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
347                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
348                 </fields>
349                 <links>
350                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
351                 </links>
352                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
353                         <actions>
354                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
355                                 <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"/>
356                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                         </actions>
359                 </permacrud>
360         </class>
361
362         <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">
363                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
364                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
365                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
366                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
367                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
368                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
369                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
370                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
371                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
372                 </fields>
373                 <links>
374                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
375                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
376                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
377                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
378                 </links>
379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
380                         <actions>
381                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                         </actions>
386                 </permacrud>
387         </class>
388
389         <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">
390                 <fields oils_persist:primary="code">
391                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
392                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
393                 </fields>
394                 <links>
395                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
396                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <retrieve/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <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">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
408                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
410                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
412                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
413                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
414                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
415                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
416                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
422                 </fields>
423                 <links>
424                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
425                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
426                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
427                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
428             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
429             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
430             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <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">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                 </fields>
450                 <links/>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
454                 <retrieve/>
455                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
456                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <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">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
463                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
464                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
465                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
467                 </fields>
468                 <links>
469                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
470                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
471                 </links>
472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
473                         <actions>
474                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
475                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                         </actions>
479                 </permacrud>
480         </class>
481
482         <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">
483                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
484                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
485                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
486                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
487                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
488                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
489                 </fields>
490                 <links>
491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
492                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
493                 </links>
494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
495                         <actions>
496                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
497                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <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">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
506                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
507                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
509                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
510                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
511                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
516                 </links>
517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
518                         <actions>
519                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                         </actions>
524                 </permacrud>
525         </class>
526
527         <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">
528                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
529                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
530                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
531                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
533                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
534                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
535                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
536                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
537                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
538                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
539                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
541                 </fields>
542                 <links>
543                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
544                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
545                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
546             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
547             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
548                 </links>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
552                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <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">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
563                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
564                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
565                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
566                 </fields>
567                 <links/>
568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
569                         <actions>
570                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
571                 <retrieve/>
572                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                         </actions>
575                 </permacrud>
576         </class>
577
578         <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">
579                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
580                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
581                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
582                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
583                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
584                 </fields>
585                 <links>
586                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
587                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
588                 </links>
589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590                         <actions>
591                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
592                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                         </actions>
596                 </permacrud>
597         </class>
598
599         <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">
600                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
601                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
602                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
603                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
604                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
605                 </fields>
606                 <links>
607                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
608                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
613                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
614                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                         </actions>
617                 </permacrud>
618         </class>
619
620         <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">
621                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
622                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
623                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
624                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
625                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
626                 </fields>
627                 <links>
628                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
629                 </links>
630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
631                         <actions>
632                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
633                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
634                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
636                         </actions>
637                 </permacrud>
638         </class>
639
640         <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">
641                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
642                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
643                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
644                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
645                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
646                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
647                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
648                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
649             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
650                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
651                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
652                 </fields>
653                 <links>
654                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
655                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
656                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
657                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
658                 </links>
659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
660                         <actions>
661                                 <create permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </create>
664                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </retrieve>
667                                 <update permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </update>
670                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
671                     <context link="match_set" field="owner"/>
672                                 </delete>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <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">
678                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
679                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
681                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
682                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
683                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
684                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
685                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
686                 </fields>
687                 <links>
688                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
689                 </links>
690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
691                         <actions>
692                                 <create permission="ADMIN_IMPORT_MATCH_SET">
693                     <context link="match_set" field="owner"/>
694                                 </create>
695                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
696                     <context link="match_set" field="owner"/>
697                                 </retrieve>
698                                 <update permission="ADMIN_IMPORT_MATCH_SET">
699                     <context link="match_set" field="owner"/>
700                                 </update>
701                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
702                     <context link="match_set" field="owner"/>
703                                 </delete>
704                         </actions>
705                 </permacrud>
706         </class>
707
708         <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">
709                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
710                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
711                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
712                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
714                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
715                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
716                 </fields>
717                 <links>
718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
720                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
721                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
722                 </links>
723         </class>
724
725     <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">
726         <fields oils_persist:primary="name">
727             <field reporter:label="Name" name="name" reporter:datatype="text"/>
728             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
729             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
730             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
731         </fields>
732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
733             <actions>
734                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
735                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
736                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738             </actions>
739         </permacrud>
740     </class>
741
742     <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">
743         <fields oils_persist:primary="id">
744             <field reporter:label="ID" name="id" reporter:datatype="id"/>
745             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
746             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
747             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
748             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
749         </fields>
750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
751             <actions>
752                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
753                 <retrieve/>
754                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
756             </actions>
757         </permacrud>
758     </class>
759
760         <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">
761                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
763                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
764                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
765                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
766                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
767                 </fields>
768                 <links>
769                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
770                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
771                 </links>
772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
773             <actions>
774                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
775                 <retrieve/>
776                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
778             </actions>
779         </permacrud>
780         </class>
781
782         <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">
783                 <fields oils_persist:primary="name">
784                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
785                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
786                         <field reporter:label="Description" name="description" reporter:datatype="text" />
787                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
788                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
789                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
790                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
791                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
792                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
793                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
794                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
795                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
796                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
797                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
798                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
799                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
800                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
801                 </fields>
802                 <links>
803                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
804                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
805                 </links>
806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
807             <actions>
808                 <create permission="ADMIN_SVF" global_required="true"/>
809                 <retrieve/>
810                 <update permission="ADMIN_SVF" global_required="true"/>
811                 <delete permission="ADMIN_SVF" global_required="true"/>
812             </actions>
813         </permacrud>
814         </class>
815
816         <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">
817                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
818                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
819                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
820                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
821             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
822                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
823                 </fields>
824                 <links/>
825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
826             <actions>
827                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <retrieve/>
829                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
830                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
831             </actions>
832         </permacrud>
833         </class>
834
835         <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">
836                 <fields oils_persist:primary="coded_value">
837                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
838                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
839                 </fields>
840                 <links>
841                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
842                 </links>
843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
844             <actions>
845                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
846                 <retrieve/>
847                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
848                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
849             </actions>
850         </permacrud>
851         </class>
852
853         <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">
854                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
855                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
856                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
857                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
858                 </fields>
859                 <links>
860                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
861                 </links>
862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
863             <actions>
864                 <retrieve/>
865             </actions>
866         </permacrud>
867         </class>
868
869
870         <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">
871                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
872                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
873                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
874                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
875                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
876                 </fields>
877                 <links>
878                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
879                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
880                 </links>
881         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
882             <actions>
883                 <retrieve/>
884             </actions>
885         </permacrud>
886         </class>
887
888
889         <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">
890                 <fields oils_persist:primary="source">
891                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
892                         <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 -->
893                 </fields>
894                 <links>
895                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
896                 </links>
897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
898             <actions>
899                 <retrieve/>
900             </actions>
901         </permacrud>
902         </class>
903
904
905         <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">
906                 <fields oils_persist:primary="id">
907                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
908                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
909                 </fields>
910                 <links>
911                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
912                 </links>
913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
914             <actions>
915                 <retrieve/>
916             </actions>
917         </permacrud>
918         </class>
919
920         <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">
921                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
922                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
923                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
924                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
925                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
926                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
927                 </fields>
928                 <links>
929                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
930                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
931                 </links>
932         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
933             <actions>
934                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
935                 <retrieve/>
936                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
937                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
938             </actions>
939         </permacrud>
940         </class>
941
942         <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">
943                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
944                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
945                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
946                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
947                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
948                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
949                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
950                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
951             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
952             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
953                 </fields>
954                 <links>
955                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
956                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
957                 </links>
958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
959             <actions>
960                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
961                 <retrieve/>
962                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
963                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
964             </actions>
965         </permacrud>
966         </class>
967
968         <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">
969                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
970                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
971                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
972                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
973                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
974                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
975                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
976                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
977                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
978                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
979                 </fields>
980                 <links>
981                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
982                 </links>
983         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
984             <actions>
985                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
986                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
987                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
988                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
989             </actions>
990         </permacrud>
991         </class>
992
993     <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">
994         <fields oils_persist:primary="name">
995             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
996             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
997             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
998             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
999             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1000             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1001             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1002             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1003             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1004             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1005         </fields>
1006         <links>
1007             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1008             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1009         </links>
1010         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1011             <actions>
1012                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1013                 <retrieve/>
1014                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1015                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1016             </actions>
1017         </permacrud>
1018     </class>
1019
1020     <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">
1021         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1022             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1023             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1024             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1025             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1026             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1027             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1028             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1029         </fields>
1030         <links>
1031             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1032         </links>
1033         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1034             <actions>
1035                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1036                 <retrieve/>
1037                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1038                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1039             </actions>
1040         </permacrud>
1041     </class>
1042
1043     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1044                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1045                         oils_persist:tablename="config.z3950_index_field_map" 
1046                         reporter:label="Z39.50 Index Field Map">
1047         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1048             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1049             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1050             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1051             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1052             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1053             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1054         </fields>
1055         <links>
1056             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1057             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1058             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1059         </links>
1060         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1061             <actions>
1062                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1063                 <retrieve/>
1064                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1065                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1066             </actions>
1067         </permacrud>
1068     </class>
1069
1070
1071         <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">
1072                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1073                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1074                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1075                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1076                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1077                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1078                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1079                 </fields>
1080                 <links>
1081             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1082             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1083                 </links>
1084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085                         <actions>
1086                                 <retrieve/>
1087                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1088                         </actions>
1089                 </permacrud>
1090         </class>
1091
1092         <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">
1093                 <fields oils_persist:primary="key">
1094                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1095                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1096                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1097                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1098                 </fields>
1099                 <links/>
1100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1101                         <actions>
1102                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1103                                 <retrieve/>
1104                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1105                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1106                         </actions>
1107                 </permacrud>
1108         </class>
1109
1110         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1111                 <fields oils_persist:primary="module">
1112                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1113                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1114                 </fields>
1115                 <links/>
1116         </class>
1117
1118         <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">
1119                 <fields oils_persist:primary="module">
1120                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1121                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1122                 </fields>
1123                 <links/>
1124                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1125                         <actions>
1126                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1127                                 <retrieve/>
1128                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1129                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1130                         </actions>
1131                 </permacrud>
1132         </class>
1133
1134         <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">
1135                 <fields oils_persist:primary="module">
1136                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1137                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1138                 </fields>
1139                 <links/>
1140                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1141                         <actions>
1142                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1143                                 <retrieve/>
1144                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1145                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1146                         </actions>
1147                 </permacrud>
1148         </class>
1149
1150         <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">
1151                 <fields oils_persist:primary="module">
1152                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1153                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1154                 </fields>
1155                 <links/>
1156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1157                         <actions>
1158                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1159                                 <retrieve/>
1160                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1161                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1162                         </actions>
1163                 </permacrud>
1164         </class>
1165
1166         <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">
1167                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1168                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1169                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1170                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1171                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1172                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1173                 </fields>
1174                 <links>
1175                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1176                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1177                 </links>
1178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1179                         <actions>
1180                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1181                     <context link="event_def" field="owner"/>
1182                 </create>
1183                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1184                     <context link="event_def" field="owner"/>
1185                 </retrieve>
1186                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1187                     <context link="event_def" field="owner"/>
1188                 </update>
1189                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1190                     <context link="event_def" field="owner"/>
1191                 </delete>
1192                         </actions>
1193                 </permacrud>
1194         </class>
1195
1196         <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">
1197                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1198                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1199                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1200                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1201                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1202                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1203                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1204                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1205                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1206                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1207                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1208                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1209                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1210                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1211                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1212                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1213                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1214                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1215                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1216                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1217                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1218                 </fields>
1219                 <links>
1220                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1221                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1222                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1223                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1224                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1225                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1226                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1227                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1228                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1229                 </links>
1230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1231                         <actions>
1232                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1233                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1234                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1235                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1236                         </actions>
1237                 </permacrud>
1238         </class>
1239
1240         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1241                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1242                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1243                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1244                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1245                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1246                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1247                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1248                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1249                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1250                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1251                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1252                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1253                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1254                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1255                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1256                 </fields>
1257                 <links>
1258                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1259                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1260                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1261                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1262                 </links>
1263         </class>
1264
1265         <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">
1266                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1267                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1268                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1269                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1270                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1271                 </fields>
1272                 <links>
1273                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1274                 </links>
1275                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1276                         <actions>
1277                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1278                     <context link="event_def" field="owner"/>
1279                 </create>
1280                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1281                     <context link="event_def" field="owner"/>
1282                 </retrieve>
1283                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1284                     <context link="event_def" field="owner"/>
1285                 </update>
1286                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1287                     <context link="event_def" field="owner"/>
1288                 </delete>
1289                         </actions>
1290                 </permacrud>
1291         </class>
1292
1293         <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">
1294                 <oils_persist:source_definition><![CDATA[
1295                 SELECT  atevdef.hook,
1296                         atevdef.name,
1297                         atevdef.reactor,
1298                         atev.id,
1299                         atev.event_def,
1300                         atev.add_time,
1301                         atev.run_time,
1302                         atev.start_time,
1303                         atev.update_time,
1304                         atev.complete_time,
1305                         atev.update_process,
1306                         atev.state,
1307                         atev.user_data,
1308                         atev.template_output,
1309                         atev.error_output,
1310                         atev.async_output,
1311                         targ_circ.id AS target_circ,
1312                         targ_ahr.id AS target_hold,
1313                         COALESCE(
1314                                 targ_circ.circ_lib,
1315                                 targ_ahr.pickup_lib
1316                         ) AS perm_lib
1317                 FROM action_trigger.event atev
1318                 JOIN action_trigger.event_definition atevdef ON
1319                         (atevdef.id = atev.event_def)
1320                 JOIN action_trigger.hook ath ON
1321                         (ath.key = atevdef.hook)
1322                 LEFT JOIN action.circulation targ_circ ON
1323                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1324                 LEFT JOIN action.hold_request targ_ahr ON
1325                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1326                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1327                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1328                                 'circ.staff.max_visible_event_age',
1329                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1330                         ) UNION
1331                         SELECT '1000 YEARS'::INTERVAL AS value
1332                 ) ous)
1333                 ]]></oils_persist:source_definition>
1334                 <fields oils_persist:primary="id">
1335                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1336                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1337                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1338                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1339                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1340                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1341                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1342                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1343                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1344                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1345                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1346                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1347                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1348                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1349                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1350                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1351                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1352                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1353                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1354                 </fields>
1355                 <links>
1356                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1357                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1358                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1359                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1360                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1361                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1362                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1363                 </links>
1364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1365                         <actions>
1366                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1367                         </actions>
1368                 </permacrud>
1369         </class>
1370
1371         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1372                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1373                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1374                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1375                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1376                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1377                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1378                 </fields>
1379                 <links>
1380                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1381                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1382                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1383                 </links>
1384         </class>
1385
1386         <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">
1387                 <fields oils_persist:primary="code">
1388                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1389                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1390                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1391                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1392                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1393                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1394                 </fields>
1395                 <links/>
1396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1397             <actions>
1398                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1399                 <retrieve/>
1400                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1401                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1402             </actions>
1403         </permacrud>
1404         </class>
1405
1406         <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">
1407                 <fields oils_persist:primary="code">
1408                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1409                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1410                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1411                 </fields>
1412                 <links/>
1413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1414             <actions>
1415                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1416                 <retrieve/>
1417                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1418                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1419             </actions>
1420         </permacrud>
1421         </class>
1422
1423         <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">
1424                 <fields oils_persist:primary="code">
1425                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1426                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1427                 </fields>
1428                 <links/>
1429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1430             <actions>
1431                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1432                 <retrieve/>
1433                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1434                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1435             </actions>
1436         </permacrud>
1437         </class>
1438
1439         <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">
1440                 <fields oils_persist:primary="code">
1441                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1442                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1443                 </fields>
1444                 <links/>
1445         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1446             <actions>
1447                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1448                 <retrieve/>
1449                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1450                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1451             </actions>
1452         </permacrud>
1453         </class>
1454
1455         <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">
1456                 <fields oils_persist:primary="code">
1457                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1458                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1459                 </fields>
1460                 <links/>
1461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1462             <actions>
1463                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1464                 <retrieve/>
1465                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1466                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1467             </actions>
1468         </permacrud>
1469         </class>
1470
1471         <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">
1472                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1473                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1474                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1475                 </fields>
1476                 <links/>
1477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1478             <actions>
1479                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1480                 <retrieve/>
1481                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1482                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1483             </actions>
1484         </permacrud>
1485         </class>
1486
1487         <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">
1488                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1489                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1490                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1491                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1492                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1493                 </fields>
1494         <links>
1495             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1496             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1497             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1498         </links>
1499         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1500             <actions>
1501                 <create permission="UPDATE_COPY">
1502                     <context link="target_copy" field="circ_lib"/>
1503                 </create>
1504                 <retrieve/>
1505                 <update permission="UPDATE_COPY">
1506                     <context link="target_copy" field="circ_lib"/>
1507                 </update>
1508                 <delete permission="UPDATE_COPY">
1509                     <context link="target_copy" field="circ_lib"/>
1510                 </delete>
1511             </actions>
1512         </permacrud>
1513         </class>
1514
1515         <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">
1516                 <fields oils_persist:primary="code">
1517                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1518                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1519                 </fields>
1520                 <links/>
1521         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1522             <actions>
1523                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1524                 <retrieve/>
1525                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1526                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1527             </actions>
1528         </permacrud>
1529         </class>
1530
1531         <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">
1532                 <fields oils_persist:primary="code">
1533                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1534                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1535                 </fields>
1536                 <links/>
1537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1538             <actions>
1539                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1540                 <retrieve/>
1541                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1542                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1543             </actions>
1544         </permacrud>
1545         </class>
1546
1547         <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">
1548                 <fields oils_persist:primary="code">
1549                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1550                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1551                 </fields>
1552                 <links/>
1553         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1554             <actions>
1555                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1556                 <retrieve/>
1557                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1558                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1559             </actions>
1560         </permacrud>
1561         </class>
1562
1563     <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">
1564         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1565             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1566             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1567             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1568             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1569             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1570             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1571             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1572             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1573             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1574             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1575             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1576             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1577             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1578             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1579             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1580             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1581             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1582         </fields>
1583         <links/>
1584         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1585             <actions>
1586                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1587                 <retrieve/>
1588                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1589                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1590             </actions>
1591         </permacrud>
1592     </class>
1593
1594     <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">
1595         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1596             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1597             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1598             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1599             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1600             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1601             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1602             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1603             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1604             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1605             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1606             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1607             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1608             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1609             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1610             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1611             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1612             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1613             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1614             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1615         </fields>
1616         <links/>
1617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1618             <actions>
1619                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1620                 <retrieve/>
1621                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1622                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1623             </actions>
1624         </permacrud>
1625     </class>
1626
1627     <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">
1628         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1629             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1630             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1631             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1632             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1633             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1634         </fields>
1635         <links>
1636             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1637             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1638             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1639         </links>
1640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1641             <actions>
1642                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1643                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1644                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1645                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1646             </actions>
1647         </permacrud>
1648     </class>
1649
1650         <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">
1651                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1652                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1653                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1654                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1655                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1656                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1657                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1658                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1659                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1660                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1661                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1662                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1663                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1664                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1665                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1666                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1667                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1668             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1669                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1670                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1671                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1672                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1673                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1674                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1675                 </fields>
1676                 <links>
1677                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1678                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1679                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1680                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1681                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1682                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1683                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1684                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1685                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1686                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1687                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1688                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1689                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1690             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1691                 </links>
1692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1693             <actions>
1694                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1695                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1696                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1697                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1698             </actions>
1699         </permacrud>
1700         </class>
1701
1702         <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">
1703                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1704                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1705                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1706                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1707                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1708                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1709                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1710                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1711                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1712                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1713                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1714                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1715                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1716                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1717                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1718                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1719             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1720                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1721                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1722             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1723                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1724                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1725                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1726                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1727             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1728             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1729             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1730                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1731                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1732                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1733                 </fields>
1734                 <links>
1735                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1736                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1737                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1738                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1739                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1740                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1741                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1742                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1743                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1744                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1745                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1746                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1747                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1748                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1749             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1750                 </links>
1751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1752             <actions>
1753                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1754                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1755                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1756                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1757             </actions>
1758         </permacrud>
1759         </class>
1760
1761     <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">
1762         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1763             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1764             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1765             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1766         </fields>
1767         <links/>
1768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1769             <actions>
1770                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1771                 <retrieve/>
1772                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1773                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1774             </actions>
1775         </permacrud>
1776     </class>
1777
1778     <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">
1779         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1780             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1781             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1782             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1783             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1784             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1785             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1786             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1787         </fields>
1788         <links>
1789             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1790         </links>
1791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1792             <actions>
1793                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1794                 <retrieve/>
1795                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1796                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1797             </actions>
1798         </permacrud>
1799     </class>
1800
1801     <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">
1802         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1803             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1804             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1805             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1806             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1807             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1808         </fields>
1809         <links>
1810             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1811             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1812         </links>
1813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1814             <actions>
1815                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1816                     <context link="matchpoint" field="org_unit"/>
1817                 </create>
1818                 <retrieve/>
1819                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1820                     <context link="matchpoint" field="org_unit"/>
1821                 </update>
1822                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1823                     <context link="matchpoint" field="org_unit"/>
1824                 </delete>
1825             </actions>
1826         </permacrud>
1827     </class>
1828
1829     <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">
1830         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1831             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1832             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1833             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1834         </fields>
1835         <links>
1836             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1837             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1838         </links>
1839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1840             <actions>
1841                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1842                     <context link="limit_set" field="owning_lib"/>
1843                 </create>
1844                 <retrieve/>
1845                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1846                     <context link="limit_set" field="owning_lib"/>
1847                 </update>
1848                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1849                     <context link="limit_set" field="owning_lib"/>
1850                 </delete>
1851             </actions>
1852         </permacrud>
1853     </class>
1854     <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">
1855         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1856             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1857             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1858             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1859         </fields>
1860         <links>
1861             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1862             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1863         </links>
1864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1865             <actions>
1866                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1867                     <context link="limit_set" field="owning_lib"/>
1868                 </create>
1869                 <retrieve/>
1870                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1871                     <context link="limit_set" field="owning_lib"/>
1872                 </update>
1873                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1874                     <context link="limit_set" field="owning_lib"/>
1875                 </delete>
1876             </actions>
1877         </permacrud>
1878     </class>
1879
1880     <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">
1881         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1882             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1883             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1884             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1885             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1886         </fields>
1887         <links>
1888             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1889             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1890         </links>
1891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1892             <actions>
1893                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1894                     <context link="limit_set" field="owning_lib"/>
1895                 </create>
1896                 <retrieve/>
1897                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1898                     <context link="limit_set" field="owning_lib"/>
1899                 </update>
1900                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1901                     <context link="limit_set" field="owning_lib"/>
1902                 </delete>
1903             </actions>
1904         </permacrud>
1905     </class>
1906
1907         <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">
1908                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1909                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1910                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1911                 </fields>
1912                 <links/>
1913         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1914             <actions>
1915                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1916                 <retrieve/>
1917                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1918                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1919             </actions>
1920         </permacrud>
1921         </class>
1922
1923         <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">
1924                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1925                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1926                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1927                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1928                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1929                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1930                 </fields>
1931                 <links>
1932                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1933                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1934                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1935                 </links>
1936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1937             <actions>
1938                 <create permission="ADMIN_SURVEY">
1939                     <context link="survey" field="owner"/>
1940                 </create>
1941                 <retrieve/>
1942                 <update permission="ADMIN_SURVEY">
1943                     <context link="survey" field="owner"/>
1944                 </update>
1945                 <delete permission="ADMIN_SURVEY">
1946                     <context link="survey" field="owner"/>
1947                 </delete>
1948             </actions>
1949         </permacrud>
1950         </class>
1951         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1952                 <fields oils_persist:primary="id" oils_persist:sequence="">
1953                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1954                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1955                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1956                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1957                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1958                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1959                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1960                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1961                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1962                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1963                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1964                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1965                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1966                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1967                 </fields>
1968                 <links>
1969                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1970                 </links>
1971         </class>
1972         <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">
1973                 <fields oils_persist:primary="id" oils_persist:sequence="">
1974                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1975                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1976                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1977                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1978                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1979                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1980                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1981                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1982                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1983                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1984                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1985                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1986                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1987                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1988                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1989                 </fields>
1990                 <links>
1991                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1992                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1993                 </links>
1994         </class>
1995         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1997                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1998                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1999                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2000                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2001                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2002                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2003                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2004                 </fields>
2005                 <links>
2006                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2007                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2008                 </links>
2009         </class>
2010         <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">
2011                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2012                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2013                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2014                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2015                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2016                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2017                 </fields>
2018                 <links>
2019                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2020                 </links>
2021         </class>
2022         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2023                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2024                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2025                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2026                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2027                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2028                 </fields>
2029                 <links>
2030                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2031                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2032                 </links>
2033         </class>
2034         <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">
2035                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2036                         <field name="field" reporter:datatype="link"/>
2037                         <field name="id" reporter:datatype="id" />
2038                         <field name="source" reporter:datatype="link"/>
2039                         <field name="value" reporter:datatype="text"/>
2040                 </fields>
2041                 <links>
2042                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2043                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2044                 </links>
2045         </class>
2046         <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">
2047                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2048                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2049                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2050                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2051                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2052                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2053                 </fields>
2054                 <links>
2055                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2056                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2057                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2058                 </links>
2059         </class>
2060         <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">
2061                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2062                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2063                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2064                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2065                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2066                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2067                 </fields>
2068                 <links>
2069                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2070                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2071                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2072                 </links>
2073         </class>
2074         <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">
2075                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2076                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2077                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2078                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2079                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2080                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2081                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2082                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2083                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2084                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2085                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2086                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2087                 </fields>
2088                 <links>
2089                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2090                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2091                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2092                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2093                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2094                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2095                 </links>
2096         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2097             <actions>
2098                 <create permission="TRANSIT_COPY" context_field="owner">
2099                     <context link="target_copy" field="circ_lib"/>
2100                 </create>
2101                 <retrieve/>
2102                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2103                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2104             </actions>
2105         </permacrud>
2106         </class>
2107         <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">
2108                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2109                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2110                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2111                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2112                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2113                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2114                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2115                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2116                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2117                 </fields>
2118                 <links>
2119                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2120                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2121                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2122                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2123                 </links>
2124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2125             <actions>
2126                 <create permission="ADMIN_SURVEY">
2127                     <context link="survey" field="owner"/>
2128                 </create>
2129                 <retrieve/>
2130                 <update permission="ADMIN_SURVEY">
2131                     <context link="survey" field="owner"/>
2132                 </update>
2133                 <delete permission="ADMIN_SURVEY">
2134                     <context link="survey" field="owner"/>
2135                 </delete>
2136             </actions>
2137         </permacrud>
2138         </class>
2139         <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">
2140                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2141                         <field name="bucket" />
2142                         <field name="id" reporter:datatype="id" />
2143                         <field name="target_copy" reporter:datatype="link"/>
2144                         <field name="create_time" reporter:datatype="timestamp" />
2145                         <field name="pos" reporter:datatype="int" />
2146                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2147                 </fields>
2148                 <links>
2149                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2150                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2151             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2152                 </links>
2153         </class>
2154         <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">
2155                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2156                         <field name="id" reporter:datatype="id" />
2157                         <field name="item" reporter:datatype="link"/>
2158                         <field name="note" reporter:datatype="text" />
2159                 </fields>
2160                 <links>
2161                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2162                 </links>
2163         </class>
2164
2165         <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">
2166                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2167                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2168                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2169                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2170                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2171                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2172                 </fields>
2173                 <links>
2174                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2175                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2176                 </links>
2177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2178                         <actions>
2179                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2180                                 <retrieve/>
2181                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2182                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2183                         </actions>
2184                 </permacrud>
2185         </class>
2186
2187         <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">
2188                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2189                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2190                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2191                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2192                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2193                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2194                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2195                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2196                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2197                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2198                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2199                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2200                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2201                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2202                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2203                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2204                 </fields>
2205                 <links>
2206                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2207                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2208                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2209                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2210                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2211                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2212                 </links>
2213                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2214                         <actions>
2215                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2216                                 <retrieve/>
2217                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2218                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2219                         </actions>
2220                 </permacrud>
2221         </class>
2222
2223         <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">
2224                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2225                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2226                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2227                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2228                 </fields>
2229                 <links>
2230                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2231                 </links>
2232                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2233                         <actions>
2234                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2235                                 <retrieve/>
2236                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2237                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2238                         </actions>
2239                 </permacrud>
2240         </class>
2241
2242         <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">
2243                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2244                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2245                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2246                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2247                 </fields>
2248                 <links>
2249                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2250                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2251                 </links>
2252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2253                         <actions>
2254                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2255                                 <retrieve/>
2256                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2257                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2258                         </actions>
2259                 </permacrud>
2260         </class>
2261
2262         <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">
2263                 <fields oils_persist:primary="code">
2264                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2265                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2266                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2267                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2268                 </fields>
2269                 <links>
2270                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2271                 </links>
2272                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2273                         <actions>
2274                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2275                                 <retrieve/>
2276                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2277                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2278                         </actions>
2279                 </permacrud>
2280         </class>
2281
2282         <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">
2283                 <fields oils_persist:primary="code">
2284                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2285                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2286                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2287                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2288                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2289                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2290                 </fields>
2291                 <links>
2292                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2293                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2294                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2295                 </links>
2296                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297                         <actions>
2298                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2299                                 <retrieve/>
2300                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2301                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2302                         </actions>
2303                 </permacrud>
2304         </class>
2305
2306     <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">
2307         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2308             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2309             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2310             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2311         </fields>
2312         <links>
2313             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2314             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2315         </links>
2316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2317             <actions>
2318                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2319                 <retrieve/>
2320                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2321                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2322             </actions>
2323         </permacrud>
2324     </class>
2325
2326         <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">
2327                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2328                         <field name="active" reporter:datatype="bool"/>
2329                         <field name="create_date" reporter:datatype="timestamp"/>
2330                         <field name="creator" />
2331                         <field name="deleted" reporter:datatype="bool"/>
2332                         <field name="edit_date" reporter:datatype="timestamp"/>
2333                         <field name="editor" />
2334                         <field name="id" reporter:datatype="id" />
2335                         <field name="last_xact_id" />
2336                         <field name="marc" />
2337                         <field name="source" />
2338                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2339                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2340                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2341                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2342                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2343                 </fields>
2344                 <links>
2345                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2346                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2347                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2348                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2349                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2350                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2351                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2352                 </links>
2353                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2354                         <actions>
2355                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2356                                 <retrieve/>
2357                                 <update permission="UPDATE_MARC" global_required="true"/>
2358                                 <delete permission="UPDATE_MARC" global_required="true"/>
2359                         </actions>
2360                 </permacrud>
2361         </class>
2362         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2363                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2364                         <field name="char_encoding" />
2365                         <field name="id" />
2366                         <field name="record" />
2367                         <field name="record_status" />
2368                         <field name="thesaurus" />
2369                 </fields>
2370                 <links>
2371                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2372                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2373                 </links>
2374         </class>
2375         <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">
2376                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2377                         <field name="id" reporter:datatype="id" />
2378                         <field name="bib" reporter:datatype="link" />
2379                         <field name="authority" reporter:datatype="link" />
2380                 </fields>
2381                 <links>
2382                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2383                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2384                 </links>
2385         </class>
2386         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2387                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2388                         <field name="id" reporter:datatype="id" />
2389                         <field name="record" reporter:datatype="link" />
2390                         <field name="atag" reporter:datatype="link" />
2391                         <field name="value" reporter:datatype="text" />
2392                 </fields>
2393                 <links>
2394                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2395                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2396                 </links>
2397         </class>
2398         <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">
2399                 <fields oils_persist:primary="code" oils_persist:sequence="">
2400                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2401                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2402                 </fields>
2403                 <links/>
2404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405             <actions>
2406                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2407                 <retrieve/>
2408                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2409                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2410             </actions>
2411         </permacrud>
2412         </class>
2413         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2414                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2415                         <field name="accepting_usr" />
2416                         <field name="amount" reporter:datatype="money" />
2417                         <field name="amount_collected" reporter:datatype="money" />
2418                         <field name="approval_code" reporter:datatype="text"/>
2419                         <field name="cash_drawer" reporter:datatype="link"/>
2420                         <field name="cc_first_name" reporter:datatype="text"/>
2421                         <field name="cc_last_name" reporter:datatype="text"/>
2422                         <field name="cc_number" reporter:datatype="text"/>
2423                         <field name="cc_order_number" reporter:datatype="text"/>
2424                         <field name="cc_type" reporter:datatype="text"/>
2425                         <field name="cc_processor" reporter:datatype="text"/>
2426                         <field name="expire_month" reporter:datatype="int" />
2427                         <field name="expire_year" reporter:datatype="int" />
2428                         <field name="id" reporter:datatype="id" />
2429                         <field name="note" reporter:datatype="text"/>
2430                         <field name="payment_ts" reporter:datatype="timestamp"/>
2431                         <field name="xact" reporter:datatype="link"/>
2432                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2433                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2434                 </fields>
2435                 <links>
2436                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2437                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2438                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2439                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2440                 </links>
2441         </class>
2442         <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">
2443                 <fields oils_persist:primary="name">
2444                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2445                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2446                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2447                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2448                 </fields>
2449                 <links/>
2450         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2451             <actions>
2452                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2453                 <retrieve/>
2454                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2455                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2456             </actions>
2457         </permacrud>
2458         </class>
2459
2460         <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">
2461                 <fields oils_persist:primary="alias">
2462                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2463                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2464                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2465                 </fields>
2466                 <links>
2467                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2468                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2469                 </links>
2470         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2471             <actions>
2472                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2473                 <retrieve/>
2474                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2475                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2476             </actions>
2477         </permacrud>
2478         </class>
2479
2480         <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">
2481                 <fields oils_persist:primary="name">
2482                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2483                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2484                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2485                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2486                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2487                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2488                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2489                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2490                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2491                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2492                 </fields>
2493                 <links>
2494                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2495                 </links>
2496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2497             <actions>
2498                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2499                 <retrieve/>
2500                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2501                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2502             </actions>
2503         </permacrud>
2504         </class>
2505
2506         <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">
2507                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2508                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2509                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2510                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2511                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2512                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2513                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2514                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2515                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2516                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2517                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2518                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2519                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2520                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2521                 </fields>
2522                 <links>
2523                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2524                 </links>
2525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2526             <actions>
2527                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2528                 <retrieve/>
2529                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2530                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2531             </actions>
2532         </permacrud>
2533         </class>
2534         <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">
2535                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2536                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2537                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2538                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2539                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2540                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2541                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2542                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2543                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2544                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2545                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2546                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2547                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2548                 </fields>
2549                 <links>
2550                 </links>
2551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2552                         <actions>
2553                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2554                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2555                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2556                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2557                         </actions>
2558                 </permacrud>
2559         </class>
2560         <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">
2561                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2562                         <field name="id" reporter:datatype="id" />
2563                         <field name="name" reporter:datatype="text"/>
2564                         <field name="xpath" reporter:datatype="text"/>
2565                         <field name="format" reporter:datatype="link"/>
2566                         <field name="first_word" reporter:datatype="bool" />
2567                 </fields>
2568                 <links/>
2569         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2570             <actions>
2571                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2572                 <retrieve/>
2573                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2574                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2575             </actions>
2576         </permacrud>
2577         </class>
2578         <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">
2579                 <fields oils_persist:primary="code" oils_persist:sequence="">
2580                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2581                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2582                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2583                 </fields>
2584                 <links/>
2585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586             <actions>
2587                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2588                 <retrieve/>
2589                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2590                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2591             </actions>
2592         </permacrud>
2593         </class>
2594         <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">
2595                 <fields oils_persist:primary="code" oils_persist:sequence="">
2596                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2597                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2598                 </fields>
2599                 <links/>
2600         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2601             <actions>
2602                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2603                 <retrieve/>
2604                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2605                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2606             </actions>
2607         </permacrud>
2608         </class>
2609     <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">
2610         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2611             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2612             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2613             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2614             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2615         </fields>
2616         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2617             <actions>
2618                 <retrieve/>
2619             </actions>
2620         </permacrud>
2621     </class>
2622         <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">
2623                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2624                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2625                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2626                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2627                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2628                 </fields>
2629                 <links>
2630                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2631                 </links>
2632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2633             <actions>
2634                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2635                 <retrieve/>
2636                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2637                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2638             </actions>
2639         </permacrud>
2640         </class>
2641         <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">
2642                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2643                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2644                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2645                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2646                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2647                 </fields>
2648                 <links>
2649                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2650                 </links>
2651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2652             <actions>
2653                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2654                 <retrieve/>
2655                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2656                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2657             </actions>
2658         </permacrud>
2659         </class>
2660         <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">
2661                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2662                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2663                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2664                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2665                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2666                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2667                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2668                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2669                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2670                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2671                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2672                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2673                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2674                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2675                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2676                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2677                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2678                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2679                 </fields>
2680                 <links>
2681                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2682                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2683                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2684                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2685                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2686                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2687                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2688                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2689                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2690                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2691                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2692                 </links>
2693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2694             <actions>
2695                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2696                 <retrieve/>
2697                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2698                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2699             </actions>
2700         </permacrud>
2701         </class>
2702         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2703                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2704                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2705                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2706                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2707                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2708                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2709                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2710                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2711                 </fields>
2712                 <links>
2713                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2714                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2715         </links>
2716         </class>
2717         <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">
2718                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2719                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2720                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2721                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2722                 </fields>
2723                 <links>
2724                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2725                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2726                 </links>
2727         </class>
2728         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2729                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2730                         <field name="id" reporter:datatype="id" />
2731                         <field name="value" oils_persist:i18n="true" />
2732                 </fields>
2733                 <links/>
2734         </class>
2735         <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">
2736                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2737                         <field name="balance_owed" reporter:datatype="money" />
2738                         <field name="total_owed" reporter:datatype="money" />
2739                         <field name="total_paid" reporter:datatype="money" />
2740                         <field name="usr" reporter:datatype="link"/>
2741                 </fields>
2742                 <links>
2743                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2744         </links>
2745         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2746             <actions>
2747                 <retrieve permission="VIEW_USER">
2748                     <context link="usr" field="home_ou"/>
2749                 </retrieve>
2750             </actions>
2751         </permacrud>
2752         </class>
2753         <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">
2754                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2755                         <field name="collector" />
2756                         <field name="enter_time" reporter:datatype="timestamp"/>
2757                         <field name="id" reporter:datatype="id" />
2758                         <field name="location" reporter:datatype="link"/>
2759                         <field name="usr" reporter:datatype="link"/>
2760                 </fields>
2761                 <links>
2762                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2763                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2764                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2765                 </links>
2766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2767             <actions>
2768                 <create permission="money.collections_tracker.create" context_field="location"/>
2769                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2770                 <delete permission="money.collections_tracker.create" context_field="location"/>
2771             </actions>
2772         </permacrud>
2773         </class>
2774         <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">
2775                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2776                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2777                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2778                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2779                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2780                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2781                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2782                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2783                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2784                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2785                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2786                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2787                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2788                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2789                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2790                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2791                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2792                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2793                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2794                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2795                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2796                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2797                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2798                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2799                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2800                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2801                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2802                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2803                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2804                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2805                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2806                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2807                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2808                 </fields>
2809                 <links>
2810                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2811                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2812                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2813                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2814                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2815                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2816                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2817                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2818                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2819                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2820                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2821                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2822                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2823                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2824                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2825                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2826                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2827                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2828                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2829                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2830                 </links>
2831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2832             <actions>
2833                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2834                 <retrieve/>
2835                 <update permission="UPDATE_MARC" global_required="true"/>
2836             </actions>
2837         </permacrud>
2838         </class>
2839         <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">
2840                 <fields oils_persist:primary="id">
2841                         <field name="dow_0_close" />
2842                         <field name="dow_0_open" />
2843                         <field name="dow_1_close" />
2844                         <field name="dow_1_open" />
2845                         <field name="dow_2_close" />
2846                         <field name="dow_2_open" />
2847                         <field name="dow_3_close" />
2848                         <field name="dow_3_open" />
2849                         <field name="dow_4_close" />
2850                         <field name="dow_4_open" />
2851                         <field name="dow_5_close" />
2852                         <field name="dow_5_open" />
2853                         <field name="dow_6_close" />
2854                         <field name="dow_6_open" />
2855                         <field name="id" reporter:datatype="id" />
2856                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2857                 </fields>
2858                 <links>
2859                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2860                 </links>
2861         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2862             <actions>
2863                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2864                 <retrieve/>
2865                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2866                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2867             </actions>
2868         </permacrud>
2869         </class>
2870         <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">
2871                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2872                         <field name="id" reporter:datatype="id" />
2873                         <field name="record" reporter:datatype="link"/>
2874                         <field name="label" reporter:datatype="text"/>
2875                         <field name="label_sortkey" reporter:datatype="text"/>
2876                 </fields>
2877                 <links>
2878                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2879                 </links>
2880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2881             <actions>
2882                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2883                 <retrieve/>
2884                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2885                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2886             </actions>
2887         </permacrud>
2888         </class>
2889         <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">
2890                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2891                         <field name="id" reporter:datatype="id" />
2892                         <field name="target_copy" reporter:datatype="link" />
2893                         <field name="part" reporter:datatype="link"/>
2894                 </fields>
2895                 <links>
2896                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2897                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2898                 </links>
2899         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2900             <actions>
2901                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2902                 <retrieve/>
2903                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2904                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2905             </actions>
2906         </permacrud>
2907         </class>
2908         <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">
2909                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2910                         <field name="close_end" reporter:datatype="timestamp" />
2911                         <field name="close_start" reporter:datatype="timestamp" />
2912                         <field name="id" reporter:datatype="id" />
2913                         <field name="org_unit" reporter:datatype="org_unit"/>
2914                         <field name="reason" reporter:datatype="text"/>
2915                 </fields>
2916                 <links>
2917                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2918                 </links>
2919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2920             <actions>
2921                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2922                 <retrieve/>
2923                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2924                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2925             </actions>
2926         </permacrud>
2927         </class>
2928         <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">
2929                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2930                         <field name="extended" reporter:datatype="interval"/>
2931                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2932                         <field name="max_renewals" reporter:datatype="int" />
2933                         <field name="name" reporter:datatype="text"/>
2934                         <field name="normal" reporter:datatype="interval"/>
2935                         <field name="shrt" reporter:datatype="interval"/>
2936                 </fields>
2937                 <links>
2938                 </links>
2939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2940             <actions>
2941                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2942                 <retrieve/>
2943                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2944                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2945             </actions>
2946         </permacrud>
2947         </class>
2948
2949         <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">
2950                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2951                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2952                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2953             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2954                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2955             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2956                 </fields>
2957                 <links>
2958             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2959                 </links>
2960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2961             <actions>
2962                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2963                 <retrieve/>
2964                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2965                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2966             </actions>
2967                 </permacrud>
2968         </class>
2969
2970         <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">
2971                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2972                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2973                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2974                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2975             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2976                 </fields>
2977                 <links>
2978                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2979                 </links>
2980                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2981             <actions>
2982                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2983                 <retrieve/>
2984                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2985                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2986             </actions>
2987                 </permacrud>
2988         </class>
2989
2990         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2991                 <fields oils_persist:primary="id" oils_persist:sequence="">
2992                         <field name="balance_owed" reporter:datatype="money"/>
2993                         <field name="id" reporter:datatype="id" />
2994                         <field name="last_billing_note" reporter:datatype="text"/>
2995                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2996                         <field name="last_billing_type" reporter:datatype="text"/>
2997                         <field name="last_payment_note" reporter:datatype="text"/>
2998                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2999                         <field name="last_payment_type" reporter:datatype="text"/>
3000                         <field name="total_owed" reporter:datatype="money"/>
3001                         <field name="total_paid" reporter:datatype="money"/>
3002                         <field name="usr" reporter:datatype="link"/>
3003                         <field name="xact_finish" reporter:datatype="timestamp" />
3004                         <field name="xact_start" reporter:datatype="timestamp" />
3005                         <field name="xact_type" reporter:datatype="text"/>
3006                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3007                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3008                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3009                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3010                         <field name="billing_location" reporter:datatype="link"/>
3011                 </fields>
3012                 <links>
3013                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3014                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3015                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3016                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3017                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3018                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3019                 </links>
3020         </class>
3021         <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">
3022                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3023                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3024                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3025                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3026                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3027                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3028                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3029                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3030                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3031                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3032                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3033                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3034                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3035                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3036                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3037                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3038                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3039                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3040                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3041                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3042                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3043                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3044                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3045                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3046                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3047                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3048                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3049                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3050                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3051                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3052                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3053                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3054                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3055                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3056                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3057                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3058                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3059                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3060                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3061                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3062                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3063                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3064                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3065                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3066                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3067                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3068                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3069                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3070                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3071                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3072                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3073                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3074                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3075                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3076                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3077                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3078                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3079                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3080                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3081                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3082                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3083                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3084                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3085                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3086                 </fields>
3087                 <links>
3088                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3089                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3090                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3091                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3092                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3093                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3094                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3095                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3096                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3097                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3098                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3099                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3100                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3101                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3102                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3103                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3104                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3105                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3106                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3107                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3108                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3109                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3110                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3111                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3112                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3113                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3114                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3115                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3116                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3117                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3118                 </links>
3119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3120                         <actions>
3121                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3122                         </actions>
3123                 </permacrud>
3124         </class>
3125         <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">
3126                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3127                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3128                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3129                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3130                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3131                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3132                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3133                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3134                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3135         </fields>
3136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3137                         <actions>
3138                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3139                                 <retrieve/>
3140                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3141                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3142                         </actions>
3143                 </permacrud>
3144         </class>
3145         <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">
3146                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3147                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3148                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3149                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3150                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3151         </fields>
3152         <links>
3153                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3154                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3155                 </links>
3156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3157                         <actions>
3158                                 <retrieve permission="RUN_REPORTS">
3159                                         <context link="usr" field="home_ou" />
3160                                 </retrieve>
3161                         </actions>
3162                 </permacrud>
3163         </class>
3164         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3165                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3166                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3167                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3168                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3169                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3170                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3171                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3172         </fields>
3173         <links>
3174                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3175                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3176                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3177                 </links>
3178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3179                         <actions>
3180                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3181                                         <context link="usr" field="home_ou" />
3182                                         <context link="ws" field="owning_lib" />
3183                                 </retrieve>
3184                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3185                                         <context link="usr" field="home_ou" />
3186                                         <context link="ws" field="owning_lib" />
3187                                 </create>
3188                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3189                                         <context link="usr" field="home_ou" />
3190                                         <context link="ws" field="owning_lib" />
3191                                 </update>
3192                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3193                                         <context link="usr" field="home_ou" />
3194                                         <context link="ws" field="owning_lib" />
3195                                 </delete>
3196                         </actions>
3197                 </permacrud>
3198         </class>
3199         <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">
3200                 <fields oils_persist:primary="name">
3201                         <field name="name" reporter:datatype="text"/>
3202                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3203                 </fields>
3204                 <links/>
3205                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3206                         <actions>
3207                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3208                                 <retrieve/>
3209                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3210                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3211                         </actions>
3212                 </permacrud>
3213         </class>
3214         <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">
3215                 <fields oils_persist:primary="name">
3216                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3217                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3218                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3219                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3220                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3221                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3222                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3223                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3224                 </fields>
3225                 <links>
3226                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3227                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3228                 </links>
3229                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3230                         <actions>
3231                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3232                                 <retrieve/>
3233                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3234                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3235                         </actions>
3236                 </permacrud>
3237         </class>
3238         <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">
3239                 <fields oils_persist:primary="name">
3240                         <field name="name" reporter:datatype="text"/>
3241                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3242                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3243                         <field name="datatype" reporter:datatype="text"/>
3244                         <field name="view_perm" reporter:datatype="link"/>
3245                         <field name="update_perm" reporter:datatype="link"/>
3246                         <field name="fm_class" reporter:datatype="text"/>
3247                         <field name="grp" reporter:datatype="link"/>
3248                 </fields>
3249                 <links>
3250                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3251                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3252                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3253                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3254                 </links>
3255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3256                         <actions>
3257                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3258                                 <retrieve/>
3259                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3260                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3261                         </actions>
3262                 </permacrud>
3263         </class>
3264         <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">
3265                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3266                         <field name="id" />
3267                         <field name="name"  reporter:datatype="text"/>
3268                         <field name="org_unit" reporter:datatype="org_unit"/>
3269                         <field name="value"  reporter:datatype="text"/>
3270                 </fields>
3271                 <links>
3272                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3273                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3274                 </links>
3275         </class>
3276         <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">
3277                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3278                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3279                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3280                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3281                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3282                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3283                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3284                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3285                 </fields>
3286                 <links>
3287                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3288                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3289                 </links>
3290         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3291             <actions>
3292                 <create permission="CREATE_COPY_NOTE">
3293                     <context link="owning_copy" field="circ_lib"/>
3294                 </create>
3295                 <retrieve permission="VIEW_COPY_NOTES">
3296                     <context link="owning_copy" field="circ_lib"/>
3297                 </retrieve>
3298                 <update permission="UPDATE_COPY_NOTE">
3299                     <context link="owning_copy" field="circ_lib"/>
3300                 </update>
3301                 <delete permission="DELETE_COPY_NOTE">
3302                     <context link="owning_copy" field="circ_lib"/>
3303                 </delete>
3304             </actions>
3305         </permacrud>
3306         </class>
3307         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3308                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3309                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3310                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3311                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3312                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3313                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3314                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3315                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3316                 </fields>
3317                 <links>
3318                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3319                 </links>
3320         </class>
3321         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3322                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3323                         <field name="fingerprint"  reporter:datatype="text"/>
3324                         <field name="id" reporter:datatype="id" />
3325                         <field name="master_record" reporter:datatype="link"/>
3326                         <field name="mods"  reporter:datatype="text"/>
3327                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3328                 </fields>
3329                 <links>
3330                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3331                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3332                 </links>
3333         </class>
3334         <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">
3335                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3336                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3337                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3338                 </fields>
3339                 <links/>
3340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3341             <actions>
3342                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3343                 <retrieve/>
3344                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3345                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3346             </actions>
3347         </permacrud>
3348         </class>
3349         <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">
3350                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3351                         <field name="code"  reporter:datatype="text"/>
3352                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3353                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3354                 </fields>
3355                 <links/>
3356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3357             <actions>
3358                 <create permission="CREATE_PERM" global_required="true"/>
3359                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3360                 <update permission="UPDATE_PERM" global_required="true"/>
3361                 <delete permission="DELETE_PERM" global_required="true"/>
3362             </actions>
3363         </permacrud>
3364         </class>
3365         <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">
3366                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3367                         <field name="id" reporter:datatype="id" />
3368                         <field name="metarecord" reporter:datatype="link"/>
3369                         <field name="source" reporter:datatype="link"/>
3370                 </fields>
3371                 <links>
3372                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3373                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3374                 </links>
3375         </class>
3376         <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">
3377                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3378                         <field name="id" reporter:datatype="id" />
3379                         <field name="field" reporter:datatype="link"/>
3380                         <field name="source" reporter:datatype="link"/>
3381                         <field name="value"  reporter:datatype="text"/>
3382                 </fields>
3383                 <links>
3384                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3385                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3386                 </links>
3387         </class>
3388         <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">
3389                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3390                         <field name="id" reporter:datatype="id" />
3391                         <field name="value" reporter:datatype="text"/>
3392                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3393                 </fields>
3394                 <links>
3395                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3396                 </links>
3397         </class>
3398         <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">
3399                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3400                         <field name="id" reporter:datatype="id" />
3401                         <field name="entry" reporter:datatype="link"/>
3402                         <field name="def" reporter:datatype="link"/>
3403                         <field name="source" reporter:datatype="link"/>
3404                 </fields>
3405                 <links>
3406                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3407                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3408                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3409                 </links>
3410         </class>
3411         <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">
3412                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3413                         <field name="id" reporter:datatype="id" />
3414                         <field name="entry" reporter:datatype="link"/>
3415                         <field name="simple_heading" reporter:datatype="link"/>
3416                 </fields>
3417                 <links>
3418                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3419                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3420                 </links>
3421         </class>
3422         <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">
3423                 <oils_persist:source_definition>
3424                         SELECT * FROM metabib.author_field_entry
3425                                                 UNION ALL
3426                         SELECT * FROM metabib.keyword_field_entry
3427                                                 UNION ALL
3428                         SELECT * FROM metabib.identifier_field_entry
3429                                                 UNION ALL
3430                         SELECT * FROM metabib.title_field_entry
3431                                                 UNION ALL
3432                         SELECT * FROM metabib.subject_field_entry
3433                                                 UNION ALL
3434                         SELECT * FROM metabib.series_field_entry
3435                 </oils_persist:source_definition>
3436                 <fields>
3437                         <field name="field" reporter:datatype="link"/>
3438                         <field name="id" reporter:datatype="id" />
3439                         <field name="source" reporter:datatype="link"/>
3440                         <field name="value"  reporter:datatype="text"/>
3441                 </fields>
3442                 <links>
3443                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3444                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3445                 </links>
3446         </class>
3447         <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">
3448                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3449                         <field name="field" reporter:datatype="link"/>
3450                         <field name="id" reporter:datatype="id" />
3451                         <field name="source" reporter:datatype="link"/>
3452                         <field name="value"  reporter:datatype="text"/>
3453                 </fields>
3454                 <links>
3455                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3456                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3457                 </links>
3458         </class>
3459         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3460                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3461                         <field name="accepting_usr" reporter:datatype="link"/>
3462                         <field name="amount" reporter:datatype="money" />
3463                         <field name="amount_collected" reporter:datatype="money" />
3464                         <field name="cash_drawer" reporter:datatype="link"/>
3465                         <field name="id" reporter:datatype="id" />
3466                         <field name="note"  reporter:datatype="text"/>
3467                         <field name="payment_ts" reporter:datatype="timestamp"/>
3468                         <field name="xact" reporter:datatype="link"/>
3469                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3470                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3471                 </fields>
3472                 <links>
3473                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3474                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3475                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3476                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3477                 </links>
3478         </class>
3479         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3480                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3481                         <field name="accepting_usr" reporter:datatype="link"/>
3482                         <field name="amount" reporter:datatype="money" />
3483                         <field name="amount_collected" reporter:datatype="money" />
3484                         <field name="id" reporter:datatype="id" />
3485                         <field name="note"  reporter:datatype="text"/>
3486                         <field name="payment_ts" reporter:datatype="timestamp"/>
3487                         <field name="xact" reporter:datatype="link"/>
3488                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3489                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3490                 </fields>
3491                 <links>
3492                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3493                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3494                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3495                 </links>
3496         </class>
3497         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3498                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3499                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3500                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3501                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3502                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3503                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3504                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3505                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3506                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3507                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3508                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3509                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3510                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3511                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3512                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3513                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3514                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3515                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3516                 </fields>
3517                 <links>
3518                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3519                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3520                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3521                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3522                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3523                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3524                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3525                 </links>
3526         </class>
3527
3528         <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">
3529                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3530                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3531                         <field name="name"  reporter:datatype="text"/>
3532                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3533                         <field name="block_list" reporter:datatype="text"/>
3534                         <field name="staff_alert" reporter:datatype="bool"/>
3535                         <field name="org_depth" reporter:datatype="int"/>
3536                 </fields>
3537                 <links/>
3538         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3539             <actions>
3540                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3541                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3542                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3543                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3544             </actions>
3545         </permacrud>
3546         </class>
3547         <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">
3548                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3549                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3550                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3551                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3552                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3553                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3554                 </fields>
3555                 <links>
3556                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3557                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3558                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3559         </links>
3560         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3561             <actions>
3562                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3563                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3564                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3565                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3566             </actions>
3567         </permacrud>
3568         </class>
3569         <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">
3570                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3571                         <field name="holdable" reporter:datatype="bool"/>
3572                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3573                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3574                         <field name="opac_visible" reporter:datatype="bool"/>
3575             <field name="copy_active" reporter:datatype="bool"/>
3576             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3577                 </fields>
3578                 <links/>
3579         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3580             <actions>
3581                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3582                 <retrieve/>
3583                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3584                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3585             </actions>
3586         </permacrud>
3587         </class>
3588         <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">
3589                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3590                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3591                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3592                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3593                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3594                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3595                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3596                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3597                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3598                 </fields>
3599                 <links>
3600                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3601                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3602                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3603                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3604                 </links>
3605                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3606                         <actions>
3607                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3608                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3609                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3610                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3611                         </actions>
3612                 </permacrud>
3613         </class>
3614         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3615                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3616                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3617                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3618                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3619                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3620                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3621                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3622                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3623                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3624                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3625                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3626                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3627                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3628                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3629                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3630                 </fields>
3631                 <links>
3632                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3633                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3634                 </links>
3635         </class>
3636         <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">
3637                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3638                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3639                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3640                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3641                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3642                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3643                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3644                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3645                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3646                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3647                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3648                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3649                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3650                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3651                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3652                 </fields>
3653                 <links>
3654                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3655                 </links>
3656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3657                         <actions>
3658                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3659                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3660                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3661                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3662                         </actions>
3663                 </permacrud>
3664         </class>
3665
3666
3667         <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">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3669                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3670                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3671                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3672                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3673                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3674                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3675                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3676                 </fields>
3677                 <links>
3678                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3679                 </links>
3680         </class>
3681
3682         <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">
3683                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3684                         <field name="call_number" />
3685                         <field name="create_date" reporter:datatype="timestamp"/>
3686                         <field name="creator" reporter:datatype="link"/>
3687                         <field name="id" reporter:datatype="id" />
3688                         <field name="pub" reporter:datatype="bool"/>
3689                         <field name="title"  reporter:datatype="text"/>
3690                         <field name="value"  reporter:datatype="text"/>
3691                 </fields>
3692                 <links>
3693                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3694                 </links>
3695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3696             <actions>
3697                 <create permission="CREATE_VOLUME_NOTE">
3698                     <context link="call_number" field="owning_lib"/>
3699                 </create>
3700                 <retrieve permission="VIEW_VOLUME_NOTES">
3701                     <context link="call_number" field="owning_lib"/>
3702                 </retrieve>
3703                 <update permission="UPDATE_VOLUME_NOTE">
3704                     <context link="call_number" field="owning_lib"/>
3705                 </update>
3706                 <delete permission="DELETE_VOLUME_NOTE">
3707                     <context link="call_number" field="owning_lib"/>
3708                 </delete>
3709             </actions>
3710         </permacrud>
3711         </class>
3712         <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">
3713                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3714                         <field name="create_date" reporter:datatype="timestamp"/>
3715                         <field name="creator" reporter:datatype="link"/>
3716                         <field name="edit_date" reporter:datatype="timestamp"/>
3717                         <field name="editor" reporter:datatype="link"/>
3718                         <field name="id" reporter:datatype="id" />
3719                         <field name="record" reporter:datatype="link"/>
3720                         <field name="value" reporter:datatype="text"/>
3721                 </fields>
3722                 <links>
3723                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3724                 </links>
3725         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3726             <actions>
3727                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3728                 <retrieve/>
3729                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3730                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3731             </actions>
3732         </permacrud>
3733         </class>
3734         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3735         <oils_persist:source_definition>
3736 SELECT  usr,
3737         SUM(
3738             CASE
3739                 WHEN (
3740                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3741                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3742                 ) THEN 1
3743                 ELSE 0
3744             END
3745         ) AS out,
3746
3747         SUM(
3748             CASE
3749                 WHEN (
3750                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3751                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3752                 ) THEN 1
3753                 ELSE 0
3754             END
3755         ) AS overdue,
3756
3757         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3758         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3759         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3760   FROM  action.circulation
3761   WHERE checkin_time IS NULL
3762   GROUP BY 1
3763         </oils_persist:source_definition>
3764         <fields oils_persist:primary="usr">
3765             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3766             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3767             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3768             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3769             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3770             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3771         </fields>
3772         <links>
3773             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3774         </links>
3775         </class>
3776         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3777         <oils_persist:source_definition>
3778 SELECT  usr,
3779         STRING_AGG(
3780             CASE
3781                 WHEN (
3782                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3783                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3784                 ) THEN id::TEXT
3785                 ELSE '0'
3786             END
3787         ,',') AS out,
3788
3789         STRING_AGG(
3790             CASE
3791                 WHEN (
3792                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3793                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3794                 ) THEN id::TEXT
3795                 ELSE '0'
3796             END
3797         ,',') AS overdue,
3798
3799         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
3800         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id::TEXT ELSE '0' END,',') AS claims_returned,
3801         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
3802   FROM  action.circulation
3803   WHERE checkin_time IS NULL
3804   GROUP BY 1
3805         </oils_persist:source_definition>
3806         <fields oils_persist:primary="usr">
3807             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3808             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3809             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3810             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3811             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3812             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3813         </fields>
3814         <links>
3815             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3816         </links>
3817         </class>
3818         <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">
3819                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3820                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3821                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3822                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3823                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3824                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3825                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3826                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3827                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3828                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3829                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3830                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3831                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3832                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3833                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3834                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3835                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3836                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3837                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3838                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3839                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3840                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3841                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3842                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3843                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3844                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3845                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3846                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3847                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3848                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3849                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3850                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3851                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3852                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3853                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3854                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3855                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3856                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3857                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3858                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3859                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3860                 </fields>
3861                 <links>
3862                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3863                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3864                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3865                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3866                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3867                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3868                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3869                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3870                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3871                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3872                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3873                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3874                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3875                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3876                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3877                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3878                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3879                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3880                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3881                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3882                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3883                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3884                 </links>
3885                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3886                         <actions>
3887                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3888                         </actions>
3889                 </permacrud>
3890         </class>
3891         <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">
3892                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3893                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3894                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3895                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3896                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3897                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3898                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3899                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3900                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3901                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3902                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3903                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3904                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3905                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3906                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3907                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3908                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3909                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3910                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3911                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3912                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3913                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3914                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3915                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3916                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3917                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3918                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3919                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3920                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3921                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3922                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3923                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3924                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3925                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3926                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3927                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3928                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3929                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3930                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3931                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3932                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3933                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3934                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3935                 </fields>
3936                 <links>
3937                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3938                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3939                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3940                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3941                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3942                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3943                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3944                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3945                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3946                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3947                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3948                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3949                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3950                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3951                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3952                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3953                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3954                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3955                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3956                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3957                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3958                 </links>
3959         </class>
3960         <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">
3961                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3962                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3963                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3964                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3965                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3966                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3967                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3968                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3969                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3970                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3971                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3972                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3973                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3974                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3975                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3976                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3977                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3978                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3979                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3980                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3981                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3982                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3983                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3984                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3985                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3986                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3987                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3988                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3989                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3990                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3991                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3992                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3993                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3994                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3995                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3996                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3997                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3998                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3999                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4000                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4001                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4002                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4003                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4004                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4005                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4006                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4007                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4008                 </fields>
4009                 <links>
4010                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4011                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4012                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4013                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4014                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4015                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4016                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4017                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4018                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4019                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4020                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4021                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4022                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4023                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4024                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4025                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4026                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4027                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4028                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4029                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4030                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4031                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4032                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4033                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4034                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4035                 </links>
4036         </class>
4037
4038         <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">
4039                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4040                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4041                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4042                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4043                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4044                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4045                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4046                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4047                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4048                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4049                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4050                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4051                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4052                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4053                 </fields>
4054                 <links>
4055                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4056                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4057                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4058                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4059                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4060                 </links>
4061                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4062                         <actions>
4063                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4064                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4065                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4066                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4067                         </actions>
4068                 </permacrud>
4069         </class>
4070
4071         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4072                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4073                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4074                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4075                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4076                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4077                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4078                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4079                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4080                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4081                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4082                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4083                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4084                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4085                 </fields>
4086                 <links>
4087                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4088                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4089                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4090                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4091                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4092                 </links>
4093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4094                         <actions>
4095                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4096                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4097                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4098                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4099                         </actions>
4100                 </permacrud>
4101         </class>
4102         
4103         <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">
4104                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4105                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4106                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4107                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4108                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4109                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4110                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4111                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4112                 </fields>
4113                 <links>
4114                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4115                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4116                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4117                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4118                 </links>
4119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4120                         <actions>
4121                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4122                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4123                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4124                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4125                         </actions>
4126                 </permacrud>
4127         </class>
4128         
4129         <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">
4130                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4131                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4132                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4133                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4134                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4135                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4136                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4137                 </fields>
4138                 <links>
4139                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4140                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4141                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4142                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4143                 </links>
4144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4145                         <actions>
4146                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4147                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4148                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4149                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4150                         </actions>
4151                 </permacrud>
4152         </class>
4153         
4154         <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">
4155                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4156                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4157                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4158                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4159                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4160                 </fields>
4161                 <links>
4162                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4163                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4164                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4165                 </links>
4166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4167                         <actions>
4168                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4169                     <context link="resource" field="owner" />
4170                 </create>
4171                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4172                     <context link="resource" field="owner" />
4173                 </retrieve>
4174                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4175                     <context link="resource" field="owner" />
4176                 </update>
4177                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4178                     <context link="resource" field="owner" />
4179                 </delete>
4180                         </actions>
4181                 </permacrud>
4182         </class>
4183         
4184         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4185                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4186                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4187                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4188                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4189                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4190                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4191                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4192                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4193                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4194                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4195                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4196                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4197                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4198                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4199                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4200                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4201                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4202                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4203                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4204                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4205                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4206                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4207                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4208                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4209                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4210                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4211                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4212                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4213                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4214                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4215                 </fields>
4216                 <links>
4217                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4218                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4219                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4220                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4221                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4222                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4223                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4224                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4225                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4226                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4227                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4228                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4229                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4230                 </links>
4231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4232                         <actions>
4233                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4234                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4235                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4236                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4237                         </actions>
4238                 </permacrud>
4239         </class>
4240         
4241         <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">
4242                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4243                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4244                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4245                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4246                 </fields>
4247                 <links>
4248                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4249                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4250                 </links>
4251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4252                         <actions>
4253                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4254                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4255                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4256                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4257                         </actions>
4258                 </permacrud>
4259         </class>
4260
4261         <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">
4262                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4263                         <field name="bucket" reporter:datatype="link"/>
4264                         <field name="id" reporter:datatype="id" />
4265                         <field name="target_call_number" reporter:datatype="link" />
4266                         <field name="create_time" reporter:datatype="timestamp" />
4267                         <field name="pos" reporter:datatype="int" />
4268                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4269                 </fields>
4270                 <links>
4271                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4272                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4273             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4274                 </links>
4275         </class>
4276         <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">
4277                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4278                         <field name="id" reporter:datatype="id" />
4279                         <field name="item" reporter:datatype="link"/>
4280                         <field name="note" reporter:datatype="text" />
4281                 </fields>
4282                 <links>
4283                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4284                 </links>
4285         </class>
4286         <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">
4287                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4288                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4289                         <field name="btype" reporter:datatype="text"/>
4290                         <field name="id" reporter:datatype="id" />
4291                         <field name="name" reporter:datatype="text"/>
4292                         <field name="description" reporter:datatype="text"/>
4293                         <field name="owner" reporter:datatype="link"/>
4294                         <field name="pub" reporter:datatype="bool"/>
4295                         <field name="create_time" reporter:datatype="timestamp" />
4296                 </fields>
4297                 <links>
4298                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4299                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4300                 </links>
4301         </class>
4302         <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">
4303                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4304                         <field name="id" reporter:datatype="id" />
4305                         <field name="bucket" reporter:datatype="link"/>
4306                         <field name="note" reporter:datatype="text" />
4307                 </fields>
4308                 <links>
4309                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4310                 </links>
4311         </class>
4312         <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">
4313                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4314                         <field name="hold" reporter:datatype="link"/>
4315                         <field name="id" reporter:datatype="id" />
4316                         <field name="target_copy" reporter:datatype="link"/>
4317                         <field name="proximity" reporter:datatype="number"/>
4318                 </fields>
4319                 <links>
4320                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4321                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4322                 </links>
4323         </class>
4324         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4325                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4326                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4327                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4328                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4329                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4330                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4331                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4332                 </fields>
4333                 <links>
4334                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4335                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4336                 </links>
4337         </class>
4338         <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">
4339                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4340                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4341                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4342                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4343                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4344                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4345                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4346                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4347                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4348                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4349                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4350                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4351                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4352                 </fields>
4353                 <links>
4354                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4355                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4356                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4357                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4358                 </links>
4359         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4360             <actions>
4361                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4362                 <retrieve/>
4363                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4364                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4365             </actions>
4366         </permacrud>
4367         </class>
4368         <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">
4369                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4370                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4371                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4372                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4373                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4374             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4375             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4376             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4377                 </fields>
4378                 <links>
4379                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4380                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4381                 </links>
4382         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4383             <actions>
4384                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4385                 <retrieve/>
4386                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4387                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4388             </actions>
4389         </permacrud>
4390         </class>
4391         <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">
4392                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4393                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4394             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4395             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4396                 </fields>
4397                 <links>
4398                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4399                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4400                 </links>
4401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4402             <actions>
4403                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4404                                         <context link="lgroup" field="owner" />
4405                 </create>
4406                 <retrieve/>
4407                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4408                                         <context link="lgroup" field="owner" />
4409                 </update>
4410                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4411                                         <context link="lgroup" field="owner" />
4412                 </delete>
4413             </actions>
4414         </permacrud>
4415         </class>
4416
4417     <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">
4418         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4419             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4420             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4421             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4422             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4423         </fields>
4424         <links>
4425             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4426             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4427         </links>
4428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4429             <actions>
4430                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4431                 <retrieve/>
4432                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4433                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4434             </actions>
4435         </permacrud>
4436     </class>
4437
4438         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4439                 <fields>
4440                         <field name="sre_id" oils_persist:virtual="true" />
4441                         <field name="location" oils_persist:virtual="true" />
4442                         <field name="owning_lib" oils_persist:virtual="true" />
4443                         <field name="basic_holdings" oils_persist:virtual="true" />
4444                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4445                         <field name="supplement_holdings" oils_persist:virtual="true" />
4446                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4447                         <field name="index_holdings" oils_persist:virtual="true" />
4448                         <field name="index_holdings_add" oils_persist:virtual="true" />
4449                         <field name="online" oils_persist:virtual="true" />
4450                         <field name="missing" oils_persist:virtual="true" />
4451                         <field name="incomplete" oils_persist:virtual="true" />
4452                 </fields>
4453         </class>
4454
4455         <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">
4456                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4457                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4458                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4459                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4460                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4461                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4462                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4463                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4464                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4465                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4466                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4467                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4468                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4469                 </fields>
4470                 <links>
4471                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4472                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4473                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4474                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4475                 </links>
4476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4477                         <actions>
4478                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4479                                 <retrieve/>
4480                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4481                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4482                         </actions>
4483                 </permacrud>
4484         </class>
4485
4486         <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">
4487                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4488                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4489                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4490                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4491                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4492                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4493                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4494                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4495                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4496                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4497                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4498                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4499                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4500                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4501                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4502                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4503                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4504                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4505                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4506                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4507                 </fields>
4508                 <links>
4509                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4510                 </links>
4511                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4512                         <actions>
4513                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4514                                         <context link="subscription" field="owning_lib" />
4515                                 </create>
4516                                 <retrieve />
4517                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4518                                         <context link="subscription" field="owning_lib" />
4519                                 </update>
4520                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4521                                         <context link="subscription" field="owning_lib" />
4522                                 </delete>
4523                         </actions>
4524                 </permacrud>
4525         </class>
4526
4527         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4528                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4529                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4530                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4531                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4532                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4533                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4534                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4535                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4536                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4537                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4538                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4539                 </fields>
4540                 <links>
4541                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4542                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4543                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4544                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4545                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4546                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4547                 </links>
4548                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4549                         <actions>
4550                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4551                                 <retrieve />
4552                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4553                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4554                         </actions>
4555                 </permacrud>
4556         </class>
4557
4558         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4559                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4560                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4561                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4562                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4563                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4564                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4565                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4566                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4567                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4568                 </fields>
4569                 <links>
4570                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4571                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4572                 </links>
4573         </class>
4574
4575         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4576                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4577                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4578                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4579                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4580                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4581                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4582                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4583                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4584                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4585                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4586                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4587                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4588                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4589                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4590                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4591                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4592                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4593                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4594                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4595                 </fields>
4596                 <links>
4597                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4598                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4599                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4600                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4601                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4602                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4603                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4604                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4605                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4606                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4607                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4608                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4609                 </links>
4610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4611                         <actions>
4612                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4613                                 <retrieve />
4614                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4615                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4616                         </actions>
4617                 </permacrud>
4618         </class>
4619
4620         <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">
4621                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4622                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4623                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4624                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4625                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4626                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4627                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4628                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4629                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4630                 </fields>
4631                 <links>
4632                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4633                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4634                 </links>
4635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4636                         <actions>
4637                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4638                                         <context link="distribution" field="holding_lib" />
4639                                 </create>
4640                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4641                                         <context link="distribution" field="holding_lib" />
4642                                 </retrieve>
4643                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4644                                         <context link="distribution" field="holding_lib" />
4645                                 </update>
4646                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4647                                         <context link="distribution" field="holding_lib" />
4648                                 </delete>
4649                         </actions>
4650                 </permacrud>
4651         </class>
4652
4653         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4654                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4655                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4656                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4657                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4658                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4659                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4660                 </fields>
4661                 <links>
4662                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4663                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4664                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4665                 </links>
4666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4667                         <actions>
4668                                 <create permission="ADMIN_SERIAL_STREAM">
4669                                         <context link="distribution" field="holding_lib" />
4670                                 </create>
4671                                 <retrieve />
4672                                 <update permission="ADMIN_SERIAL_STREAM">
4673                                         <context link="distribution" field="holding_lib" />
4674                                 </update>
4675                                 <delete permission="ADMIN_SERIAL_STREAM">
4676                                         <context link="distribution" field="holding_lib" />
4677                                 </delete>
4678                         </actions>
4679                 </permacrud>
4680         </class>
4681
4682         <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">
4683                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4684                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4685                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4686                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4687                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4688                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4689                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4690                 </fields>
4691                 <links>
4692                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4693                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4694                 </links>
4695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4696                         <actions>
4697                                 <create permission="ADMIN_SERIAL_STREAM">
4698                                         <context link="stream" jump="distribution" field="holding_lib" />
4699                                 </create>
4700                                 <retrieve permission="RECEIVE_SERIAL">
4701                                         <context link="stream" jump="distribution" field="holding_lib" />
4702                                 </retrieve>
4703                                 <update permission="ADMIN_SERIAL_STREAM">
4704                                         <context link="stream" jump="distribution" field="holding_lib" />
4705                                 </update>
4706                                 <delete permission="ADMIN_SERIAL_STREAM">
4707                                         <context link="stream" jump="distribution" field="holding_lib" />
4708                                 </delete>
4709                         </actions>
4710                 </permacrud>
4711         </class>
4712
4713         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4714                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4715                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4716                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4717                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4718                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4719                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4720                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4721                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4722                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4723                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4724                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4725                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4726                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4727                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4728                 </fields>
4729                 <links>
4730                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4731                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4732                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4733                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4734                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4735                 </links>
4736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4737                         <actions>
4738                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4739                                         <context link="subscription" field="owning_lib" />
4740                                 </create>
4741                                 <retrieve/>
4742                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4743                                         <context link="subscription" field="owning_lib" />
4744                                 </update>
4745                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4746                                         <context link="subscription" field="owning_lib" />
4747                                 </delete>
4748                         </actions>
4749                 </permacrud>
4750         </class>
4751
4752         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4753                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4754                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4755                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4756                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4757                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4758                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4759                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4760                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4761                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4762                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4763                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4764                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4765                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4766                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4767                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4768                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4769                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4770                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4771                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4772                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4773                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4774                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4775                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4776                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4777                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4778                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4779                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4780                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4781                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4782                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4783                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4784                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4785                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
4786                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4787                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4788                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4789                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4790                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4791                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4792                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4793                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4794                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4795                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4796                 </fields>
4797                 <links>
4798                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4799                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4800                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4801                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4802                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4803                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4804                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4805                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4806                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4807                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4808                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4809                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4810                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4811                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4812                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
4813                 </links>
4814                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4815                         <actions>
4816                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4817                                 <retrieve/>
4818                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4819                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4820                         </actions>
4821                 </permacrud>
4822         </class>
4823
4824         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4825                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4826                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4827                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4828                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4829                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4830                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4831                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4832                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4833                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4834                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4835                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4836                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4837                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4838                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4839                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4840                 </fields>
4841                 <links>
4842                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4843                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4844                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4845                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4846                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4847                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4848                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4849                 </links>
4850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4851                         <actions>
4852                                 <create permission="ADMIN_SERIAL_ITEM">
4853                                         <context link="stream" jump="distribution" field="holding_lib" />
4854                                 </create>
4855                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4856                                         <context link="stream" jump="distribution" field="holding_lib" />
4857                                 </retrieve>
4858                                 <update permission="ADMIN_SERIAL_ITEM">
4859                                         <context link="stream" jump="distribution" field="holding_lib" />
4860                                 </update>
4861                                 <delete permission="ADMIN_SERIAL_ITEM">
4862                                         <context link="stream" jump="distribution" field="holding_lib" />
4863                                 </delete>
4864                         </actions>
4865                 </permacrud>
4866         </class>
4867
4868         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4869                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4870                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4871                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4872                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4873                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4874                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4875                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4876                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4877                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4878                 </fields>
4879                 <links>
4880                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4881                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4882                 </links>
4883                 <!-- Not available via PCRUD at this time -->
4884         </class>
4885         <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">
4886                 <fields>
4887                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4888                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4889                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4890                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4891                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4892                 </fields>
4893                 <links>
4894                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4895                 </links>
4896         </class>
4897         <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">
4898                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4899                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4900                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4901                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4902                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4903                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4904                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4905                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4906                 </fields>
4907                 <links>
4908                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4909                 </links>
4910         </class>
4911         <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">
4912                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4913                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4914                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4915                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4916                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4917                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4918                 </fields>
4919                 <links>
4920                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4921                 </links>
4922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4923                         <actions>
4924                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4925                                         <context link="distribution" field="holding_lib" />
4926                                 </create>
4927                                 <retrieve/>
4928                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4929                                         <context link="distribution" field="holding_lib" />
4930                                 </update>
4931                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4932                                         <context link="distribution" field="holding_lib" />
4933                                 </delete>
4934                         </actions>
4935                 </permacrud>
4936         </class>
4937
4938         <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">
4939                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4940                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4941                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4942                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4943                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4944                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4945                 </fields>
4946                 <links>
4947                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4948                 </links>
4949                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4950                         <actions>
4951                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4952                                         <context link="distribution" field="holding_lib" />
4953                                 </create>
4954                                 <retrieve/>
4955                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4956                                         <context link="distribution" field="holding_lib" />
4957                                 </update>
4958                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4959                                         <context link="distribution" field="holding_lib" />
4960                                 </delete>
4961                         </actions>
4962                 </permacrud>
4963         </class>
4964
4965         <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">
4966                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4967                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4968                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4969                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4970                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4971                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4972                 </fields>
4973                 <links>
4974                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4975                 </links>
4976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4977                         <actions>
4978                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4979                                         <context link="distribution" field="holding_lib" />
4980                                 </create>
4981                                 <retrieve/>
4982                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4983                                         <context link="distribution" field="holding_lib" />
4984                                 </update>
4985                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4986                                         <context link="distribution" field="holding_lib" />
4987                                 </delete>
4988                         </actions>
4989                 </permacrud>
4990         </class>
4991
4992         <class id="ascecm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry_copy_map" oils_persist:tablename="asset.stat_cat_entry_copy_map" reporter:label="Statistical Category Entry Copy Map">
4993                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4994                         <field name="id" reporter:datatype="id" />
4995                         <field name="owning_copy" reporter:datatype="link"/>
4996                         <field name="stat_cat" reporter:datatype="link"/>
4997                         <field name="stat_cat_entry" reporter:datatype="link"/>
4998                 </fields>
4999                 <links>
5000                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5001                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5002                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5003                 </links>
5004         </class>
5005         <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">
5006                 <fields oils_persist:primary="code">
5007                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5008                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5009                 </fields>
5010                 <links/>
5011         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5012             <actions>
5013                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5014                 <retrieve/>
5015                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5016                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5017             </actions>
5018         </permacrud>
5019         </class>
5020         <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">
5021                 <fields oils_persist:primary="code">
5022                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5023                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5024                 </fields>
5025                 <links/>
5026         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5027             <actions>
5028                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5029                 <retrieve/>
5030                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5031                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5032             </actions>
5033         </permacrud>
5034         </class>
5035         <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">
5036                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5037                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5038                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5039                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5040                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5041                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5042                 </fields>
5043                 <links>
5044             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5045         </links>
5046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5047             <actions>
5048                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5049                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5050                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5051                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5052             </actions>
5053         </permacrud>
5054         </class>
5055         <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">
5056                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5057                         <field name="id" reporter:datatype="id" />
5058                         <field name="name" reporter:datatype="text"/>
5059                 </fields>
5060                 <links/>
5061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5062             <actions>
5063                 <create permission="CREATE_LASSO" global_required="true"/>
5064                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5065                 <update permission="UPDATE_LASSO" global_required="true"/>
5066                 <delete permission="DELETE_LASSO" global_required="true"/>
5067             </actions>
5068         </permacrud>
5069         </class>
5070         <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">
5071                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5072                         <field name="id" reporter:datatype="id" />
5073                         <field name="lasso" reporter:datatype="link"/>
5074                         <field name="org_unit" reporter:datatype="org_unit"/>
5075                 </fields>
5076                 <links>
5077                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5078                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5079                 </links>
5080         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5081             <actions>
5082                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5083                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5084                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5085                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5086             </actions>
5087         </permacrud>
5088         </class>
5089         <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">
5090                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5091                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5092                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5093                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5094                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5095                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5096                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5097                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5098                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5099                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5100                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5101                 </fields>
5102                 <links>
5103                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5104                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5105                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5106                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5107                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5108                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5109                 </links>
5110         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5111             <actions>
5112                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5113                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5114                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5115                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5116             </actions>
5117         </permacrud>
5118         </class>
5119         <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">
5120                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5121                         <field name="id" reporter:datatype="id" />
5122                         <field name="from_org" reporter:datatype="org_unit"/>
5123                         <field name="to_org" reporter:datatype="org_unit"/>
5124                         <field name="prox" reporter:datatype="int" />
5125                 </fields>
5126                 <links>
5127                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5128                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5129                 </links>
5130         </class>
5131         <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">
5132                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5133                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5134                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5135                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5136                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5137                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5138                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5139                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5140                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5141                 </fields>
5142                 <links/>
5143         </class>
5144         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5145                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5146                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5147                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5148                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5149                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5150                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5151                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5152                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5153                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5154                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5155                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5156                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5157                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5158                 </fields>
5159                 <links>
5160                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5161                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5162                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5163                 </links>
5164         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5165             <actions>
5166                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5167                 <retrieve/>
5168                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5169                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5170             </actions>
5171         </permacrud>
5172         </class>
5173         <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">
5174                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5175                         <field name="address_type"  reporter:datatype="text"/>
5176                         <field name="city"  reporter:datatype="text"/>
5177                         <field name="country"  reporter:datatype="text"/>
5178                         <field name="county"  reporter:datatype="text"/>
5179                         <field name="id" reporter:datatype="id" />
5180                         <field name="org_unit" reporter:datatype="org_unit"/>
5181                         <field name="post_code"  reporter:datatype="text"/>
5182                         <field name="state"  reporter:datatype="text"/>
5183                         <field name="street1"  reporter:datatype="text"/>
5184                         <field name="street2"  reporter:datatype="text"/>
5185                         <field name="valid" reporter:datatype="bool"/>
5186                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5187                 </fields>
5188                 <links>
5189                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5190                 </links>
5191         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5192             <actions>
5193                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5194                 <retrieve/>
5195                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5196                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5197             </actions>
5198         </permacrud>
5199         </class>
5200         <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">
5201                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5202                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5203                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5204                         <field name="query_text" reporter:datatype="text"/>
5205                 </fields>
5206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5207             <actions>
5208                 <retrieve/>
5209             </actions>
5210         </permacrud>
5211         </class>
5212
5213         <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">
5214                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5215                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5216                         <field name="owner" reporter:datatype="org_unit"/>
5217                         <field name="code" reporter:datatype="text"/>
5218                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5219                         <field name="create_date" reporter:datatype="timestamp"/>
5220                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5221                 </fields>
5222                 <links>
5223                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5224                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5225                 </links>
5226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5227             <actions>
5228                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5229                 <retrieve/>
5230                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5231                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5232             </actions>
5233         </permacrud>
5234         </class>
5235         <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">
5236                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5237                         <field name="id" reporter:datatype="id"/>
5238                         <field name="grp" reporter:datatype="link"/>
5239                         <field name="pos" reporter:datatype="int"/>
5240                         <field name="query" reporter:datatype="link"/>
5241                 </fields>
5242                 <links>
5243                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5244                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5245                 </links>
5246         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5247             <actions>
5248                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5249                     <context link="grp" field="owner"/>
5250                 </create>
5251                 <retrieve/>
5252                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5253                     <context link="grp" field="owner"/>
5254                 </update>
5255                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5256                     <context link="grp" field="owner"/>
5257                 </delete>
5258             </actions>
5259         </permacrud>
5260         </class>
5261
5262         <!-- A note: Please update alhr and ahopl when updating ahr -->
5263         <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">
5264                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5265                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5266                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5267                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5268                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5269                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5270                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5271                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5272                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5273                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5274                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5275                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5276                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5277                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5278                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5279                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5280                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5281                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5282                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5283                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5284                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5285                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5286                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5287                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5288                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5289                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5290                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5291                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5292                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5293                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5294                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5295                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5296                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5297                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5298                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5299                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5300                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5301                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5302                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5303                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5304                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5305                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5306                 </fields>
5307                 <links>
5308                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5309                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5310                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5311                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5312                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5313                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5314                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5315                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5316                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5317                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5318                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5319                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5320                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5321                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5322                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5323                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5324                 </links>
5325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5326                         <actions>
5327                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5328                         </actions>
5329                 </permacrud>
5330         </class>
5331         <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">
5332                 <oils_persist:source_definition><![CDATA[
5333                 SELECT
5334                         ahr.*,
5335                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5336                                 copy_location_order_position,
5337                         CASE WHEN au.alias IS NOT NULL THEN
5338                                 au.alias
5339                         ELSE
5340                                 au.first_given_name
5341                         END AS usr_alias_or_first_given_name,
5342                         au.first_given_name AS usr_first_given_name,
5343                         au.second_given_name AS usr_second_given_name,
5344                         au.family_name AS usr_family_name,
5345                         au.prefix AS usr_prefix,
5346                         au.suffix AS usr_suffix,
5347                         au.alias AS usr_alias,
5348                         CASE WHEN au.alias IS NOT NULL THEN
5349                                 au.alias
5350                         ELSE
5351                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5352                                         COALESCE(au.family_name, ''),
5353                                         COALESCE(au.suffix, ''),
5354                                         ', ',
5355                                         COALESCE(au.prefix, ''),
5356                                         COALESCE(au.first_given_name, ''),
5357                                         COALESCE(au.second_given_name, '')
5358                                 ], ' '), E'\\s+,', ',')
5359                         END AS usr_alias_or_display_name,
5360                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5361                                 COALESCE(au.family_name, ''),
5362                                 COALESCE(au.suffix, ''),
5363                                 ', ',
5364                                 COALESCE(au.prefix, ''),
5365                                 COALESCE(au.first_given_name, ''),
5366                                 COALESCE(au.second_given_name, '')
5367                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5368                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5369                                 AS call_number_label,
5370                         siss.label AS issuance_label,
5371                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5372                         ahcm_1.copy_count AS potential_copies
5373                 FROM action.hold_request ahr
5374                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5375                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5376                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5377                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5378                 JOIN actor.usr au ON (au.id = ahr.usr)
5379                 JOIN (
5380                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5381                         FROM asset.copy_location
5382                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5383                 LEFT JOIN actor.usr_standing_penalty ausp 
5384                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5385                 LEFT JOIN config.standing_penalty csp
5386                         ON (
5387                                 csp.id = ausp.standing_penalty AND 
5388                                 csp.block_list LIKE '%CAPTURE%' AND (
5389                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5390                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5391                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5392                                         )
5393                                 )
5394                         )
5395                 JOIN (
5396                         SELECT COUNT(target_copy) AS copy_count, hold
5397                         FROM action.hold_copy_map
5398                         GROUP BY 2
5399                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5400                 LEFT JOIN serial.issuance siss
5401                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5402                 LEFT JOIN asset.copy_location_order acplo
5403                         ON (acp.location = acplo.location AND
5404                                 acp.circ_lib = acplo.org)
5405                 WHERE
5406                         ahr.capture_time IS NULL AND
5407                         ahr.cancel_time IS NULL AND
5408                         csp.id IS NULL AND
5409                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5410                 ]]></oils_persist:source_definition>
5411                 <fields oils_persist:primary="id">
5412                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5413                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5414                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5415                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5416                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5417                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5418                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5419                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5420                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5421                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5422                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5423                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5424                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5425                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5426                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5427                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5428                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5429                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5430                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5431                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5432                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5433                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5434                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5435                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5436                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5437                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5438                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5439                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5440                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5441                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5442                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5443                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5444                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5445                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5446                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5447                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5448                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5449                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5450                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5451                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5452                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5453                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5454                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5455                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5456                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5457                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5458                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5459                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5460                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5461                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5462                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5463                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5464                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5465                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5466                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5467                 </fields>
5468                 <links>
5469                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5470                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5471                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5472                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5473                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5474                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5475                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5476                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5477                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5478                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5479                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5480                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5481                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5482                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5483                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5484                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5485                 </links>
5486                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5487                         <actions>
5488                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5489                         </actions>
5490                 </permacrud>
5491         </class>
5492         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5493                 <oils_persist:source_definition>
5494                         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)
5495                 </oils_persist:source_definition>
5496                 <fields oils_persist:primary="id">
5497                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5498                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5499                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5500                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5501                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5502                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5503                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5504                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5505                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5506                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5507                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5508                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5509                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5510                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5511                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5512                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5513                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5514                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5515                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5516                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5517                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5518                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5519                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5520                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5521                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5522                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5523                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5524                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5525                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5526                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5527                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5528                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5529                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5530                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5531                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5532                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5533                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5534                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5535                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5536                 </fields>
5537                 <links>
5538                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5539                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5540                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5541                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5542                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5543                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5544                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5545                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5546                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5547                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5548                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5549                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5550                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5551                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5552                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5553                 </links>
5554         </class>
5555
5556         <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">
5557                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5558                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5559                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5560                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5561                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5562                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5563                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5564                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5565                 </fields>
5566                 <links>
5567                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5568                 </links>
5569                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5570                         <actions>
5571                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5572                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5573                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5574                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5575                         </actions>
5576                 </permacrud>
5577         </class>
5578         <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">
5579                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5580                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5581                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5582                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5583                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5584                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5585                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5586                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5587                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5588                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5589                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5590                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5591                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5592                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5593                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5594                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5595                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5596                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5597                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5598                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5599                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5600                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5601                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5602                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5603                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5604                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5605                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5606                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5607                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5608                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5609                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5610                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5611                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5612                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5613                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5614                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5615                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5616                 </fields>
5617                 <links>
5618                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5619                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5620                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5621                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5622                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5623                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5624                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5625                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5626                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5627                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5628                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5629                 </links>
5630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5631                         <actions>
5632                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5633                         </actions>
5634                 </permacrud>
5635         </class>
5636         <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">
5637                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5638                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5639                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5640                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5641                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5642                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5643                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5644                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5645                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5646                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5647                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5648                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5649                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5650                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5651                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5652                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5653                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5654                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5655                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5656                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5657                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5658                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5659                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5660                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5661                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5662                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5663                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5664                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5665                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5666                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5667                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5668                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5669                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5670                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5671                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5672                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5673                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5674                 </fields>
5675                 <links>
5676                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5677                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5678                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5679                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5680                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5681                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5682                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5683                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5684                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5685                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5686                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5687                 </links>
5688                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5689                         <actions>
5690                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5691                         </actions>
5692                 </permacrud>
5693         </class>
5694
5695         <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">
5696                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5697                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5698                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5699                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5700                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5701                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5702                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5703                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5704                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5705                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5706                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5707                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5708                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5709                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5710                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5711                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5712                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5713                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5714                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5715                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5716                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5717                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5718                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5719                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5720                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5721                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5722                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5723                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5724                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5725                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5726                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5727                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5728                 </fields>
5729                 <links>
5730                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5731                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5732                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5733                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5734                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5735                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5736                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5737                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5738                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5739                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5740                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5741                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5742                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5743                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5744                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5745                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5746                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5747                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5748                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5749                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5750                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5751                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5752                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5753                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5754                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5755                 </links>
5756         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5757             <actions>
5758                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5759                 <retrieve />
5760                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5761                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5762             </actions>
5763         </permacrud>
5764         </class>
5765         <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">
5766                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5767                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5768                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5769                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5770                 </fields>
5771                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5772                         <actions>
5773                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5774                                 <retrieve/>
5775                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5776                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5777                         </actions>
5778                 </permacrud>
5779         </class>
5780         <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">
5781                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5782                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5783                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5784                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5785                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5786                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5787                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5788                 </fields>
5789                 <links>
5790                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5791                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5792                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5793                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5794                 </links>
5795                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5796                         <actions>
5797                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5798                                 <retrieve/>
5799                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5800                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5801                         </actions>
5802                 </permacrud>
5803         </class>
5804         <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">
5805                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5806                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5807                         <field name="btype" reporter:datatype="text"/>
5808                         <field name="id" reporter:datatype="id" />
5809                         <field name="name"  reporter:datatype="text"/>
5810                         <field name="description" reporter:datatype="text"/>
5811                         <field name="owner" reporter:datatype="link"/>
5812                         <field name="pub" reporter:datatype="bool"/>
5813                         <field name="create_time" reporter:datatype="timestamp" />
5814                 </fields>
5815                 <links>
5816                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5817                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5818                 </links>
5819         </class>
5820         <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">
5821                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5822                         <field name="id" reporter:datatype="id" />
5823                         <field name="bucket" reporter:datatype="link"/>
5824                         <field name="note" reporter:datatype="text" />
5825                 </fields>
5826                 <links>
5827                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5828                 </links>
5829         </class>
5830         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5831                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5832                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5833                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5834                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5835                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5836                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5837                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5838                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5839                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5840                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5841                 </fields>
5842                 <links>
5843                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5844                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5845                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5846                 </links>
5847         </class>
5848         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5849                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5850                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5851                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5852                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5853                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5854                 </fields>
5855                 <links>
5856                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5857                 </links>
5858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5859                         <actions>
5860                                 <retrieve permission="VIEW_USER">
5861                                         <context link="usr" field="home_ou" />
5862                                 </retrieve>
5863                         </actions>
5864                 </permacrud>
5865         </class>
5866     <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">
5867         <fields oils_persist:primary="field">
5868             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5869             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5870             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5871         </fields>
5872         <links/>
5873         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5874             <actions>
5875                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5876                 <retrieve />
5877                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5878                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5879             </actions>
5880         </permacrud>
5881     </class>
5882         <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">
5883                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5884                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5885                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5886                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5887                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5888                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5889                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5890                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5891                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5892                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5893                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5894                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5895                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5896                 </fields>
5897                 <links>
5898                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5899                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5900                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5901                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5902                 </links>
5903         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5904             <actions>
5905                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5906                 <retrieve />
5907                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5908                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5909             </actions>
5910         </permacrud>
5911         </class>
5912         <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">
5913                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5914                         <field name="field" reporter:datatype="link"/>
5915                         <field name="id" reporter:datatype="id" />
5916                         <field name="source" reporter:datatype="link"/>
5917                         <field name="value"  reporter:datatype="text"/>
5918                 </fields>
5919                 <links>
5920                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5921                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5922                 </links>
5923         </class>
5924         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5925                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5926                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5927                         <field name="btype" reporter:datatype="text"/>
5928                         <field name="id" reporter:datatype="id" />
5929                         <field name="name"  reporter:datatype="text"/>
5930                         <field name="description" reporter:datatype="text"/>
5931                         <field name="owner" reporter:datatype="link"/>
5932                         <field name="pub" reporter:datatype="bool"/>
5933                         <field name="create_time" reporter:datatype="timestamp" />
5934                 </fields>
5935                 <links>
5936                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5937                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5938                 </links>
5939         </class>
5940         <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">
5941                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5942                         <field name="id" reporter:datatype="id" />
5943                         <field name="bucket" reporter:datatype="link"/>
5944                         <field name="note" reporter:datatype="text" />
5945                 </fields>
5946                 <links>
5947                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5948                 </links>
5949         </class>
5950         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5951                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5952                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5953                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5954                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5955                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5956                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5957                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5958                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5959                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5960                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5961                 </fields>
5962                 <links>
5963                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5964                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5965                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5966                 </links>
5967         </class>
5968         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5969                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5970                         <field name="id" reporter:datatype="id" />
5971                         <field name="ind1" />
5972                         <field name="ind2" />
5973                         <field name="record" />
5974                         <field name="subfield" />
5975                         <field name="tag" />
5976                         <field name="value" />
5977                 </fields>
5978                 <links>
5979                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5980                 </links>
5981         </class>
5982         <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">
5983                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
5984                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5985                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
5986                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
5987                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
5988                 </fields>
5989                 <links>
5990                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
5991                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
5992                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
5993                 </links>
5994         </class>
5995         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
5996                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5997                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5998                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5999                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6000                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6001                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6002                 </fields>
6003                 <links>
6004                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6005                 </links>
6006         </class>
6007         <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">
6008                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6009                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6010                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6011                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6012                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6013                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6014                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6015                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6016                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6017                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6018                 </fields>
6019                 <links>
6020                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6021                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6022                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6023                 </links>
6024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6025             <actions>
6026                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6027                 <retrieve/>
6028                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6029                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6030             </actions>
6031         </permacrud>
6032         </class>
6033         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6034                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6035                         <field name="create_date" reporter:datatype="timestamp"/>
6036                         <field name="creator" reporter:datatype="link"/>
6037                         <field name="edit_date" reporter:datatype="timestamp"/>
6038                         <field name="editor" reporter:datatype="link"/>
6039                         <field name="id" reporter:datatype="id" />
6040                         <field name="pub" reporter:datatype="bool"/>
6041                         <field name="record" reporter:datatype="link"/>
6042                         <field name="value"  reporter:datatype="text"/>
6043                 </fields>
6044                 <links>
6045                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6046                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6047                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6048                 </links>
6049         </class>
6050         <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">
6051                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6052                         <field name="balance_owed" reporter:datatype="money" />
6053                         <field name="total_owed" reporter:datatype="money" />
6054                         <field name="total_paid" reporter:datatype="money" />
6055                         <field name="usr" reporter:datatype="link"/>
6056                 </fields>
6057                 <links>
6058                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6059                 </links>
6060         </class>
6061         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6062                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6063                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6064                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6065                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6066                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6067                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6068                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6069                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6070                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6071                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6072                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6073                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6074                 </fields>
6075                 <links>
6076                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6077                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6078                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6079                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6080                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6081                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6082                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6083                 </links>
6084         </class>
6085         <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">
6086                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6087                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6088                         <field name="quality" reporter:datatype="int" />
6089                         <field name="source" reporter:datatype="text"/>
6090                         <field name="transcendant" reporter:datatype="bool"/>
6091                         <field name="can_have_copies" reporter:datatype="bool"/>
6092                 </fields>
6093                 <links/>
6094         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6095             <actions>
6096                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6097                 <retrieve/>
6098                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6099                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6100             </actions>
6101         </permacrud>
6102         </class>
6103         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6104                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6105                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6106                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6107                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6108                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6109                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6110                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6111                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6112                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6113                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6114                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6115                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6116                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6117                 </fields>
6118                 <links>
6119                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6120                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6121                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6122                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6123                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6124                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6125                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6126                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6127                 </links>
6128         </class>
6129         <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">
6130                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6131                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6132                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6133                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6134                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6135                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6136                 </fields>
6137                 <links>
6138                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6139                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6140                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6141                 </links>
6142         </class>
6143         <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">
6144                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6145                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6146                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6147                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6148                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6149                 </fields>
6150                 <links>
6151                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6152                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6153                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6154                 </links>
6155         </class>
6156         <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">
6157                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6158                         <field name="bucket" reporter:datatype="link"/>
6159                         <field name="id" reporter:datatype="id" />
6160                         <field name="target_user" reporter:datatype="link"/>
6161                         <field name="create_time" reporter:datatype="timestamp" />
6162                         <field name="pos" reporter:datatype="int" />
6163                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6164                 </fields>
6165                 <links>
6166                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6167                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6168             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6169                 </links>
6170         </class>
6171         <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">
6172                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6173                         <field name="id" reporter:datatype="id" />
6174                         <field name="item" reporter:datatype="link"/>
6175                         <field name="note" reporter:datatype="text" />
6176                 </fields>
6177                 <links>
6178                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6179                 </links>
6180         </class>
6181         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6182                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6183                         <field name="balance_owed" reporter:datatype="money" />
6184                         <field name="total_owed" reporter:datatype="money" />
6185                         <field name="total_paid" reporter:datatype="money" />
6186                         <field name="usr" reporter:datatype="link"/>
6187                 </fields>
6188                 <links>
6189                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6190                 </links>
6191         </class>
6192         <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">
6193                 <fields oils_persist:primary="code" oils_persist:sequence="">
6194                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6195                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6196                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6197                 </fields>
6198                 <links/>
6199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6200             <actions>
6201                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6202                 <retrieve/>
6203                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6204                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6205             </actions>
6206         </permacrud>
6207         </class>
6208         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6209                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6210                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6211                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6212                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6213                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6214                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6215                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6216                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6217                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6218                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6219                 </fields>
6220                 <links>
6221                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6222                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6223                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6224                 </links>
6225         </class>
6226         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6227                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6228                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6229                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6230                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6231                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6232                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6233                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6234                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6235                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6236                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6237                 </fields>
6238                 <links>
6239                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6240                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6241                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6242                 </links>
6243         </class>
6244         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6245                 <fields oils_persist:primary="id" oils_persist:sequence="">
6246                         <field name="checkin_lib" reporter:datatype="link"/>
6247                         <field name="checkin_staff" reporter:datatype="link"/>
6248                         <field name="checkin_time" reporter:datatype="timestamp"/>
6249                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6250                         <field name="circ_staff" reporter:datatype="link"/>
6251                         <field name="desk_renewal" reporter:datatype="bool"/>
6252                         <field name="due_date" reporter:datatype="timestamp"/>
6253                         <field name="duration" reporter:datatype="interval"/>
6254                         <field name="duration_rule" reporter:datatype="link"/>
6255                         <field name="fine_interval" reporter:datatype="interval"/>
6256                         <field name="id" reporter:datatype="id" />
6257                         <field name="max_fine" reporter:datatype="money" />
6258                         <field name="max_fine_rule" reporter:datatype="link"/>
6259                         <field name="opac_renewal" reporter:datatype="bool"/>
6260                         <field name="phone_renewal" reporter:datatype="bool"/>
6261                         <field name="recurring_fine" reporter:datatype="money" />
6262                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6263                         <field name="renewal_remaining" reporter:datatype="int" />
6264             <field name="grace_period" reporter:datatype="interval" />
6265                         <field name="stop_fines" reporter:datatype="text"/>
6266                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6267                         <field name="target_copy" reporter:datatype="link"/>
6268                         <field name="usr" reporter:datatype="link"/>
6269                         <field name="xact_finish" reporter:datatype="timestamp" />
6270                         <field name="xact_start" reporter:datatype="timestamp" />
6271                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6272                 </fields>
6273                 <links>
6274                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6275                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6276                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6277                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6278                 </links>
6279         </class>
6280         <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">
6281                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6282                         <field name="field" reporter:datatype="link"/>
6283                         <field name="id" reporter:datatype="id" />
6284                         <field name="source" reporter:datatype="link"/>
6285                         <field name="value" reporter:datatype="text"/>
6286                 </fields>
6287                 <links>
6288                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6289                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6290                 </links>
6291         </class>
6292         <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">
6293                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6294                         <field name="high" reporter:datatype="money" />
6295                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6296                         <field name="low" reporter:datatype="money" />
6297                         <field name="name" reporter:datatype="text"/>
6298                         <field name="normal" reporter:datatype="money" />
6299                         <field name="recurrence_interval" reporter:datatype="interval"/>
6300             <field name="grace_period" reporter:datatype="interval" />
6301                 </fields>
6302                 <links/>
6303         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6304             <actions>
6305                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6306                 <retrieve/>
6307                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6308                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6309             </actions>
6310         </permacrud>
6311         </class>
6312         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6313                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6314                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6315                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6316                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6317                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6318                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6319                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6320                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6321                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6322                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6323                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6324                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6325                 </fields>
6326                 <links>
6327                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6328                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6329                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6330                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6331                 </links>
6332         </class>
6333         <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">
6334                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6335                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6336                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6337                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6338                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6339                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6340                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6341                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6342                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6343                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6344                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6345                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6346                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6347                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6348                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6349                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6350                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6351                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6352                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6353                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6354                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6355                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6356                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6357                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6358                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6359                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6360                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6361                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6362                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6363                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6364                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6365                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6366                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6367                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6368                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6369                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6370                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6371                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6372                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6373                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6374                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6375                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6376                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6377                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6378                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6379                 </fields>
6380                 <links>
6381                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6382                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6383                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6384                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6385                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6386                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6387                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6388                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6389                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6390                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6391                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6392                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6393                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6394                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6395                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6396                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6397                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6398                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6399                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6400                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6401                 </links>
6402         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6403             <actions>
6404                 <create permission="CREATE_COPY">
6405                     <context link="call_number" field="owning_lib"/>
6406                 </create>
6407                 <retrieve/>
6408                 <update permission="UPDATE_COPY">
6409                     <context link="call_number" field="owning_lib"/>
6410                 </update>
6411                 <delete permission="DELETE_COPY">
6412                     <context link="call_number" field="owning_lib"/>
6413                 </delete>
6414             </actions>
6415         </permacrud>
6416         </class>
6417
6418         <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">
6419                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6420                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6421                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6422                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6423                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6424                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6425                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6426                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6427                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6428                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6429                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6430                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6431                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6432                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6433                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6434                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6435                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6436                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6437                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6438                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6439                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6440                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6441                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6442                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6443                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6444                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6445                 </fields>
6446                 <links>
6447                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6448                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6449                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6450                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6451                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6452                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6453                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6454                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6455                 </links>
6456                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6457                         <actions>
6458                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6459                                 <retrieve />
6460                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6461                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6462                         </actions>
6463                 </permacrud>
6464         </class>
6465
6466         <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">
6467                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6468                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6469                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6470                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6471                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6472                 </fields>
6473                 <links/>
6474         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6475             <actions>
6476                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6477                 <retrieve/>
6478                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6479                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6480             </actions>
6481         </permacrud>
6482         </class>
6483         <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">
6484                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6485                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6486                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6487                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6488                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6489                 </fields>
6490                 <links/>
6491         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6492             <actions>
6493                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6494                 <retrieve/>
6495                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6496                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6497             </actions>
6498         </permacrud>
6499         </class>
6500         <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">
6501                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6502                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6503                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6504                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6505                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6506                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6507                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6508                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6509                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6510                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6511                 </fields>
6512                 <links>
6513                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6514                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6515                 </links>
6516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6517             <actions>
6518                 <create permission="CREATE_PERM" global_required="true"/>
6519                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6520                 <update permission="UPDATE_PERM" global_required="true"/>
6521                 <delete permission="DELETE_PERM" global_required="true"/>
6522             </actions>
6523         </permacrud>
6524         </class>
6525         <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">
6526                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6527                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6528                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6529                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6530                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6531                 </fields>
6532                 <links>
6533                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6534                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6535                 </links>
6536         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6537             <actions>
6538                 <create permission="ADMIN_SURVEY">
6539                     <context link="question" jump="survey" field="owner"/>
6540                 </create>
6541                 <retrieve/>
6542                 <update permission="ADMIN_SURVEY">
6543                     <context link="question" jump="survey" field="owner"/>
6544                 </update>
6545                 <delete permission="ADMIN_SURVEY">
6546                     <context link="question" jump="survey" field="owner"/>
6547                 </delete>
6548             </actions>
6549         </permacrud>
6550         </class>
6551         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6552                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6553                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6554                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6555                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6556                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6557                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6558                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6559                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6560                 </fields>
6561                 <links>
6562                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6563                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6564                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6565                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6566                 </links>
6567         </class>
6568         <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">
6569                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6570                         <field name="balance_owed" reporter:datatype="money" />
6571                         <field name="total_owed" reporter:datatype="money" />
6572                         <field name="total_paid" reporter:datatype="money" />
6573                         <field name="usr" reporter:datatype="link"/>
6574                 </fields>
6575                 <links>
6576                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6577                 </links>
6578         </class>
6579         <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">
6580                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6581                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6582                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6583                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6584                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6585                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6586                 </fields>
6587                 <links>
6588                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6589                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6590                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6591                 </links>
6592         </class>
6593         <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">
6594                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6595                         <field name="field" reporter:datatype="link"/>
6596                         <field name="id" reporter:datatype="id" />
6597                         <field name="source" reporter:datatype="link"/>
6598                         <field name="value" reporter:datatype="text"/>
6599                 </fields>
6600                 <links>
6601                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6602                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6603                 </links>
6604         </class>
6605         <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">
6606                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6607                         <field name="field" reporter:datatype="link"/>
6608                         <field name="id" reporter:datatype="id" />
6609                         <field name="source" reporter:datatype="link"/>
6610                         <field name="value" reporter:datatype="text"/>
6611                 </fields>
6612                 <links>
6613                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6614                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6615                 </links>
6616         </class>
6617         <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">
6618                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6619                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6620                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6621                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6622                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6623                 </fields>
6624                 <links>
6625                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6626                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6627                 </links>
6628         </class>
6629         <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">
6630                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6631                         <field name="depth" reporter:datatype="int" />
6632                         <field name="grantable" reporter:datatype="bool"/>
6633                         <field name="grp" reporter:datatype="link"/>
6634                         <field name="id" reporter:datatype="id" />
6635                         <field name="perm" reporter:datatype="link"/>
6636                 </fields>
6637                 <links>
6638                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6639                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6640                 </links>
6641         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6642             <actions>
6643                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6644                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6645                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6646                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6647             </actions>
6648         </permacrud>
6649         </class>
6650         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6651                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6652                         <field name="items" oils_persist:virtual="true" />
6653                         <field name="btype" reporter:datatype="text"/>
6654                         <field name="id" reporter:datatype="id" />
6655                         <field name="name" reporter:datatype="text"/>
6656                         <field name="description" reporter:datatype="text"/>
6657                         <field name="owner" reporter:datatype="link"/>
6658                         <field name="pub" reporter:datatype="bool"/>
6659                         <field name="create_time" reporter:datatype="timestamp" />
6660                 </fields>
6661                 <links>
6662                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6663                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6664                 </links>
6665         </class>
6666         <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">
6667                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6668                         <field name="id" reporter:datatype="id" />
6669                         <field name="bucket" reporter:datatype="link"/>
6670                         <field name="note" reporter:datatype="text" />
6671                 </fields>
6672                 <links>
6673                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6674                 </links>
6675         </class>
6676         <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">
6677                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6678                         <field name="id" reporter:datatype="int" />
6679                         <field name="usr" reporter:datatype="link"/>
6680                         <field name="work_ou" reporter:datatype="link"/>
6681                 </fields>
6682                 <links>
6683                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6684                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6685                 </links>
6686         </class>
6687         <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">
6688                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6689                         <field name="depth" reporter:datatype="int"/>
6690                         <field name="grantable" reporter:datatype="bool"/>
6691                         <field name="id" reporter:datatype="id" />
6692                         <field name="perm" reporter:datatype="link"/>
6693                         <field name="usr" reporter:datatype="link"/>
6694                 </fields>
6695                 <links>
6696                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6697                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6698                 </links>
6699         </class>
6700         <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">
6701                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6702                         <field name="object_id" reporter:datatype="text"/>
6703                         <field name="grantable" reporter:datatype="bool"/>
6704                         <field name="id" reporter:datatype="id" />
6705                         <field name="perm" reporter:datatype="link"/>
6706                         <field name="usr" reporter:datatype="link"/>
6707                         <field name="object_type" reporter:datatype="text"/>
6708                 </fields>
6709                 <links>
6710                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6711                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6712                 </links>
6713         </class>
6714         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
6715                 <fields oils_persist:primary="id" oils_persist:sequence="">
6716                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6717                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6718                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6719                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6720                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6721                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6722                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6723                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6724                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6725                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6726                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6727                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6728                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6729                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6730                 </fields>
6731                 <links>
6732                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6733                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6734                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6735                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6736                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6737                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6738                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6739                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6740                 </links>
6741         </class>
6742         <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">
6743                 <fields oils_persist:primary="id" oils_persist:sequence="">
6744                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6745                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6746                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6747                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6748                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6749                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6750                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6751                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6752                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6753                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6754                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6755                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6756                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6757                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6758                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6759                 </fields>
6760                 <links>
6761                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6762                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6763                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6764                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6765                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6766                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6767                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6768                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6769                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6770                 </links>
6771         </class>
6772         <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">
6773                 <fields oils_persist:primary="id" oils_persist:sequence="">
6774                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6775                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6776                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6777                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6778                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6779                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6780                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6781                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6782                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6783                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6784                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6785                 </fields>
6786                 <links>
6787                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6788                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6789                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6790                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6791                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6792                 </links>
6793         </class>
6794         <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">
6795                 <fields oils_persist:primary="id" oils_persist:sequence="">
6796                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6797                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6798                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6799                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6800                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6801                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6802                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6803                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6804                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6805                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6806                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6807                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6808                 </fields>
6809                 <links>
6810                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6811                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6812                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6813                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6814                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6815                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6816                 </links>
6817         </class>
6818         <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">
6819                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6820                         <field name="bucket" reporter:datatype="link"/>
6821                         <field name="id" reporter:datatype="id" />
6822                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6823                         <field name="create_time" reporter:datatype="timestamp" />
6824                         <field name="pos" reporter:datatype="int" />
6825                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6826                 </fields>
6827                 <links>
6828                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6829                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6830             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6831                 </links>
6832         </class>
6833         <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">
6834                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6835                         <field name="id" reporter:datatype="id" />
6836                         <field name="item" reporter:datatype="link"/>
6837                         <field name="note" reporter:datatype="text" />
6838                 </fields>
6839                 <links>
6840                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6841                 </links>
6842         </class>
6843         <class id="asce" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
6844                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6845                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6846                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6847                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6848                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6849                 </fields>
6850                 <links>
6851                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6852                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6853                 </links>
6854         </class>
6855     <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">
6856         <fields oils_persist:primary="field">
6857             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6858             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6859             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6860         </fields>
6861         <links/>
6862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6863             <actions>
6864                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6865                 <retrieve />
6866                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6867                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6868             </actions>
6869         </permacrud>
6870     </class>
6871         <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">
6872                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6873                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6874                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6875                 </fields>
6876                 <links/>
6877         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6878             <actions>
6879                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6880                 <retrieve/>
6881                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6882                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6883             </actions>
6884         </permacrud>
6885         </class>
6886
6887
6888         <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">
6889                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6890                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6891                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6892                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6893                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6894                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6895                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6896                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6897                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6898                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6899                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6900                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6901                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6902                 </fields>
6903                 <links>
6904                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6905                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6906                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6907                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6908                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6909                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6910                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6911                 </links>
6912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6913             <actions>
6914                 <create permission="TRANSIT_COPY">
6915                     <context link="target_copy" field="owner"/>
6916                 </create>
6917                 <retrieve/>
6918                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6919                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6920             </actions>
6921         </permacrud>
6922         </class>
6923         <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">
6924                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6925                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6926                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6927                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6928                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6929                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6930                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6931                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6932                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6933                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6934                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6935                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6936                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6937                 </fields>
6938                 <links>
6939                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6940                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6941                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6942                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6943                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6944                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6945                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6946                 </links>
6947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6948             <actions>
6949                 <create permission="TRANSIT_COPY" context_field="owner">
6950                     <context link="target_copy" field="circ_lib"/>
6951                 </create>
6952                 <retrieve/>
6953                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6954                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6955             </actions>
6956         </permacrud>
6957         </class>
6958         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6959                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6960                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6961                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6962                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6963                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6964                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6965                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6966                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6967                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6968                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6969                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6970                 </fields>
6971                 <links>
6972                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6973                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6974                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6975                 </links>
6976         </class>
6977         <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">
6978                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6979                         <field name="grp" />
6980                         <field name="id" reporter:datatype="id" />
6981                         <field name="usr" />
6982                 </fields>
6983                 <links>
6984                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6985                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6986                 </links>
6987         </class>
6988         <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">
6989                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6990                         <field name="id" reporter:datatype="id" />
6991                         <field name="fq_field" reporter:datatype="text"/>
6992                         <field name="identity_value" reporter:datatype="text"/>
6993                         <field name="translation" reporter:datatype="text"/>
6994                         <field name="string" reporter:datatype="text"/>
6995                 </fields>
6996                 <links>
6997                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6998                 </links>
6999         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7000             <actions>
7001                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7002                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7003                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7004                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7005             </actions>
7006         </permacrud>
7007         </class>
7008         <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">
7009                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7010                         <field name="id" reporter:datatype="id" />
7011                         <field name="fm_class" reporter:datatype="text"/>
7012                         <field name="field" reporter:datatype="text"/>
7013                         <field name="owner" reporter:datatype="org_unit"/>
7014                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7015                 </fields>
7016                 <links>
7017                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7018                 </links>
7019         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7020             <actions>
7021                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7022                 <retrieve/>
7023                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7024                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7025             </actions>
7026         </permacrud>
7027         </class>
7028         <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">
7029                 <fields oils_persist:primary="code">
7030                         <field name="code" reporter:datatype="id" />
7031                         <field name="marc_code" reporter:datatype="text"/>
7032                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7033                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7034                 </fields>
7035                 <links/>
7036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7037             <actions>
7038                 <create permission="CREATE_LOCALE" global_required="true"/>
7039                 <retrieve/>
7040                 <update permission="UPDATE_LOCALE" global_required="true"/>
7041                 <delete permission="DELETE_LOCALE" global_required="true"/>
7042             </actions>
7043         </permacrud>
7044         </class>
7045         <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">
7046                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7047                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7048                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7049                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7050             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7051                 </fields>
7052                 <links>
7053                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7054                 </links>
7055         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7056             <actions>
7057                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7058                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7059                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7060                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7061             </actions>
7062         </permacrud>
7063         </class>
7064
7065         <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">
7066                 <fields oils_persist:primary="id">
7067                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7068                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7069                 </fields>
7070                 <links/>
7071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7072             <actions>
7073                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7074                 <retrieve/>
7075                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7076                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7077             </actions>
7078         </permacrud>
7079         </class>
7080
7081         <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">
7082                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7083                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7084                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7085                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7086                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7087                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7088                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7089                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7090                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7091                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7092                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7093                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7094                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7095                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7096                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7097                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7098                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7099                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7100                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7101                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7102                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7103                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7104                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7105                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7106                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7107                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7108                 </fields>
7109                 <links>
7110                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7111                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7112                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7113                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7114                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7115                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7116                 </links>
7117         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7118             <actions>
7119                 <create permission="user_request.create">
7120                     <context link="usr" field="home_ou"/>
7121                                 </create>
7122                 <retrieve permission="user_request.view">
7123                     <context link="usr" field="home_ou"/>
7124                                 </retrieve>
7125                 <update permission="user_request.update">
7126                     <context link="usr" field="home_ou"/>
7127                                 </update>
7128                 <delete permission="user_request.delete">
7129                     <context link="usr" field="home_ou"/>
7130                                 </delete>
7131             </actions>
7132         </permacrud>
7133         </class>
7134
7135         <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">
7136                 <fields oils_persist:primary="code">
7137                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7138                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7139                 </fields>
7140                 <links/>
7141         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7142             <actions>
7143                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7144                 <retrieve/>
7145                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7146                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7147             </actions>
7148         </permacrud>
7149         </class>
7150
7151         <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">
7152                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7153                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7154                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7155                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7156                         <field reporter:label="Ratio" name="ratio" />
7157                 </fields>
7158                 <links>
7159                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7160                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7161                 </links>
7162                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7163                         <actions>
7164                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7165                                 <retrieve/>
7166                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7167                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7168                         </actions>
7169                 </permacrud>
7170         </class>
7171
7172         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7173                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7174                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7175                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7176                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7177                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7178                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7179                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7180                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7181                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7182                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7183                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7184                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7185                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7186                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7187                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7188                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7189                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7190                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7191                 </fields>
7192                 <links>
7193                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7194                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7195             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7196             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7197             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7198                 </links>
7199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7200             <actions>
7201                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7202                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7203                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7204                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7205             </actions>
7206         </permacrud>
7207         </class>
7208
7209         <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">
7210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7211                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7212                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7213                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7214                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7215                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7216                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7217                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7218                 </fields>
7219                 <links>
7220                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7221                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7222                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7223                 </links>
7224         </class>
7225
7226         <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">
7227                 <fields oils_persist:primary="code">
7228                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7229                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7230                 </fields>
7231                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7232             <actions>
7233                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7234                 <retrieve/>
7235                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7236                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7237             </actions>
7238                 </permacrud>
7239         </class>
7240
7241         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7242                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7243                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7244                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7245                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7246                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7247                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7248                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7249                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7250                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7251                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7252                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7253                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7254                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7255                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7256                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7257                 </fields>
7258                 <links>
7259                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7260                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7261                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7262                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7263                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7264                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7265                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7266                 </links>
7267         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7268             <actions>
7269                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7270                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7271                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7272                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7273             </actions>
7274         </permacrud>
7275         </class>
7276
7277         <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">
7278                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7279                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7280                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7281                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7282                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7283                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7284                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7285                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7286                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7287                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7288                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7289                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7290                 </fields>
7291                 <links>
7292                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7293                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7294                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7295                 </links>
7296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7297             <actions>
7298                 <create   permission="ADMIN_INVOICE">
7299                                         <context link="invoice" field="receiver"/>
7300                                 </create>
7301                 <retrieve permission="ADMIN_INVOICE">
7302                                         <context link="invoice" field="receiver"/>
7303                                 </retrieve>
7304                 <update   permission="ADMIN_INVOICE">
7305                                         <context link="invoice" field="receiver"/>
7306                                 </update>
7307                                 <delete   permission="ADMIN_INVOICE">
7308                                         <context link="invoice" field="receiver"/>
7309                                 </delete>
7310             </actions>
7311         </permacrud>
7312         </class>
7313
7314         <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">
7315                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7316                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7317                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7318                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7319                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7320                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7321                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7322                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7323                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7324                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7325                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7326                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7327                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7328                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7329                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7330                 </fields>
7331                 <links>
7332                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7333                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7334                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7335                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7336                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7337                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7338                 </links>
7339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340             <actions>
7341                 <create   permission="ADMIN_INVOICE">
7342                                         <context link="invoice" field="receiver"/>
7343                                 </create>
7344                 <retrieve permission="ADMIN_INVOICE">
7345                                         <context link="invoice" field="receiver"/>
7346                                 </retrieve>
7347                 <update   permission="ADMIN_INVOICE">
7348                                         <context link="invoice" field="receiver"/>
7349                                 </update>
7350                                 <delete   permission="ADMIN_INVOICE">
7351                                         <context link="invoice" field="receiver"/>
7352                                 </delete>
7353             </actions>
7354         </permacrud>
7355         </class>
7356
7357         <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">
7358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7359                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7360                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7361                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7362                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7363                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7364                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7365                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7366                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7367                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7368                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7369                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7370                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7371                 </fields>
7372                 <links>
7373                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7374                 </links>
7375         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7376             <actions>
7377                 <create permission="ADMIN_PROVIDER">
7378                     <context link="provider" field="owner"/>
7379                 </create>
7380                 <retrieve permission="ADMIN_PROVIDER">
7381                     <context link="provider" field="owner"/>
7382                 </retrieve>
7383                 <update permission="ADMIN_PROVIDER">
7384                     <context link="provider" field="owner"/>
7385                 </update>
7386                 <delete permission="ADMIN_PROVIDER">
7387                     <context link="provider" field="owner"/>
7388                 </delete>
7389             </actions>
7390         </permacrud>
7391         </class>
7392
7393         <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">
7394                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7395                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7396                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7397                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7398                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7399                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7400                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7401         </fields>
7402                 <links>
7403                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7404                 </links>
7405         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7406             <actions>
7407                 <create permission="ADMIN_PROVIDER">
7408                     <context link="provider" field="owner"/>
7409                 </create>
7410                 <retrieve permission="ADMIN_PROVIDER">
7411                     <context link="provider" field="owner"/>
7412                 </retrieve>
7413                 <update permission="ADMIN_PROVIDER">
7414                     <context link="provider" field="owner"/>
7415                 </update>
7416                 <delete permission="ADMIN_PROVIDER">
7417                     <context link="provider" field="owner"/>
7418                 </delete>
7419             </actions>
7420         </permacrud>
7421     </class>
7422         <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">
7423                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7424                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7425                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7426                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7427                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7428                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7429                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7430                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7431                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7432                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7433                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7434                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7435                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7436                 </fields>
7437                 <links>
7438                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7439                 </links>
7440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7441             <actions>
7442                 <create permission="ADMIN_PROVIDER">
7443                     <context link="contact" jump='provider' field="owner"/>
7444                 </create>
7445                 <retrieve permission="ADMIN_PROVIDER">
7446                     <context link="contact" jump='provider' field="owner"/>
7447                 </retrieve>
7448                 <update permission="ADMIN_PROVIDER">
7449                     <context link="contact" jump='provider' field="owner"/>
7450                 </update>
7451                 <delete permission="ADMIN_PROVIDER">
7452                     <context link="contact" jump='provider' field="owner"/>
7453                 </delete>
7454             </actions>
7455         </permacrud>
7456         </class>
7457
7458         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7459                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7460                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7461                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7462                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7463                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7464                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7465                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7466                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7467                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7468                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7469                 </fields>
7470                 <links>
7471                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7472                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7473                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7474                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7475                 </links>
7476         </class>
7477
7478         <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">
7479                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7480                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7481                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7482                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7483                 </fields>
7484                 <links>
7485             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7486                 </links>
7487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7488                         <actions>
7489                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7490                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7491                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7492                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7493                         </actions>
7494                 </permacrud>
7495         </class>
7496
7497         <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">
7498                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7499                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7500                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7501                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7502                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7503                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7504                 </fields>
7505                 <links>
7506                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7507                 </links>
7508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7509                         <actions>
7510                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7511                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7512                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7513                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7514                         </actions>
7515                 </permacrud>
7516         </class>
7517
7518         <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">
7519                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7520                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7521                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7522                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7523                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7524                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7525                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7526                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7527                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7528                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7529                 </fields>
7530                 <links>
7531                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7532                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7533             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7534             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7535                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7536                 </links>
7537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7538             <actions>
7539                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7540                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7541                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7542                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7543             </actions>
7544         </permacrud>
7545         </class>
7546
7547         <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">
7548                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7549                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7550                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7551                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7552                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7553                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7554                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7555                 </fields>
7556                 <links>
7557                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7558                 </links>
7559                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7560                         <actions>
7561                                 <create permission="ADMIN_FUNDING_SOURCE">
7562                     <context link="funding_source" field="owner"/>
7563                 </create>
7564                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7565                     <context link="funding_source" field="owner"/>
7566                 </retrieve>
7567                                 <update permission="ADMIN_FUNDING_SOURCE">
7568                     <context link="funding_source" field="owner"/>
7569                 </update>
7570                                 <delete permission="ADMIN_FUNDING_SOURCE">
7571                     <context link="funding_source" field="owner"/>
7572                 </delete>
7573                         </actions>
7574                 </permacrud>
7575         </class>
7576
7577         <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">
7578                 <fields oils_persist:primary="id">
7579                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7580                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7581                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7582                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7583                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7584                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7585                 </fields>
7586                 <links>
7587                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7588                 </links>
7589         </class>
7590
7591         <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">
7592                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7593                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7594                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7595                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7596                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7597                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7598                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7599                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7600                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7601                 </fields>
7602                 <links>
7603                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7604                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7605                 </links>
7606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7607                         <actions>
7608                                 <create permission="ADMIN_ACQ_FUND">
7609                     <context link="fund" field="org"/>
7610                 </create>
7611                                 <retrieve permission="ADMIN_ACQ_FUND">
7612                     <context link="fund" field="org"/>
7613                 </retrieve>
7614                                 <update permission="ADMIN_ACQ_FUND">
7615                     <context link="fund" field="org"/>
7616                 </update>
7617                                 <delete permission="ADMIN_ACQ_FUND">
7618                     <context link="fund" field="org"/>
7619                 </delete>
7620                         </actions>
7621                 </permacrud>
7622         </class>
7623
7624         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7625                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7626                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7627                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7628                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7629                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7630                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7631                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7632                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7633                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7634                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7635                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7636                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7637                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7638                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7639                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7640                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7641                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7642                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7643                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7644                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7645                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7646                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7647                 </fields>
7648                 <links>
7649                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7650                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7651             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7652             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7653             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7654             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7655             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7656             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7657             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7658             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7659             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7660                 </links>
7661         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7662             <actions>
7663                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7664                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7665                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7666                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7667             </actions>
7668         </permacrud>
7669         </class>
7670
7671         <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">
7672                 <fields oils_persist:primary="fund">
7673                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7674                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7675                 </fields>
7676                 <links>
7677                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7678                 </links>
7679         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7680             <actions>
7681                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7682                                         <context link="fund" field="org" />
7683                 </retrieve>
7684             </actions>
7685         </permacrud>
7686         </class>
7687
7688         <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">
7689                 <fields oils_persist:primary="fund">
7690                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7691                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7692                 </fields>
7693                 <links>
7694                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7695                 </links>
7696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7697             <actions>
7698                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7699                                         <context link="fund" field="org" />
7700                 </retrieve>
7701             </actions>
7702         </permacrud>
7703         </class>
7704
7705         <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">
7706                 <fields oils_persist:primary="fund">
7707                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7708                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7709                 </fields>
7710                 <links>
7711                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7712                 </links>
7713         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7714             <actions>
7715                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7716                                         <context link="fund" field="org" />
7717                 </retrieve>
7718             </actions>
7719         </permacrud>
7720         </class>
7721
7722         <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">
7723                 <fields oils_persist:primary="fund">
7724                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7725                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7726                 </fields>
7727                 <links>
7728                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7729                 </links>
7730         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7731             <actions>
7732                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7733                                         <context link="fund" field="org" />
7734                 </retrieve>
7735             </actions>
7736         </permacrud>
7737         </class>
7738
7739         <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">
7740                 <fields oils_persist:primary="fund">
7741                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7742                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7743                 </fields>
7744                 <links>
7745                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7746                 </links>
7747         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7748             <actions>
7749                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7750                                         <context link="fund" field="org" />
7751                 </retrieve>
7752             </actions>
7753         </permacrud>
7754         </class>
7755
7756    <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">
7757         <fields oils_persist:primary="fund">
7758             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7759             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7760         </fields>
7761         <links>
7762             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7763         </links>
7764     </class>
7765
7766    <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">
7767         <fields oils_persist:primary="fund">
7768             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7769             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7770         </fields>
7771         <links>
7772             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7773         </links>
7774     </class>
7775
7776    <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">
7777         <fields oils_persist:primary="fund">
7778             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7779             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7780         </fields>
7781         <links>
7782             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7783         </links>
7784     </class>
7785
7786    <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">
7787         <fields oils_persist:primary="fund">
7788             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7789             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7790         </fields>
7791         <links>
7792             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7793         </links>
7794     </class>
7795
7796    <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">
7797         <fields oils_persist:primary="fund">
7798             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7799             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7800         </fields>
7801         <links>
7802             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7803         </links>
7804     </class>
7805
7806         <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">
7807                 <fields oils_persist:primary="funding_source">
7808                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7809                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7810                 </fields>
7811                 <links>
7812                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7813                 </links>
7814         </class>
7815
7816         <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">
7817                 <fields oils_persist:primary="funding_source">
7818                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7819                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7820                 </fields>
7821                 <links>
7822                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7823                 </links>
7824         </class>
7825
7826         <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">
7827                 <fields oils_persist:primary="funding_source">
7828                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7829                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7830                 </fields>
7831                 <links>
7832                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7833                 </links>
7834         </class>
7835
7836         <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">
7837                 <fields oils_persist:primary="fund">
7838                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7839                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7840                 </fields>
7841                 <links>
7842                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7843                 </links>
7844         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7845             <actions>
7846                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7847                                         <context link="fund" field="org" />
7848                 </retrieve>
7849             </actions>
7850         </permacrud>
7851     </class>
7852     <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">
7853         <oils_persist:source_definition><![CDATA[
7854             SELECT
7855                 acqf.*,
7856                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7857                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7858                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7859                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7860             FROM
7861                 acq.fund acqf
7862                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7863                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7864                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7865                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7866         ]]></oils_persist:source_definition>
7867         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7868             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7869             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7870             <field reporter:label="Name" name="name" reporter:datatype="text" />
7871             <field reporter:label="Year" name="year" reporter:datatype="int" />
7872             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7873             <field reporter:label="Code" name="code" reporter:datatype="text" />
7874             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7875             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7876             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7877             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7878             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7879
7880             <!-- non fund-native fields -->
7881             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7882             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7883             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7884             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7885         </fields>
7886         <links>
7887             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7888             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7889             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7890         </links>
7891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7892             <actions>
7893                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7894             </actions>
7895         </permacrud>
7896         </class>
7897         <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">
7898                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7899                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7900                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7901                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7902                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7903                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7904                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7905                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7906                 </fields>
7907                 <links>
7908                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7909                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7910                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7911                 </links>
7912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7913                         <actions>
7914                                 <create permission="ADMIN_ACQ_FUND">
7915                     <context link="fund" field="org"/>
7916                 </create>
7917                                 <retrieve permission="ADMIN_ACQ_FUND">
7918                     <context link="fund" field="org"/>
7919                 </retrieve>
7920                                 <update permission="ADMIN_ACQ_FUND">
7921                     <context link="fund" field="org"/>
7922                 </update>
7923                                 <delete permission="ADMIN_ACQ_FUND">
7924                     <context link="fund" field="org"/>
7925                 </delete>
7926                         </actions>
7927                 </permacrud>
7928         </class>
7929
7930     <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">
7931         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7932             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7933             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7934             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7935             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7936             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7937             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7938             <field reporter:label="Note" name="note" reporter:datatype="text" />
7939             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7940         </fields>
7941         <links>
7942             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7943             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7944             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7945         </links>
7946                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7947                         <actions>
7948                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7949                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7950                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7951                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7952                         </actions>
7953                 </permacrud>
7954     </class>
7955
7956         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7957                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7958                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7959                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7960                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7961                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7962                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7963                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7964                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7965                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7966                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7967                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7968                 </fields>
7969                 <links>
7970                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7971                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7972                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7973                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7974                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7975                 </links>
7976                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7977                         <actions>
7978                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7979                         </actions>
7980                 </permacrud>
7981         </class>
7982
7983         <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">
7984                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7985                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7986                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7987                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7988                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7989                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7990                 </fields>
7991                 <links>
7992                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7993                 </links>
7994                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7995                         <actions>
7996                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7997                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7998                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7999                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8000                         </actions>
8001                 </permacrud>
8002         </class>
8003
8004         <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">
8005                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8006                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8007                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8008                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8009                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8010                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8011                         <field reporter:label="State" name="state" reporter:datatype="text" />
8012                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8013                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8014                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8015                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8016                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8017                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8018                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8019                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8020                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8021                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8022                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8023                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8024                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8025                 </fields>
8026                 <links>
8027                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8028                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8029                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8030                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8031                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8032                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8033                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8034                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8035                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8036                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8037                 </links>
8038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8039                         <actions>
8040                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8041                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8042                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8043                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8044                         </actions>
8045                 </permacrud>
8046         </class>
8047
8048         <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">
8049                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8050                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8051                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8052                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8053                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8054                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8055                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8056                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8057                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8058                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8059                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8060                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8061                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8062                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8063                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8064                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8065                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8066                 </fields>
8067                 <links>
8068                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8069                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8070                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8071                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8072                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8073                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8074                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8075                 </links>
8076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8077             <actions>
8078                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8079             </actions>
8080                 </permacrud>
8081         </class>
8082
8083         <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">
8084                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8085                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8086                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8087                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8088                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8089                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8090                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8091                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8092                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8093                 </fields>
8094                 <links>
8095                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8096                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8097                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8098                 </links>
8099                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8100             <actions>
8101                 <create permission="CREATE_PURCHASE_ORDER">
8102                     <context link="purchase_order" field="ordering_agency"/>
8103                 </create>
8104                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8105                     <context link="purchase_order" field="ordering_agency"/>
8106                 </retrieve>
8107                 <update permission="CREATE_PURCHASE_ORDER">
8108                     <context link="purchase_order" field="ordering_agency"/>
8109                 </update>
8110                 <delete permission="CREATE_PURCHASE_ORDER">
8111                     <context link="purchase_order" field="ordering_agency"/>
8112                 </delete>
8113             </actions>
8114                 </permacrud>
8115         </class>
8116
8117         <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">
8118                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8119                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8120                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8121                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8122                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8123                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8124                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8125                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8126                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8127                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8128                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8129                 </fields>
8130                 <links>
8131                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8132                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8133                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8134                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8135                 </links>
8136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8137             <actions>
8138                 <create permission="CREATE_PURCHASE_ORDER">
8139                     <context link="purchase_order" field="ordering_agency"/>
8140                 </create>
8141                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8142                     <context link="purchase_order" field="ordering_agency"/>
8143                 </retrieve>
8144                 <update permission="CREATE_PURCHASE_ORDER">
8145                     <context link="purchase_order" field="ordering_agency"/>
8146                 </update>
8147                 <delete permission="CREATE_PURCHASE_ORDER">
8148                     <context link="purchase_order" field="ordering_agency"/>
8149                 </delete>
8150             </actions>
8151                 </permacrud>
8152         </class>
8153
8154         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8155                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8156                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8157                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8158                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8159                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8160                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8161                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8162                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8163                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8164                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8165                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8166                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8167                         <field reporter:label="State" name="state" reporter:datatype="text" />
8168                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8169                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8170                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8171                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8172                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8173                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8174                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8175                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8176                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8177                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8178                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8179                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8180                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8181                 </fields>
8182                 <links>
8183                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8184                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8185                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8186                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8187                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8188                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8189                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8190                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8191                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8192                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8193                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8194                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8195                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8196                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8197                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8198                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8199                 </links>
8200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8201                         <actions>
8202                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8203                                         <context link="purchase_order" field="ordering_agency"/>
8204                                         <context link="picklist" field="org_unit"/>
8205                                 </retrieve>
8206                         </actions>
8207                 </permacrud>
8208         </class>
8209
8210         <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">
8211                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8212                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8213                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8214                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8215                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8216                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8217                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8218                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8219                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8220                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8221                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8222                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8223                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8224                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8225                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8226                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8227                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8228                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8229                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8230                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8231                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8232                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8233                 </fields>
8234                 <links>
8235                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8236                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8237                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8238                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8239                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8240                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8241                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8242                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8243                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8244                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8245                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8246                 </links>
8247                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8248                         <actions>
8249                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8250                                         <context link="purchase_order" field="ordering_agency"/>
8251                                         <context link="picklist" field="org_unit"/>
8252                                 </retrieve>
8253                         </actions>
8254                 </permacrud>
8255         </class>
8256
8257         <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">
8258                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8259                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8260                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8261                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8262                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8263                 </fields>
8264                 <links>
8265                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8266                 </links>
8267                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8268                         <actions>
8269                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8270                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8271                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8272                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8273                         </actions>
8274                 </permacrud>
8275         </class>
8276
8277         <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">
8278                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8279                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8280                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8281                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8282                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8283                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8284                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8285                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8286                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8287                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8288                 </fields>
8289                 <links>
8290                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8291                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8292                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8293                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8294                 </links>
8295         </class>
8296
8297         <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">
8298                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8299                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8300                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8301                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8302                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8303                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8304                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8305                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8306                 </fields>
8307                 <links>
8308                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8309                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8310                 </links>
8311         </class>
8312
8313         <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">
8314                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8315                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8316                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8317                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8318                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8319                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8320                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8321                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8322                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8323                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8324                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8325                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8326                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8327                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8328                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8329                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8330                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8331                 </fields>
8332                 <links>
8333                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8334                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8335                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8336                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8337                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8338                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8339                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8340                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8341                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8342                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8343                 </links>
8344         </class>
8345
8346         <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">
8347                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8348                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8349                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8350                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8351                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8352                 </fields>
8353                 <links/>
8354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8355                         <actions>
8356                                 <retrieve />
8357                         </actions>
8358                 </permacrud>
8359         </class>
8360
8361         <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">
8362                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8363                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8364                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8365                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8366                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8367                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8368             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8369                 </fields>
8370                 <links/>
8371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8372             <actions>
8373                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8374                 <retrieve />
8375                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8376                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8377             </actions>
8378         </permacrud>
8379         </class>
8380
8381         <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">
8382                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8383                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8384                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8385                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8386                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8387                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8388                 </fields>
8389                 <links/>
8390         </class>
8391         <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">
8392                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8393                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8394                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8395                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8396                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8397                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8398                 </fields>
8399                 <links>
8400                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8401                 </links>
8402         </class>
8403
8404         <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">
8405             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8406                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8407                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8408                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8409                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8410                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8411                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8412         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8413
8414             </fields>
8415             <links>
8416                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8417             </links>
8418             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8419                 <actions>
8420                     <create permission="ADMIN_PROVIDER">
8421                         <context link="provider" field="owner"/>
8422                     </create>
8423                     <retrieve permission="ADMIN_PROVIDER">
8424                         <context link="provider" field="owner"/>
8425                     </retrieve>
8426                     <update permission="ADMIN_PROVIDER">
8427                         <context link="provider" field="owner"/>
8428                     </update>
8429                     <delete permission="ADMIN_PROVIDER">
8430                         <context link="provider" field="owner"/>
8431                     </delete>
8432                 </actions>
8433             </permacrud>
8434         </class>
8435         
8436         <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">
8437             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8438                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8439                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8440                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8441                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8442             </fields>
8443             <links>
8444                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8445             </links>
8446             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8447                 <actions>
8448                     <create permission="ADMIN_PROVIDER">
8449                         <context link="provider" field="owner"/>
8450                     </create>
8451                     <retrieve permission="ADMIN_PROVIDER">
8452                         <context link="provider" field="owner"/>
8453                     </retrieve>
8454                     <update permission="ADMIN_PROVIDER">
8455                         <context link="provider" field="owner"/>
8456                     </update>
8457                     <delete permission="ADMIN_PROVIDER">
8458                         <context link="provider" field="owner"/>
8459                     </delete>
8460                 </actions>
8461             </permacrud>
8462         </class>
8463         
8464         <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">
8465             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8466                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8467                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8468                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8469                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8470                 </fields>
8471                 <links/>
8472         </class>
8473
8474         <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">
8475                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8476                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8477                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8478                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8479                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8480                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8481                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8482                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8483                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8484                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8485                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8486                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8487                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8488                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8489                 </fields>
8490                 <links>
8491                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8492                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8493                 </links>
8494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8495             <actions>
8496                 <create permission="ADMIN_PROVIDER">
8497                     <context link="provider" field="owner"/>
8498                 </create>
8499                 <retrieve permission="ADMIN_PROVIDER">
8500                     <context link="provider" field="owner"/>
8501                 </retrieve>
8502                 <update permission="ADMIN_PROVIDER">
8503                     <context link="provider" field="owner"/>
8504                 </update>
8505                 <delete permission="ADMIN_PROVIDER">
8506                     <context link="provider" field="owner"/>
8507                 </delete>
8508             </actions>
8509         </permacrud>
8510         </class>
8511
8512         <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">
8513                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8514                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8515                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8516                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8517                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8518                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8519                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8520                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8521                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8522                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8523                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8524                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8525                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8526                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8527                 </fields>
8528                 <links>
8529                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8530                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8531                 </links>
8532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8533             <actions>
8534                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8535                     <context link="account" jump="provider" field="owner"/>
8536                 </retrieve>
8537                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8538                     <context link="account" jump="provider" field="owner"/>
8539                 </update>
8540                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8541                     <context link="account" jump="provider" field="owner"/>
8542                 </delete>
8543             </actions>
8544         </permacrud>
8545         </class>
8546
8547
8548         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8549                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8550                         <field name="id" reporter:datatype="id" />
8551                         <field name="parent" reporter:datatype="link"/>
8552                         <field name="owner" reporter:datatype="link"/>
8553                         <field name="create_time" reporter:datatype="timestamp"/>
8554                         <field name="name" reporter:datatype="text"/>
8555                         <field name="shared" reporter:datatype="bool"/>
8556                         <field name="share_with" reporter:datatype="link"/>
8557                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8558                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8559                 </fields>
8560                 <links>
8561                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8562                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8563                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8564                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8565                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8566                 </links>
8567         </class>
8568         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8569                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8570                         <field name="id" reporter:datatype="id" />
8571                         <field name="parent" reporter:datatype="link"/>
8572                         <field name="owner" reporter:datatype="link"/>
8573                         <field name="create_time" reporter:datatype="timestamp"/>
8574                         <field name="name" reporter:datatype="text"/>
8575                         <field name="shared" reporter:datatype="bool"/>
8576                         <field name="share_with" reporter:datatype="link"/>
8577                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8578                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8579                 </fields>
8580                 <links>
8581                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8582                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8583                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8584                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8585                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8586                 </links>
8587         </class>
8588         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8589                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8590                         <field name="id" reporter:datatype="id" />
8591                         <field name="parent" reporter:datatype="link"/>
8592                         <field name="owner" reporter:datatype="link"/>
8593                         <field name="create_time" reporter:datatype="timestamp"/>
8594                         <field name="name" reporter:datatype="text"/>
8595                         <field name="shared" reporter:datatype="bool"/>
8596                         <field name="share_with" reporter:datatype="link"/>
8597                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8598                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8599                 </fields>
8600                 <links>
8601                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8602                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8603                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8604                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8605                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8606                 </links>
8607         </class>
8608         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8609                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8610                         <field name="id" reporter:datatype="id" />
8611                         <field name="owner" reporter:datatype="link"/>
8612                         <field name="create_time" reporter:datatype="timestamp"/>
8613                         <field name="name" reporter:datatype="text"/>
8614                         <field name="data" reporter:datatype="text"/>
8615                         <field name="folder" reporter:datatype="link"/>
8616                         <field name="description" reporter:datatype="text"/>
8617                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8618                 </fields>
8619                 <links>
8620                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8621                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8622                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8623                 </links>
8624         </class>
8625         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8626                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8627                         <field name="id" reporter:datatype="id" />
8628                         <field name="owner" reporter:datatype="link"/>
8629                         <field name="create_time" reporter:datatype="timestamp"/>
8630                         <field name="template" reporter:datatype="link"/>
8631                         <field name="data" reporter:datatype="text"/>
8632                         <field name="folder" reporter:datatype="link"/>
8633                         <field name="recur" reporter:datatype="bool"/>
8634                         <field name="recurrence" reporter:datatype="interval"/>
8635                         <field name="name" reporter:datatype="text"/>
8636                         <field name="description" reporter:datatype="text"/>
8637                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8638                 </fields>
8639                 <links>
8640                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8641                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8642                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8643                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8644                 </links>
8645         </class>
8646         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8647                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8648                         <field name="id" reporter:datatype="id" />
8649                         <field name="runner" reporter:datatype="link"/>
8650                         <field name="start_time" reporter:datatype="timestamp"/>
8651                         <field name="complete_time" reporter:datatype="timestamp"/>
8652                         <field name="run_time" reporter:datatype="timestamp"/>
8653                         <field name="email" reporter:datatype="text"/>
8654                         <field name="excel_format" reporter:datatype="bool"/>
8655                         <field name="csv_format" reporter:datatype="bool"/>
8656                         <field name="html_format" reporter:datatype="bool"/>
8657                         <field name="error_code" reporter:datatype="int"/>
8658                         <field name="error_text" reporter:datatype="text"/>
8659                         <field name="report" reporter:datatype="link"/>
8660                         <field name="folder" reporter:datatype="link"/>
8661                         <field name="chart_pie" reporter:datatype="bool"/>
8662                         <field name="chart_bar" reporter:datatype="bool"/>
8663                         <field name="chart_line" reporter:datatype="bool"/>
8664                 </fields>
8665                 <links>
8666                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8667                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8668                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8669                 </links>
8670         </class>
8671         <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">
8672                 <fields oils_persist:primary="id">
8673                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8674                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8675                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8676                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8677                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8678                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8679                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8680                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8681                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8682                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8683                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8684                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8685                 </fields>
8686                 <links>
8687                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8688                 </links>
8689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8690                         <actions>
8691                                 <retrieve />
8692                         </actions>
8693                 </permacrud>
8694         </class>
8695         <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">
8696                 <fields oils_persist:primary="id">
8697                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8698                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8699                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8700                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8701                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8702                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8703                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8704                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8705                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8706                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8707                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8708                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8709                 </fields>
8710                 <links>
8711                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8712                 </links>
8713         </class>
8714         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8715                 <fields oils_persist:primary="id">
8716                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8717                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8718                         <field reporter:label="Fingerprint" name="fingerprint" />
8719                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8720                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8721                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8722                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8723                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8724                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8725                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8726                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8727                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8728                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8729                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8730                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8731                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8732                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8733                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8734                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8735                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8736                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8737                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8738                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8739                 </fields>
8740                 <links>
8741                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8742                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8743                 </links>
8744         </class>
8745         <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">
8746                 <fields oils_persist:primary="id">
8747                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8748                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8749                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8750                 </fields>
8751                 <links>
8752                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8753                 </links>
8754         </class>
8755         <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">
8756                 <fields oils_persist:primary="id">
8757                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8758                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8759                 </fields>
8760                 <links>
8761                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8762                 </links>
8763         </class>
8764         <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">
8765                 <fields oils_persist:primary="id">
8766                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8767                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8768                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8769                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8770                 </fields>
8771                 <links>
8772                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8773                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8774                 </links>
8775         </class>
8776         <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">
8777                 <fields oils_persist:primary="xact">
8778                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8779                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8780                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8781                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8782                 </fields>
8783                 <links>
8784                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8785                 </links>
8786         </class>
8787         <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">
8788                 <fields oils_persist:primary="xact">
8789                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8790                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8791                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8792                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8793                 </fields>
8794                 <links>
8795                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8796                 </links>
8797         </class>
8798         <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)">
8799                 <fields oils_persist:primary="id">
8800                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8801                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8802                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8803                 </fields>
8804                 <links>
8805                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8806                 </links>
8807         </class>
8808         <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">
8809                 <fields oils_persist:primary="id">
8810                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8811                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8812                 </fields>
8813                 <links>
8814                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8815                 </links>
8816         </class>
8817         <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">
8818                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8819                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8820                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8821                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8822                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8823                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8824                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8825                 </fields>
8826                 <links>
8827                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8828                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8829                 </links>
8830                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8831                         <actions>
8832                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8833                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8834                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8835                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8836                         </actions>
8837                 </permacrud>
8838         </class>
8839         <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">
8840                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8841                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8842                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8843                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8844                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8845                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8846                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8847                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8848                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8849                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8850                 </fields>
8851                 <links>
8852                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8853                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8854                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8855                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8856                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8857                 </links>
8858                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8859                         <actions>
8860                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8861                                         <context link="formula" field="owner"/>
8862                                 </create>
8863                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8864                                         <context link="formula" field="owner"/>
8865                                 </retrieve>
8866                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8867                                         <context link="formula" field="owner"/>
8868                                 </update>
8869                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8870                                         <context link="formula" field="owner"/>
8871                                 </delete>
8872                         </actions>
8873                 </permacrud>
8874         </class>
8875
8876         <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">
8877                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8878                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8879                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8880                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8881                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8882                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8883                 </fields>
8884                 <links>
8885                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8886                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8887                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8888                 </links>
8889                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8890                         <actions>
8891                                 <create permission="CREATE_PURCHASE_ORDER">
8892                                         <context link="formula" field="owner"/>
8893                 </create>
8894                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8895                                         <context link="formula" field="owner"/>
8896                 </retrieve>
8897                                 <update permission="CREATE_PURCHASE_ORDER">
8898                                         <context link="formula" field="owner"/>
8899                 </update>
8900                                 <delete permission="CREATE_PURCHASE_ORDER">
8901                                         <context link="formula" field="owner"/>
8902                 </delete>
8903                         </actions>
8904                 </permacrud>
8905         </class>
8906
8907         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8908                 <fields oils_persist:primary="id">
8909                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8910                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8911                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8912                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8913                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8914                 </fields>
8915                 <links>
8916                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8917                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8918                 </links>
8919         </class>
8920
8921         <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">
8922                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8923                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8924                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8925                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8926                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8927                 </fields>
8928                 <links>
8929                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8930                 </links>
8931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8932                         <actions>
8933                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8934                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8935                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8936                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8937                         </actions>
8938                 </permacrud>
8939         </class>
8940
8941         <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">
8942                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8943                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8944                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8945                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8946                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8947                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8948                 </fields>
8949                 <links>
8950                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8951                 </links>
8952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8953                         <actions>
8954                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8955                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8956                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8957                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8958                         </actions>
8959                 </permacrud>
8960         </class>
8961
8962         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8963                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8964                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8965                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8966                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8967                 </fields>
8968                 <links>
8969                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8970                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8971                 </links>
8972         </class>
8973
8974         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8975                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8976                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8977                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8978                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8979                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8980                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8981                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8982                 </fields>
8983                 <links>
8984                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8985                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8986                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8987                 </links>
8988         </class>
8989
8990         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8991                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8992                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8993                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8994                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8995                 </fields>
8996                 <links>
8997                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8998                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8999                 </links>
9000         </class>
9001
9002         <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">
9003                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9004                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9005                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9006                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9007                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9008                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9009                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9010                 </fields>
9011                 <links>
9012                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9013                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9014                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9015                 </links>
9016         </class>
9017
9018         <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">
9019                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9020                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9021                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9022                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9023                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9024                 </fields>
9025                 <links>
9026                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9027                 </links>
9028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9029             <actions>
9030                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9031                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9032                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9033                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9034             </actions>
9035                 </permacrud>
9036         </class>
9037
9038         <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">
9039                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9040                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9041                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9042                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9043                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9044                 </fields>
9045                 <links>
9046                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9047                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9048                 </links>
9049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9050                         <actions>
9051                                 <create permission="ADMIN_CLAIM_POLICY">
9052                                         <context link="claim_policy" field="org_unit"/>
9053                 </create>
9054                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9055                                         <context link="claim_policy" field="org_unit"/>
9056                 </retrieve>
9057                                 <update permission="ADMIN_CLAIM_POLICY">
9058                                         <context link="claim_policy" field="org_unit"/>
9059                 </update>
9060                                 <delete permission="ADMIN_CLAIM_POLICY">
9061                                         <context link="claim_policy" field="org_unit"/>
9062                 </delete>
9063                         </actions>
9064                 </permacrud>
9065         </class>
9066
9067     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9068         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9069             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9070             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9071             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9072             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9073             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9074             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9075             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9076             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9077             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9078             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9079             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9080             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9081             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9082             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9083             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9084             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9085         </fields>
9086         <links>
9087             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9088         </links>
9089     </class>
9090
9091     <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">
9092         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9093             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9094             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9095             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9096             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9097             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9098         </fields>
9099     </class>
9100
9101     <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">
9102         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9103             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9104             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9105             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9106             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9107             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9108             <field reporter:label="City" name="city" reporter:datatype="text"/>
9109             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9110             <field reporter:label="State" name="state" reporter:datatype="text"/>
9111             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9112             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9113             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9114         </fields>
9115     </class>
9116
9117     <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">
9118         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9119             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9120             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9121             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9122             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9123             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9124             <field reporter:label="City" name="city" reporter:datatype="text"/>
9125             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9126             <field reporter:label="State" name="state" reporter:datatype="text"/>
9127             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9128             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9129             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9130         </fields>
9131     </class>
9132
9133     <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">
9134         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9135             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9136             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9137             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9138             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9139             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9140             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9141         </fields>
9142     </class>
9143
9144         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9145                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9146                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9147                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9148                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9149                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9150                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9151                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9152                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9153                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9154                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9155                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9156                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9157                 </fields>
9158                 <links>
9159                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9160                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9161                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9162                 </links>
9163         </class>
9164
9165         <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">
9166                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9167                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9168                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9169                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9170                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9171                 </fields>
9172                 <links>
9173                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9174                 </links>
9175         </class>
9176
9177     <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">
9178         <fields>
9179             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9180             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9181             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9182         </fields>
9183                 <links>
9184                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9185                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9186                 </links>
9187     </class>
9188
9189     <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">
9190         <fields>
9191             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9192             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9193         </fields>
9194                 <links>
9195                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9196                 </links>
9197     </class>
9198
9199     <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">
9200         <fields>
9201             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9202             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9203             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9204         </fields>
9205                 <links>
9206                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9207                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9208                 </links>
9209     </class>
9210
9211     <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">
9212         <fields>
9213             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9214             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9215         </fields>
9216                 <links>
9217                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9218                 </links>
9219     </class>
9220
9221     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9222                 <oils_persist:source_definition>
9223
9224             SELECT  DISTINCT l.*
9225               FROM  action.unfulfilled_hold_loops l
9226                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9227               WHERE l.count = m.max
9228
9229                 </oils_persist:source_definition>
9230         <fields>
9231             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9232             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9233             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9234         </fields>
9235                 <links>
9236                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9237                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9238                 </links>
9239     </class>
9240
9241         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9242                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9243                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9244                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9245                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9246                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9247                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9248                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9249                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9250                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9251                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9252                 </fields>
9253                 <links>
9254                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9255                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9256                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9257                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9258                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9259                 </links>
9260         </class>
9261
9262         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9263                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9264                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9265                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9266                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9267                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9268                 </fields>
9269                 <links>
9270                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9271                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9272                 </links>
9273         </class>
9274
9275         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9276                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9277                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9278                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9279                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9280                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9281                 </fields>
9282                 <links>
9283                 </links>
9284         </class>
9285
9286         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9287                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9288                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9289                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9290                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9291                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9292                 </fields>
9293                 <links>
9294                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9295                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9296                 </links>
9297         </class>
9298         
9299         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9300                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9301                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9302                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9303                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9304                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9305                 </fields>
9306                 <links>
9307                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9308                 </links>
9309         </class>
9310         
9311         <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">
9312                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9313                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9314                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9315                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9316                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9317                 </fields>
9318                 <links>
9319                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9320                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9321                 </links>
9322         </class>
9323
9324         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9325                 <fields oils_persist:primary="name">
9326                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9327                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9328                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9329                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9330                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9331                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9332                 </fields>
9333                 <links>
9334                 </links>
9335         </class>
9336
9337         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9338                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9339                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9340                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9341                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9342                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9343                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9344                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9345                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9346                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9347                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9348                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9349                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9350                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9351                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9352                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9353                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9354                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9355                 </fields>
9356                 <links>
9357                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9358                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9359                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9360                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9361                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9362                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9363                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9364                 </links>
9365         </class>
9366
9367         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9368                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9369                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9370                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9371                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9372                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9373                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9374                 </fields>
9375                 <links>
9376                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9377                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9378                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9379                 </links>
9380         </class>
9381
9382         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9383                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9384                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9385                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9386                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9387                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9388                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9389                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9390                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9391                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9392                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9393                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9394                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9395                 </fields>
9396                 <links>
9397                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9398                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9399                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9400                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9401                 </links>
9402         </class>
9403
9404         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9405                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9406                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9407                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9408                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9409                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9410                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9411                 </fields>
9412                 <links>
9413                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9414                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9415                 </links>
9416         </class>
9417
9418         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9419                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9420                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9421                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9422                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9423                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9424                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9425                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9426                 </fields>
9427                 <links>
9428                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9429                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9430                 </links>
9431         </class>
9432
9433         <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">
9434                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9435                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9436                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9437                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9438                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9439                 </fields>
9440                 <links>
9441                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9442                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9443                 </links>
9444         </class>
9445
9446         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9447                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9448                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9449                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9450                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9451                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9452                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9453                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9454                 </fields>
9455                 <links>
9456                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9457                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9458                 </links>
9459         </class>
9460
9461         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9462                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9463                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9464                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9465                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9466                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9467                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9468                 </fields>
9469                 <links>
9470                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9471                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9472                 </links>
9473         </class>
9474
9475         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9476                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9477                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9478                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9479                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9480                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9481                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9482                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9483                 </fields>
9484                 <links>
9485                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9486                 </links>
9487         </class>
9488
9489         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9490                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9491                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9492                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9493                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9494                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9495                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9496                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9497                 </fields>
9498                 <links>
9499                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9500                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9501                 </links>
9502         </class>
9503
9504         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9505                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9506                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9507                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9508                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9509                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9510                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9511                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9512                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9513                 </fields>
9514                 <links>
9515                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9516                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9517                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9518                 </links>
9519         </class>
9520
9521         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9522                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9523                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9524                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9525                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9526                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9527                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9528                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9529                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9530                 </fields>
9531                 <links>
9532                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9533                 </links>
9534         </class>
9535
9536         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9537                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9538                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9539                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9540                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9541                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9542                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9543                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9544                 </fields>
9545                 <links>
9546                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9547                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9548                 </links>
9549         </class>
9550
9551         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9552                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9553                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9554                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9555                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9556                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9557                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9558                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9559                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9560                 </fields>
9561                 <links>
9562                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9563                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9564                 </links>
9565         </class>
9566
9567         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9568                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9569                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9570                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9571                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9572                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9573                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9574                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9575                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9576                 </fields>
9577                 <links>
9578                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9579                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9580                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9581                 </links>
9582         </class>
9583
9584         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9585                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9586                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9587                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9588                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9589                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9590                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9591                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9592                 </fields>
9593                 <links>
9594                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9595                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9596                 </links>
9597         </class>
9598
9599         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9600                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9601                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9602                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9603                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9604                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9605                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9606                 </fields>
9607                 <links>
9608                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9609                 </links>
9610         </class>
9611
9612         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9613                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9614                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9615                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9616                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9617                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9618                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9619                 </fields>
9620                 <links>
9621                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9622                 </links>
9623         </class>
9624
9625         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9626                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9627                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9628                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9629                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9630                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9631                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9632                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9633                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9634                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9635                 </fields>
9636                 <links>
9637                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9638                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9639                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9640                 </links>
9641         </class>
9642
9643         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9644                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9645                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9646                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9647                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9648                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9649                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9650                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9651                 </fields>
9652                 <links>
9653                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9654                 </links>
9655         </class>
9656
9657         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9658                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9659                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9660                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9661                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9662                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9663                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9664                 </fields>
9665                 <links>
9666                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9667                 </links>
9668         </class>
9669
9670         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9671                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9672                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9673                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9674                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9675                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9676                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9677                 </fields>
9678                 <links>
9679                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9680                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9681                 </links>
9682         </class>
9683
9684         <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">
9685                 <fields oils_persist:primary="id">
9686                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9687                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9688                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9689                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9690                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9691                 </fields>
9692                 <links>
9693                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9694                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9695                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9696                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9697                 </links>
9698         </class>
9699
9700         <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">
9701                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9702                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9703                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9704                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9705                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9706                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9707                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9708                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9709                 </fields>
9710                 <links/>
9711                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9712                         <actions>
9713                                 <retrieve/>
9714                         </actions>
9715                 </permacrud>
9716         </class>
9717
9718         <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">
9719                 <fields oils_persist:primary="ptype_key">
9720                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9721                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9722                 </fields>
9723                 <links/>
9724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9725                         <actions>
9726                                 <retrieve/>
9727                         </actions>
9728                 </permacrud>
9729         </class>
9730
9731         <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">
9732                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9733                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9734                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9735                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9736                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9737                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9738                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9739                 </fields>
9740                 <links>
9741                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9742                 </links>
9743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9744                         <actions>
9745                                 <retrieve/>
9746                         </actions>
9747                 </permacrud>
9748         </class>
9749
9750         <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">
9751                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9752                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9753                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9754                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9755                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9756                 </fields>
9757                 <links>
9758                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9759                 </links>
9760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9761                         <actions>
9762                                 <retrieve/>
9763                         </actions>
9764                 </permacrud>
9765         </class>
9766
9767     <class
9768         id="uvs"
9769         controller="open-ils.cstore open-ils.pcrud"
9770         oils_obj:fieldmapper="url_verify::session"
9771         oils_persist:tablename="url_verify.session"
9772         reporter:label="URL Verification Session"
9773     >
9774         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9775             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9776             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9777                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9778             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9779             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9780             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9781             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9782             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9783             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9784         </fields>
9785
9786         <links>
9787             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9788             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9789             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9790             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9791             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9792         </links>
9793
9794         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9795             <actions>
9796                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9797             </actions>
9798         </permacrud>
9799
9800     </class>
9801
9802     <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">
9803         <oils_persist:source_definition>
9804             SELECT
9805                 cbrebi.id AS id,  -- so we can have a pkey in our view
9806                 uvs.id AS session,
9807                 uvs.owning_lib,
9808                 cbrebi.target_biblio_record_entry
9809             FROM url_verify.session uvs
9810             JOIN container.biblio_record_entry_bucket cbreb
9811                 ON (uvs.container = cbreb.id)
9812             JOIN container.biblio_record_entry_bucket_item cbrebi
9813                 ON (cbrebi.bucket = cbreb.id)
9814         </oils_persist:source_definition>
9815         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9816             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9817             <field reporter:label="Session" name="session" reporter:datatype="link" />
9818             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9819             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9820         </fields>
9821         <links>
9822             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9823             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9824             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9825         </links>
9826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9827             <actions>
9828                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9829             </actions>
9830         </permacrud>
9831     </class>
9832
9833     <class
9834         id="uvus"
9835         controller="open-ils.cstore open-ils.pcrud"
9836         oils_obj:fieldmapper="url_verify::url_selector"
9837         oils_persist:tablename="url_verify.url_selector"
9838         reporter:label="URL Verification URL Selector"
9839     >
9840         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9841             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9842             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9843                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9844             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9845         </fields>
9846
9847         <links>
9848             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9849             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9850         </links>
9851
9852         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9853             <actions>
9854                 <create permission="URL_VERIFY">
9855                     <context link="session" field="owning_lib"/>
9856                 </create>
9857                 <retrieve permission="URL_VERIFY">
9858                     <context link="session" field="owning_lib"/>
9859                 </retrieve>
9860                 <update permission="URL_VERIFY">
9861                     <context link="session" field="owning_lib"/>
9862                 </update>
9863                 <delete permission="URL_VERIFY">
9864                     <context link="session" field="owning_lib"/>
9865                 </delete>
9866             </actions>
9867         </permacrud>
9868
9869     </class>
9870
9871     <class
9872         id="uvu"
9873         controller="open-ils.cstore open-ils.pcrud"
9874         oils_obj:fieldmapper="url_verify::url"
9875         oils_persist:tablename="url_verify.url"
9876         reporter:label="URL Verification URL"
9877     >
9878         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9879             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9880                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9881                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9882                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9883                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9884             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9885             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9886             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9887             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9888             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9889             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9890             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9891             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9892             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9893             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9894             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9895             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9896             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9897         </fields>
9898
9899         <links>
9900             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9901             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9902             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9903             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9904             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9905         </links>
9906
9907         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9908             <actions>
9909                 <create permission="URL_VERIFY">
9910                     <context link="session" field="owning_lib"/>
9911                 </create>
9912                 <retrieve permission="URL_VERIFY">
9913                     <context link="session" field="owning_lib"/>
9914                 </retrieve>
9915                 <update permission="URL_VERIFY">
9916                     <context link="session" field="owning_lib"/>
9917                 </update>
9918                 <delete permission="URL_VERIFY">
9919                     <context link="session" field="owning_lib"/>
9920                 </delete>
9921             </actions>
9922         </permacrud>
9923
9924     </class>
9925
9926     <class
9927         id="uvva"
9928         controller="open-ils.cstore open-ils.pcrud"
9929         oils_obj:fieldmapper="url_verify::verification_attempt"
9930         oils_persist:tablename="url_verify.verification_attempt"
9931         reporter:label="URL Verification Attempt"
9932     >
9933         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9934             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9935                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9936                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9937             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9938             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9939         </fields>
9940
9941         <links>
9942             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9943             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9944         </links>
9945
9946         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9947             <actions>
9948                 <create permission="URL_VERIFY">
9949                     <context link="session" field="owning_lib"/>
9950                 </create>
9951                 <retrieve permission="URL_VERIFY">
9952                     <context link="session" field="owning_lib"/>
9953                 </retrieve>
9954                 <update permission="URL_VERIFY">
9955                     <context link="session" field="owning_lib"/>
9956                 </update>
9957                 <delete permission="URL_VERIFY">
9958                     <context link="session" field="owning_lib"/>
9959                 </delete>
9960             </actions>
9961         </permacrud>
9962
9963     </class>
9964
9965     <class
9966         id="uvuv"
9967         controller="open-ils.cstore open-ils.pcrud"
9968         oils_obj:fieldmapper="url_verify::url_verification"
9969         oils_persist:tablename="url_verify.url_verification"
9970         reporter:label="URL Verification"
9971     >
9972         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9973             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9974                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9975                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9976             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9977             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9978             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9979             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9980                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9981         </fields>
9982
9983         <links>
9984             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9985             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9986             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9987         </links>
9988
9989         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9990             <actions>
9991                 <create permission="URL_VERIFY">
9992                     <context link="attempt" jump="session" field="owning_lib"/>
9993                 </create>
9994                 <retrieve permission="URL_VERIFY">
9995                     <context link="attempt" jump="session" field="owning_lib"/>
9996                 </retrieve>
9997                 <update permission="URL_VERIFY">
9998                     <context link="attempt" jump="session" field="owning_lib"/>
9999                 </update>
10000                 <delete permission="URL_VERIFY">
10001                     <context link="attempt" jump="session" field="owning_lib"/>
10002                 </delete>
10003             </actions>
10004         </permacrud>
10005
10006     </class>
10007
10008         <class
10009                 id="cfdi"
10010                 controller="open-ils.cstore open-ils.pcrud"
10011                 oils_obj:fieldmapper="config::filter_dialog_interface"
10012                 oils_persist:tablename="config.filter_dialog_interface"
10013                 reporter:label="FilterDialog Interface">
10014                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10015                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10016                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10017                 </fields>
10018                 <links>
10019                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10020                 </links>
10021                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10022                         <actions>
10023                                 <retrieve />
10024                         </actions>
10025                 </permacrud>
10026         </class>
10027
10028         <class
10029                 id="cfdfs"
10030                 controller="open-ils.cstore open-ils.pcrud"
10031                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10032                 oils_persist:tablename="config.filter_dialog_filter_set"
10033                 reporter:label="FilterDialog Filter Set">
10034                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10035                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10036                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10037                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10038                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10039                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10040                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10041                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10042                 </fields>
10043                 <links>
10044                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10045                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10046                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10047                 </links>
10048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10049                         <actions>
10050                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10051                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10052                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10053                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10054                         </actions>
10055                 </permacrud>
10056
10057         </class>
10058
10059         <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">
10060                 <fields oils_persist:primary="code">
10061                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10062                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10063                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10064                 </fields>
10065                 <links/>
10066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10067                         <actions>
10068                                 <retrieve/>
10069                         </actions>
10070                 </permacrud>
10071         </class>
10072
10073         <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">
10074                 <oils_persist:source_definition>
10075
10076             SELECT  b.id,
10077                     MAX(dcp.edit_date) AS last_delete_date
10078              FROM   biblio.record_entry b
10079                     JOIN asset.call_number cn ON (cn.record = b.id)
10080                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10081              WHERE  NOT b.deleted
10082              GROUP BY b.id
10083              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10084
10085                 </oils_persist:source_definition>
10086                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10087                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10088                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10089                 </fields>
10090                 <links>
10091                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10092                 </links>
10093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10094                         <actions>
10095                                 <retrieve/>
10096                         </actions>
10097                 </permacrud>
10098         </class>
10099
10100         <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">
10101                 <oils_persist:source_definition>
10102
10103             -- -- 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.
10104             -- -- 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
10105             -- -- may not.
10106             -- SELECT
10107             --     bre.id AS "bib_id",
10108             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10109             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10110             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10111             -- FROM (
10112                 SELECT
10113                     y.bre AS "id",
10114                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10115                     y.hold_count AS "hold_count",
10116                     (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"
10117                 FROM (
10118                         SELECT
10119                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10120                             COUNT(*) AS "hold_count"
10121                         FROM action.hold_request h
10122                         WHERE
10123                             cancel_time IS NULL
10124                             AND fulfillment_time IS NULL
10125                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10126                         GROUP BY 1
10127                     )y LEFT JOIN (
10128                         SELECT 
10129                             (SELECT id
10130                                 FROM biblio.record_entry 
10131                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
10132                             ) AS "bre", 
10133                             COUNT(*) AS "copy_count"
10134                         FROM asset.copy
10135                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10136                         WHERE copy.holdable 
10137                             AND NOT copy.deleted 
10138                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10139                         GROUP BY 1
10140                     )x ON x.bre = y.bre
10141                 -- )z RIGHT JOIN (
10142                 --     SELECT id
10143                 --     FROM biblio.record_entry
10144                 --     WHERE NOT deleted
10145                 -- )bre ON (z.bib_id = bre.id)
10146                 
10147
10148                 </oils_persist:source_definition>
10149                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10150                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10151                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10152                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10153                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10154                 </fields>
10155                 <links>
10156                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10157                 </links>
10158                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10159                         <actions>
10160                                 <retrieve/>
10161                         </actions>
10162                 </permacrud>
10163         </class>
10164
10165         <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">
10166                 <oils_persist:source_definition>
10167             SELECT *,
10168                 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,
10169                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10170             FROM
10171                 (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
10172                     FROM
10173                         action.hold_request ahr
10174                         JOIN reporter.hold_request_record rhrr USING (id)
10175                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10176                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10177                     WHERE
10178                         ahr.cancel_time IS NULL
10179                         AND ahr.fulfillment_time IS NULL
10180                     GROUP BY bib_record, pickup_lib
10181                 )x
10182                 JOIN
10183                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10184                     FROM
10185                         action.hold_request ahr
10186                         JOIN reporter.hold_request_record rhrr USING (id)
10187                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10188                     WHERE
10189                         ahr.cancel_time IS NULL
10190                         AND ahr.fulfillment_time IS NULL
10191                     GROUP BY bib_record
10192                 )y
10193                 USING (id)
10194                 </oils_persist:source_definition>
10195                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10196                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10197                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10198                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10199                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10200                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10201                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10202                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10203                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10204                 </fields>
10205                 <links>
10206                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10207                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10208                 </links>
10209                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10210                         <actions>
10211                                 <retrieve/>
10212                         </actions>
10213                 </permacrud>
10214         </class>
10215
10216         <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">
10217                 <oils_persist:source_definition>
10218             SELECT
10219                 ac.id,
10220                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10221                 MAX(actac.xact_start) AS last_circ
10222             FROM asset.copy ac
10223                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10224             GROUP BY ac.id
10225
10226             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10227             --SELECT
10228             --    ac.id,
10229             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10230             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10231             --FROM asset.copy ac
10232             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10233             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10234             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10235                 </oils_persist:source_definition>
10236                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10237                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10238                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10239                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10240                 </fields>
10241                 <links>
10242                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10243                 </links>
10244                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10245                         <actions>
10246                                 <retrieve/>
10247                         </actions>
10248                 </permacrud>
10249         </class>
10250
10251         <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">
10252                 <fields oils_persist:primary="id">
10253                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10254                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10255                 </fields>
10256                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10257                         <actions>
10258                                 <retrieve/>
10259                         </actions>
10260                 </permacrud>
10261         </class>
10262
10263         <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">
10264                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10265                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10266                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10267                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10268                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10269                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10270                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10271                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10272                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10273                 </fields>
10274                 <links>
10275                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10276                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10277                 </links>
10278                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10279                         <actions>
10280                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10281                                 <retrieve/>
10282                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10283                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10284                         </actions>
10285                 </permacrud>
10286         </class>
10287
10288         <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">
10289                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10290                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10291                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10292                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10293                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10294                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10295                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10296                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10297                 </fields>
10298                 <links>
10299                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10300                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10301                 </links>
10302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10303                         <actions>
10304                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10305                                 <retrieve/>
10306                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10307                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10308                         </actions>
10309                 </permacrud>
10310         </class>
10311
10312
10313         <!-- ********************************************************************************************************************* -->
10314         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10315         <!-- ********************************************************************************************************************* -->
10316         <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">
10317                 <fields oils_persist:primary="id">
10318                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10319                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10320                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10321                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10322                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10323                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10324                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10325                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10326                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10327                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10328                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10329                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10330                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10331                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10332                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10333                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10334                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10335                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10336                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10337                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10338                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10339                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10340                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10341                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10342                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10343                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10344                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10345                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10346                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10347                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10348                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10349                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10350                 </fields>
10351                 <links>
10352                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10353                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10354                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10355                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10356                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10357                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10358                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10359                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10360                 </links>
10361         </class>
10362
10363         <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">
10364                 <fields oils_persist:primary="id">
10365                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10366                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10367                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10368                 </fields>
10369                 <links>
10370                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10371                 </links>
10372         </class>
10373
10374         <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">
10375                 <fields oils_persist:primary="id">
10376                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10377                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10378                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10379                 </fields>
10380                 <links>
10381                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10382                 </links>
10383         </class>
10384
10385         <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">
10386                 <fields oils_persist:primary="id">
10387                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10388
10389                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10390                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10391                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10392
10393                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10394                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10395                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10396
10397                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10398                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10399
10400                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10401                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10402                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10403
10404                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10405                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10406
10407                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10408                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10409                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10410
10411                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10412                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10413                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10414
10415                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10416                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10417                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10418                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10419
10420                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10421                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10422
10423                 </fields>
10424                 <links>
10425                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10426                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10427                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10428                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10429                 </links>
10430         </class>
10431
10432         <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">
10433                 <oils_persist:source_definition>
10434
10435             SELECT
10436                 po.ordering_agency AS ordering_agency,
10437                 po.id AS purchase_order,
10438                 li.id AS lineitem,
10439                 lid.id AS lineitem_detail,
10440                 cpa.id AS claim_policy_action
10441             FROM
10442                 acq.lineitem_detail lid
10443                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10444                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10445                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10446                 JOIN acq.claim_policy_action cpa ON (
10447                     cpa.claim_policy = cp.id
10448
10449                     -- we only care about claim policy actions whose claim
10450                     -- interval we'd reached or exceeded
10451                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10452
10453                     -- filter out all claim policy actions where claim events
10454                     -- have occurred on or after the action's action_interval
10455                     AND NOT EXISTS (
10456                         SELECT 1
10457                         FROM
10458                             acq.claim_event evt
10459                             JOIN acq.claim claim ON (
10460                                 claim.id = evt.claim
10461                                 AND claim.lineitem_detail = lid.id
10462                             )
10463                         WHERE
10464                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10465                     )
10466                 )
10467             WHERE
10468                 lid.cancel_reason IS NULL
10469                 AND li.cancel_reason IS NULL -- belt/suspenders
10470                 AND po.cancel_reason IS NULL -- belt/suspenders
10471                 AND lid.recv_time IS NULL
10472                 AND po.state = 'on-order'
10473             ORDER BY 1, 2, 3, 4, 5
10474
10475                 </oils_persist:source_definition>
10476                 <fields>
10477                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10478                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10479                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10480                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10481                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10482                 </fields>
10483                 <links>
10484                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10485                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10486                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10487                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10488                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10489                 </links>
10490         </class>
10491         <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">
10492                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10493                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10494                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10495                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10496                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10497                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10498                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10499                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10500                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10501                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10502                 </fields>
10503                 <links>
10504                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10505                 </links>
10506     </class>
10507         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10508                 <oils_persist:source_definition>
10509             SELECT * FROM acq.lineitem_summary 
10510                                 WHERE item_count > (invoice_count + cancel_count)
10511         </oils_persist:source_definition>
10512                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10513                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10514                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10515                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10516                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10517                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10518                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10519                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10520                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10521                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10522                 </fields>
10523                 <links>
10524                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10525                 </links>
10526     </class>
10527         <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">
10528                 <oils_persist:source_definition>
10529
10530                         SELECT  t.*
10531                           FROM  action.transit_copy t
10532                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10533                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10534                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10535
10536                 </oils_persist:source_definition>
10537                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10538                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10539                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10540                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10541                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10542                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10543                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10544                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10545                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10546                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10547                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10548                 </fields>
10549                 <links>
10550                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10551                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10552                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10553                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10554                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10555                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10556                 </links>
10557         </class>
10558
10559     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10560                 <oils_persist:source_definition>
10561
10562         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10563                 SELECT
10564                         cp.id as copy,
10565                         COUNT(circ.id),
10566                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10567                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10568                 FROM
10569                         asset.copy cp
10570                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10571                 GROUP BY 1, 3, 4
10572                 UNION ALL
10573                 SELECT
10574                         cp.id as copy,
10575                         COUNT(circ.id),
10576                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10577                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10578                 FROM
10579                         asset.copy cp
10580                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10581                 GROUP BY 1, 3, 4
10582                 UNION ALL
10583                 SELECT
10584                         id as copy,
10585                         circ_count,
10586                         -1 AS year,
10587                         false as is_renewal
10588                 FROM
10589                         extend_reporter.legacy_circ_count
10590         )x GROUP BY 1, 3, 4
10591
10592                 </oils_persist:source_definition>
10593         <fields>
10594             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10595             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10596             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10597             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10598         </fields>
10599                 <links>
10600                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10601                 </links>
10602                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10603                         <actions>
10604                                 <retrieve/>
10605                         </actions>
10606                 </permacrud>
10607     </class>
10608
10609         <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">
10610                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10611                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10612                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10613                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10614                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10615                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10616                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10617                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10618                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10619                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10620                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10621                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10622                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10623                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10624                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10625                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10626                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10627                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10628                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10629                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10630                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10631                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10632                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10633                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10634                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10635                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10636                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10637                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10638                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10639                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10640                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10641                 </fields>
10642                 <links>
10643                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10644                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10645                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10646                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10647                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10648                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10649                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10650                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10651                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10652                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10653                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10654                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10655                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10656                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10657                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10658                 </links>
10659         </class>
10660
10661     <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">
10662         <fields oils_persist:primary="id">
10663             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10664             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10665             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10666             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10667             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10668             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10669             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10670             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10671             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10672             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10673             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10674             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10675             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10676             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10677             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10678             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10679             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10680             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10681             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10682             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10683             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10684             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10685             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10686             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10687             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10688             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10689             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10690             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10691             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10692             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10693             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10694             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10695             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10696             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10697         </fields>
10698         <links>
10699             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10700             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10701             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10702             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10703             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10704         </links>
10705     </class>
10706
10707     <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">
10708         <fields oils_persist:primary="id">
10709             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10710             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10711             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10712             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10713         </fields>
10714         <links>
10715             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10716             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10717         </links>
10718     </class>
10719
10720     <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">
10721         <fields oils_persist:primary="owning_lib">
10722             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10723             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10724             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10725         </fields>
10726         <links>
10727             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10728         </links>
10729     </class>
10730
10731     <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">
10732         <fields oils_persist:primary="id">
10733             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10734             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10735             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10736             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10737             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10738         </fields>
10739         <links>
10740             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10741             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10742             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10743         </links>
10744     </class>
10745
10746     <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">
10747         <fields oils_persist:primary="circ_lib">
10748             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10749             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10750             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10751             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10752         </fields>
10753         <links>
10754             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10755             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10756         </links>
10757     </class>
10758
10759     <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">
10760         <fields oils_persist:primary="id">
10761             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10762             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10763             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10764             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10765             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10766         </fields>
10767         <links>
10768             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10769             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10770             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10771         </links>
10772     </class>
10773
10774     <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">
10775         <fields oils_persist:primary="home_ou">
10776             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10777             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10778             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10779             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10780         </fields>
10781         <links>
10782             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10783             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10784         </links>
10785     </class>
10786         <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">
10787                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10788                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10789                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10790                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10791                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10792                 </fields>
10793                 <links>
10794                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10795                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10796                 </links>
10797                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10798                         <actions>
10799                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10800                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10801                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10802                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10803                         </actions>
10804                 </permacrud>
10805         </class>
10806         <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">
10807                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10808                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10809                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10810                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10811                 </fields>
10812                 <links>
10813                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10814                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10815                         </links>
10816                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10817                 <actions>
10818                                 <create permission="ADMIN_ACQ_FUND_TAG">
10819                                         <context link="tag" field="owner"/>
10820                                 </create>
10821                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10822                                         <context link="tag" field="owner"/>
10823                                 </retrieve>
10824                                 <update permission="ADMIN_ACQ_FUND_TAG">
10825                                         <context link="tag" field="owner"/>
10826                                 </update>
10827                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10828                                         <context link="tag" field="owner"/>
10829                                 </delete>
10830                         </actions>
10831                 </permacrud>
10832         </class>
10833         <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">
10834                 <oils_persist:source_definition><![CDATA[
10835                 SELECT
10836                         poi.purchase_order AS purchase_order,
10837                         ii.invoice AS invoice,
10838                         NULL AS lineitem,
10839                         poi.id AS po_item,
10840                         NULL AS picklist
10841                 FROM
10842                         acq.po_item poi
10843                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10844                 UNION SELECT
10845                         jub.purchase_order AS purchase_order,
10846                         ie.invoice AS invoice,
10847                         jub.id AS lineitem,
10848                         NULL AS po_item,
10849                         jub.picklist AS picklist
10850                 FROM
10851                         acq.lineitem jub
10852                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10853                 UNION SELECT
10854                         ii.purchase_order AS purchase_order,
10855                         ii.invoice AS invoice,
10856                         NULL AS lineitem,
10857                         NULL AS po_item,
10858                         NULL AS picklist
10859                 FROM
10860                         acq.invoice_item ii
10861                 WHERE ii.po_item IS NULL
10862                 UNION SELECT
10863                         ie.purchase_order AS purchase_order,
10864                         ie.invoice AS invoice,
10865                         NULL AS lineitem,
10866                         NULL AS po_item,
10867                         NULL AS picklist
10868                 FROM
10869                         acq.invoice_entry ie
10870                 WHERE ie.lineitem IS NULL
10871                 UNION SELECT
10872                         NULL AS purchase_order,
10873                         NULL AS invoice,
10874                         jub.id AS lineitem,
10875                         NULL AS po_item,
10876                         jub.picklist AS picklist
10877                 FROM
10878                         acq.lineitem jub
10879                 WHERE jub.purchase_order IS NULL
10880                 ]]></oils_persist:source_definition>
10881                 <fields>
10882                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10883                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10884                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10885                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10886                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10887                 </fields>
10888                 <links>
10889                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10890                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10891                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10892                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10893                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10894                 </links>
10895         </class>
10896         <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">
10897                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10899                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10900                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10901                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10902                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10903                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10904                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10905                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10906                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10907                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10908                 </fields>
10909                 <links>
10910                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10911                 </links>
10912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10913                         <actions>
10914                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10915                                 <retrieve/>
10916                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10917                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10918                         </actions>
10919                 </permacrud>
10920         </class>
10921
10922         <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">
10923                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10924                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10925                         <field name="date_applied" reporter:datatype="timestamp"/>
10926                         <field name="org" reporter:datatype="org_unit"/>
10927                         <field name="original_value" reporter:datatype="text"/>
10928                         <field name="new_value" reporter:datatype="text"/>
10929                         <field name="field_name" reporter:datatype="link"/>
10930                 </fields>
10931                 <links>
10932                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10933                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10934                 </links>
10935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10936                         <actions>
10937                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10938                                 <retrieve/>
10939                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10940                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10941                         </actions>
10942                 </permacrud>
10943         </class>
10944         <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">
10945                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10946                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10947                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10948                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10949                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10950                 </fields>
10951                 <links>
10952                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10953                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10954                 </links>
10955         </class>
10956         <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">
10957                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10958                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10959                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10960                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10961                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10962                 </fields>
10963                 <links>
10964                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10965                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10966                 </links>
10967         </class>
10968         <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">
10969                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
10970                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10971                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10972                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
10973                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
10974                 </fields>
10975                 <links>
10976                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
10977                 </links>
10978                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10979                         <actions>
10980                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10981                                 <retrieve/>
10982                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10983                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
10984                         </actions>
10985                 </permacrud>
10986         </class>
10987         <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">
10988                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
10989                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10990                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
10991                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
10992                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
10993                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
10994                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
10995                 </fields>
10996                 <links>
10997                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
10998                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
10999                 </links>
11000                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11001                         <actions>
11002                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11003                                 <retrieve/>
11004                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11005                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11006                         </actions>
11007                 </permacrud>
11008         </class>
11009
11010         <!-- ********************************************************************************************************************* -->
11011
11012 </IDL>
11013
11014 <!--
11015     vim:noet:ts=4:sw=4:
11016 -->