]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Allow translation of acq.cancel_reason texts.
[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="vqbr"/>
608                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
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="Filter?" name="filter" reporter:datatype="bool"/>
788                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
789                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
790                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
791                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
792                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
793                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
794                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
795                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
796                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
797                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
798                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
799                 </fields>
800                 <links>
801                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
802                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
803                 </links>
804         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
805             <actions>
806                 <create permission="ADMIN_SVF" global_required="true"/>
807                 <retrieve/>
808                 <update permission="ADMIN_SVF" global_required="true"/>
809                 <delete permission="ADMIN_SVF" global_required="true"/>
810             </actions>
811         </permacrud>
812         </class>
813
814         <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">
815                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
818                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
819             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
820                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
821                 </fields>
822                 <links/>
823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824             <actions>
825                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
826                 <retrieve/>
827                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
829             </actions>
830         </permacrud>
831         </class>
832
833         <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">
834                 <fields oils_persist:primary="id">
835                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
836                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
837                 </fields>
838                 <links>
839                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
840                 </links>
841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
842             <actions>
843                 <retrieve/>
844             </actions>
845         </permacrud>
846         </class>
847
848         <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">
849                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
851                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
852                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
853                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
854                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
855                 </fields>
856                 <links>
857                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
858                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
859                 </links>
860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
861             <actions>
862                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
863                 <retrieve/>
864                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
865                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
866             </actions>
867         </permacrud>
868         </class>
869
870         <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">
871                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
872                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
873                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
874                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
875                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
876                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
877                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
878                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
879             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
880                 </fields>
881                 <links>
882                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
883                 </links>
884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
885             <actions>
886                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
887                 <retrieve/>
888                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
889                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
890             </actions>
891         </permacrud>
892         </class>
893
894         <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">
895                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
896                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
897                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
898                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
899                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
900                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
901                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
902                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
903                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
904                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
905                 </fields>
906                 <links>
907                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
908                 </links>
909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
910             <actions>
911                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
912                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
913                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
914                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
915             </actions>
916         </permacrud>
917         </class>
918
919     <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">
920         <fields oils_persist:primary="name">
921             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
922             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
923             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
924             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
925             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
926             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
927             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
928             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
929             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
930             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
931         </fields>
932         <links>
933             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
934             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
935         </links>
936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937             <actions>
938                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
939                 <retrieve/>
940                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
941                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
942             </actions>
943         </permacrud>
944     </class>
945
946     <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">
947         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
948             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
949             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
950             <field reporter:label="Name" name="name" reporter:datatype="text"/>
951             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
952             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
953             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
954             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
955         </fields>
956         <links>
957             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
962                 <retrieve/>
963                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
964                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
965             </actions>
966         </permacrud>
967     </class>
968
969     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
970                         oils_obj:fieldmapper="config::z3950_index_field_map" 
971                         oils_persist:tablename="config.z3950_index_field_map" 
972                         reporter:label="Z39.50 Index Field Map">
973         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
974             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
975             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
976             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
977             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
978             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
979             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
980         </fields>
981         <links>
982             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
983             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
984             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
985         </links>
986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
987             <actions>
988                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
989                 <retrieve/>
990                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
991                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
992             </actions>
993         </permacrud>
994     </class>
995
996
997         <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">
998                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
999                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1000                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1001                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1002                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1003                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1004                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1005                 </fields>
1006                 <links>
1007             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1008             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1009                 </links>
1010                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1011                         <actions>
1012                                 <retrieve/>
1013                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1014                         </actions>
1015                 </permacrud>
1016         </class>
1017
1018         <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">
1019                 <fields oils_persist:primary="key">
1020                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1021                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1022                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1023                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1024                 </fields>
1025                 <links/>
1026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1027                         <actions>
1028                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1029                                 <retrieve/>
1030                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1031                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1032                         </actions>
1033                 </permacrud>
1034         </class>
1035
1036         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1037                 <fields oils_persist:primary="module">
1038                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1039                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1040                 </fields>
1041                 <links/>
1042         </class>
1043
1044         <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">
1045                 <fields oils_persist:primary="module">
1046                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1047                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1048                 </fields>
1049                 <links/>
1050                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1051                         <actions>
1052                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1053                                 <retrieve/>
1054                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1055                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1056                         </actions>
1057                 </permacrud>
1058         </class>
1059
1060         <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">
1061                 <fields oils_persist:primary="module">
1062                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1063                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1064                 </fields>
1065                 <links/>
1066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1067                         <actions>
1068                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1069                                 <retrieve/>
1070                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1071                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1072                         </actions>
1073                 </permacrud>
1074         </class>
1075
1076         <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">
1077                 <fields oils_persist:primary="module">
1078                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1079                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1080                 </fields>
1081                 <links/>
1082                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1083                         <actions>
1084                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1085                                 <retrieve/>
1086                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1087                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1088                         </actions>
1089                 </permacrud>
1090         </class>
1091
1092         <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">
1093                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1094                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1095                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1096                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1097                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1098                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1099                 </fields>
1100                 <links>
1101                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1102                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1103                 </links>
1104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1105                         <actions>
1106                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1107                     <context link="event_def" field="owner"/>
1108                 </create>
1109                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1110                     <context link="event_def" field="owner"/>
1111                 </retrieve>
1112                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1113                     <context link="event_def" field="owner"/>
1114                 </update>
1115                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1116                     <context link="event_def" field="owner"/>
1117                 </delete>
1118                         </actions>
1119                 </permacrud>
1120         </class>
1121
1122         <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">
1123                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1124                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1125                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1126                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1127                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1128                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1129                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1130                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1131                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1132                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1133                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1134                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1135                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1136                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1137                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1138                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1139                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1140                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1141                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1142                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1143                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1144                 </fields>
1145                 <links>
1146                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1147                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1148                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1149                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1150                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1151                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1152                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1153                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1154                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1155                 </links>
1156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1157                         <actions>
1158                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1159                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1160                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1161                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1162                         </actions>
1163                 </permacrud>
1164         </class>
1165
1166         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1167                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1168                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1169                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1170                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1171                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1172                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1173                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1174                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1175                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1176                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1177                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1178                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1179                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1180                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1181                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1182                 </fields>
1183                 <links>
1184                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1185                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1186                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1187                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1188                 </links>
1189         </class>
1190
1191         <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">
1192                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1193                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1194                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1195                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1196                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1197                 </fields>
1198                 <links>
1199                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1200                 </links>
1201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1202                         <actions>
1203                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1204                     <context link="event_def" field="owner"/>
1205                 </create>
1206                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1207                     <context link="event_def" field="owner"/>
1208                 </retrieve>
1209                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1210                     <context link="event_def" field="owner"/>
1211                 </update>
1212                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1213                     <context link="event_def" field="owner"/>
1214                 </delete>
1215                         </actions>
1216                 </permacrud>
1217         </class>
1218
1219         <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">
1220                 <oils_persist:source_definition><![CDATA[
1221                 SELECT  atevdef.hook,
1222                         atevdef.name,
1223                         atevdef.reactor,
1224                         atev.id,
1225                         atev.event_def,
1226                         atev.add_time,
1227                         atev.run_time,
1228                         atev.start_time,
1229                         atev.update_time,
1230                         atev.complete_time,
1231                         atev.update_process,
1232                         atev.state,
1233                         atev.user_data,
1234                         atev.template_output,
1235                         atev.error_output,
1236                         atev.async_output,
1237                         targ_circ.id AS target_circ,
1238                         targ_ahr.id AS target_hold,
1239                         COALESCE(
1240                                 targ_circ.circ_lib,
1241                                 targ_ahr.pickup_lib
1242                         ) AS perm_lib
1243                 FROM action_trigger.event atev
1244                 JOIN action_trigger.event_definition atevdef ON
1245                         (atevdef.id = atev.event_def)
1246                 JOIN action_trigger.hook ath ON
1247                         (ath.key = atevdef.hook)
1248                 LEFT JOIN action.circulation targ_circ ON
1249                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1250                 LEFT JOIN action.hold_request targ_ahr ON
1251                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1252                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1253                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1254                                 'circ.staff.max_visible_event_age',
1255                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1256                         ) UNION
1257                         SELECT '1000 YEARS'::INTERVAL AS value
1258                 ) ous)
1259                 ]]></oils_persist:source_definition>
1260                 <fields oils_persist:primary="id">
1261                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1262                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1263                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1264                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1265                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1266                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1267                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1268                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1269                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1270                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1271                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1272                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1273                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1274                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1275                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1276                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1277                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1278                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1279                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1280                 </fields>
1281                 <links>
1282                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1283                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1284                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1285                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1286                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1287                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1288                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1289                 </links>
1290                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1291                         <actions>
1292                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1293                         </actions>
1294                 </permacrud>
1295         </class>
1296
1297         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1298                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1299                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1300                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1301                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1302                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1303                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1304                 </fields>
1305                 <links>
1306                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1307                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1308                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1309                 </links>
1310         </class>
1311
1312         <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">
1313                 <fields oils_persist:primary="code">
1314                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1315                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1316                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1317                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1318                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1319                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1320                 </fields>
1321                 <links/>
1322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1323             <actions>
1324                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1325                 <retrieve/>
1326                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1327                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1328             </actions>
1329         </permacrud>
1330         </class>
1331
1332         <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">
1333                 <fields oils_persist:primary="code">
1334                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1335                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1336                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1337                 </fields>
1338                 <links/>
1339         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1340             <actions>
1341                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1342                 <retrieve/>
1343                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1344                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1345             </actions>
1346         </permacrud>
1347         </class>
1348
1349         <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">
1350                 <fields oils_persist:primary="code">
1351                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1352                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1353                 </fields>
1354                 <links/>
1355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1356             <actions>
1357                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1358                 <retrieve/>
1359                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1360                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1361             </actions>
1362         </permacrud>
1363         </class>
1364
1365         <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">
1366                 <fields oils_persist:primary="code">
1367                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1368                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1369                 </fields>
1370                 <links/>
1371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1372             <actions>
1373                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1374                 <retrieve/>
1375                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1376                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1377             </actions>
1378         </permacrud>
1379         </class>
1380
1381         <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">
1382                 <fields oils_persist:primary="code">
1383                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1384                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1385                 </fields>
1386                 <links/>
1387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1388             <actions>
1389                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1390                 <retrieve/>
1391                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1392                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1393             </actions>
1394         </permacrud>
1395         </class>
1396
1397         <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">
1398                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1399                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1400                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1401                 </fields>
1402                 <links/>
1403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1404             <actions>
1405                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1406                 <retrieve/>
1407                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1408                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1409             </actions>
1410         </permacrud>
1411         </class>
1412
1413         <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">
1414                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1415                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1416                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1417                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1418                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1419                 </fields>
1420         <links>
1421             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1422             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1423             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1424         </links>
1425         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1426             <actions>
1427                 <create permission="UPDATE_COPY">
1428                     <context link="target_copy" field="circ_lib"/>
1429                 </create>
1430                 <retrieve/>
1431                 <update permission="UPDATE_COPY">
1432                     <context link="target_copy" field="circ_lib"/>
1433                 </update>
1434                 <delete permission="UPDATE_COPY">
1435                     <context link="target_copy" field="circ_lib"/>
1436                 </delete>
1437             </actions>
1438         </permacrud>
1439         </class>
1440
1441         <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">
1442                 <fields oils_persist:primary="code">
1443                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1444                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1445                 </fields>
1446                 <links/>
1447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1448             <actions>
1449                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1450                 <retrieve/>
1451                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1452                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1453             </actions>
1454         </permacrud>
1455         </class>
1456
1457         <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">
1458                 <fields oils_persist:primary="code">
1459                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1460                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1461                 </fields>
1462                 <links/>
1463         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1464             <actions>
1465                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1466                 <retrieve/>
1467                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1468                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1469             </actions>
1470         </permacrud>
1471         </class>
1472
1473         <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">
1474                 <fields oils_persist:primary="code">
1475                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1476                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1477                 </fields>
1478                 <links/>
1479         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1480             <actions>
1481                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1482                 <retrieve/>
1483                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1484                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1485             </actions>
1486         </permacrud>
1487         </class>
1488
1489     <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">
1490         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1491             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1492             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1493             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1494             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1495             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1496             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1497             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1498             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1499             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1500             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1501             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1502             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1503             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1504             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1505             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1506             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1507             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1508         </fields>
1509         <links/>
1510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1511             <actions>
1512                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1513                 <retrieve/>
1514                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1515                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1516             </actions>
1517         </permacrud>
1518     </class>
1519
1520     <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">
1521         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1522             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1523             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1524             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1525             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1526             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1527             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1528             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1529             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1530             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1531             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1532             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1533             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1534             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1535             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1536             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1537             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1538             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1539             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1540             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1541         </fields>
1542         <links/>
1543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1544             <actions>
1545                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1546                 <retrieve/>
1547                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1548                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1549             </actions>
1550         </permacrud>
1551     </class>
1552
1553     <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">
1554         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1555             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1556             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1557             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1558             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1559             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1560         </fields>
1561         <links>
1562             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1563             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1564             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1565         </links>
1566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1567             <actions>
1568                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1569                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1570                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1571                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1572             </actions>
1573         </permacrud>
1574     </class>
1575
1576         <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">
1577                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1578                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1579                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1580                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1581                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1582                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1583                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1584                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1585                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1586                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1587                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1588                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1589                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1590                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1591                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1592                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1593                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1594             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1595                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1596                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1597                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1598                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1599                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1600                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1601                 </fields>
1602                 <links>
1603                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1604                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1605                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1606                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1607                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1608                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1609                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1610                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1611                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1612                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1613                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1614                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1615                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1616             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1617                 </links>
1618         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1619             <actions>
1620                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1621                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1622                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1623                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1624             </actions>
1625         </permacrud>
1626         </class>
1627
1628         <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">
1629                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1630                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1631                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1632                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1633                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1634                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1635                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1636                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1637                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1638                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1639                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1640                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1641                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1642                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1643                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1644                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1645             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1646                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1647                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1648             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1649                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1650                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1651                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1652                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1653             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1654             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1655             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1656                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1657                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1658                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1659                 </fields>
1660                 <links>
1661                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1662                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1663                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1664                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1665                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1666                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1667                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1668                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1669                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1670                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1671                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1672                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1673                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1674                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1675             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1676                 </links>
1677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1678             <actions>
1679                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1680                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1681                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1682                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1683             </actions>
1684         </permacrud>
1685         </class>
1686
1687     <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">
1688         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1689             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1690             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1691             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1692         </fields>
1693         <links/>
1694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1695             <actions>
1696                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1697                 <retrieve/>
1698                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1699                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1700             </actions>
1701         </permacrud>
1702     </class>
1703
1704     <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">
1705         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1706             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1707             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1708             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1709             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1710             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1711             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1712             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1713         </fields>
1714         <links>
1715             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1716         </links>
1717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1718             <actions>
1719                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1720                 <retrieve/>
1721                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1722                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1723             </actions>
1724         </permacrud>
1725     </class>
1726
1727     <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">
1728         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1729             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1730             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1731             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1732             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1733             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1734         </fields>
1735         <links>
1736             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1737             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1738         </links>
1739         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1740             <actions>
1741                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1742                     <context link="matchpoint" field="org_unit"/>
1743                 </create>
1744                 <retrieve/>
1745                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1746                     <context link="matchpoint" field="org_unit"/>
1747                 </update>
1748                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1749                     <context link="matchpoint" field="org_unit"/>
1750                 </delete>
1751             </actions>
1752         </permacrud>
1753     </class>
1754
1755     <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">
1756         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1757             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1758             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1759             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1760         </fields>
1761         <links>
1762             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1763             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1764         </links>
1765         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1766             <actions>
1767                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1768                     <context link="limit_set" field="owning_lib"/>
1769                 </create>
1770                 <retrieve/>
1771                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1772                     <context link="limit_set" field="owning_lib"/>
1773                 </update>
1774                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1775                     <context link="limit_set" field="owning_lib"/>
1776                 </delete>
1777             </actions>
1778         </permacrud>
1779     </class>
1780     <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">
1781         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1782             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1783             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1784             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1785         </fields>
1786         <links>
1787             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1788             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1789         </links>
1790         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1791             <actions>
1792                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1793                     <context link="limit_set" field="owning_lib"/>
1794                 </create>
1795                 <retrieve/>
1796                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1797                     <context link="limit_set" field="owning_lib"/>
1798                 </update>
1799                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1800                     <context link="limit_set" field="owning_lib"/>
1801                 </delete>
1802             </actions>
1803         </permacrud>
1804     </class>
1805
1806     <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">
1807         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1808             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1809             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1810             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1811             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1812         </fields>
1813         <links>
1814             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1815             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1816         </links>
1817         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1818             <actions>
1819                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1820                     <context link="limit_set" field="owning_lib"/>
1821                 </create>
1822                 <retrieve/>
1823                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1824                     <context link="limit_set" field="owning_lib"/>
1825                 </update>
1826                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1827                     <context link="limit_set" field="owning_lib"/>
1828                 </delete>
1829             </actions>
1830         </permacrud>
1831     </class>
1832
1833         <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">
1834                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1835                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1836                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1837                 </fields>
1838                 <links/>
1839         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1840             <actions>
1841                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1842                 <retrieve/>
1843                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1844                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1845             </actions>
1846         </permacrud>
1847         </class>
1848
1849         <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">
1850                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1851                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1852                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1853                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1854                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1855                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1856                 </fields>
1857                 <links>
1858                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1859                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1860                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1861                 </links>
1862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1863             <actions>
1864                 <create permission="ADMIN_SURVEY">
1865                     <context link="survey" field="owner"/>
1866                 </create>
1867                 <retrieve/>
1868                 <update permission="ADMIN_SURVEY">
1869                     <context link="survey" field="owner"/>
1870                 </update>
1871                 <delete permission="ADMIN_SURVEY">
1872                     <context link="survey" field="owner"/>
1873                 </delete>
1874             </actions>
1875         </permacrud>
1876         </class>
1877         <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">
1878                 <fields oils_persist:primary="id" oils_persist:sequence="">
1879                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1880                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1881                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1882                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1883                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1884                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1885                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1886                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1887                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1888                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1889                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1890                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1891                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1892                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1893                 </fields>
1894                 <links>
1895                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1896                 </links>
1897         </class>
1898         <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">
1899                 <fields oils_persist:primary="id" oils_persist:sequence="">
1900                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1901                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1902                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1903                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1904                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1905                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1906                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1907                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1908                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1909                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1910                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1911                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1912                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1913                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1914                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1915                 </fields>
1916                 <links>
1917                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1918                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1919                 </links>
1920         </class>
1921         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1922                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1923                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1924                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1925                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1926                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1927                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1928                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1929                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1930                 </fields>
1931                 <links>
1932                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1933                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1934                 </links>
1935         </class>
1936         <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">
1937                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1938                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1939                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1940                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1941                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1942                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1943                 </fields>
1944                 <links>
1945                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1946                 </links>
1947         </class>
1948         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1949                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1950                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1951                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1952                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1953                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1954                 </fields>
1955                 <links>
1956                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1957                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1958                 </links>
1959         </class>
1960         <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">
1961                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1962                         <field name="field" reporter:datatype="link"/>
1963                         <field name="id" reporter:datatype="id" />
1964                         <field name="source" reporter:datatype="link"/>
1965                         <field name="value" reporter:datatype="text"/>
1966                 </fields>
1967                 <links>
1968                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1969                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1970                 </links>
1971         </class>
1972         <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">
1973                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1974                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1975                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1976                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1977                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1978                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1979                 </fields>
1980                 <links>
1981                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1982                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1983                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1984                 </links>
1985         </class>
1986         <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">
1987                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1988                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1989                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1990                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1991                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1992                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1993                 </fields>
1994                 <links>
1995                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1996                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1997                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1998                 </links>
1999         </class>
2000         <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">
2001                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2002                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2003                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2004                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2005                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2006                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2007                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2008                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2009                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2010                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2011                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2012                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2013                 </fields>
2014                 <links>
2015                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2016                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2017                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2018                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2019                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2020                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2021                 </links>
2022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2023             <actions>
2024                 <create permission="TRANSIT_COPY" context_field="owner">
2025                     <context link="target_copy" field="circ_lib"/>
2026                 </create>
2027                 <retrieve/>
2028                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2029                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2030             </actions>
2031         </permacrud>
2032         </class>
2033         <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">
2034                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2035                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2036                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2037                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2038                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2039                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2040                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2041                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2042                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2043                 </fields>
2044                 <links>
2045                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2046                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2047                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2048                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2049                 </links>
2050         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2051             <actions>
2052                 <create permission="ADMIN_SURVEY">
2053                     <context link="survey" field="owner"/>
2054                 </create>
2055                 <retrieve/>
2056                 <update permission="ADMIN_SURVEY">
2057                     <context link="survey" field="owner"/>
2058                 </update>
2059                 <delete permission="ADMIN_SURVEY">
2060                     <context link="survey" field="owner"/>
2061                 </delete>
2062             </actions>
2063         </permacrud>
2064         </class>
2065         <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">
2066                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2067                         <field name="bucket" />
2068                         <field name="id" reporter:datatype="id" />
2069                         <field name="target_copy" reporter:datatype="link"/>
2070                         <field name="create_time" reporter:datatype="timestamp" />
2071                         <field name="pos" reporter:datatype="int" />
2072                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2073                 </fields>
2074                 <links>
2075                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2076                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2077             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2078                 </links>
2079         </class>
2080         <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">
2081                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2082                         <field name="id" reporter:datatype="id" />
2083                         <field name="item" reporter:datatype="link"/>
2084                         <field name="note" reporter:datatype="text" />
2085                 </fields>
2086                 <links>
2087                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2088                 </links>
2089         </class>
2090
2091         <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">
2092                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2093                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2094                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2095                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2096                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2097                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2098                 </fields>
2099                 <links>
2100                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2101                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2102                 </links>
2103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2104                         <actions>
2105                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2106                                 <retrieve/>
2107                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2108                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2109                         </actions>
2110                 </permacrud>
2111         </class>
2112
2113         <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">
2114                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2115                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2116                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2117                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2118                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2119                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2120                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2121                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2122                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2123                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2124                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2125                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2126                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2127                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2128                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2129                 </fields>
2130                 <links>
2131                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2132                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2133                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2134                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2135                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2136                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2137                 </links>
2138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2139                         <actions>
2140                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2141                                 <retrieve/>
2142                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2143                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2144                         </actions>
2145                 </permacrud>
2146         </class>
2147
2148         <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">
2149                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2150                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2151                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2152                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2153                 </fields>
2154                 <links>
2155                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2156                 </links>
2157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2158                         <actions>
2159                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2160                                 <retrieve/>
2161                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2162                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2163                         </actions>
2164                 </permacrud>
2165         </class>
2166
2167         <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">
2168                 <fields oils_persist:primary="code">
2169                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2170                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2171                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2172                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2173                 </fields>
2174                 <links>
2175                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
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="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2183                         </actions>
2184                 </permacrud>
2185         </class>
2186
2187         <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">
2188                 <fields oils_persist:primary="code">
2189                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2190                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2191                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2192                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2193                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2194                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2195                 </fields>
2196                 <links>
2197                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2198                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2199                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2200                 </links>
2201                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2202                         <actions>
2203                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2204                                 <retrieve/>
2205                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2206                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2207                         </actions>
2208                 </permacrud>
2209         </class>
2210
2211     <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">
2212         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2213             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2214             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2215             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2216         </fields>
2217         <links>
2218             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2219             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2220         </links>
2221         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2222             <actions>
2223                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2224                 <retrieve/>
2225                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2226                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2227             </actions>
2228         </permacrud>
2229     </class>
2230
2231         <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">
2232                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2233                         <field name="active" reporter:datatype="bool"/>
2234                         <field name="create_date" reporter:datatype="timestamp"/>
2235                         <field name="creator" />
2236                         <field name="deleted" reporter:datatype="bool"/>
2237                         <field name="edit_date" reporter:datatype="timestamp"/>
2238                         <field name="editor" />
2239                         <field name="id" reporter:datatype="id" />
2240                         <field name="last_xact_id" />
2241                         <field name="marc" />
2242                         <field name="source" />
2243                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2244                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2245                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2246                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2247                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2248                 </fields>
2249                 <links>
2250                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2251                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2252                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2253                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2254                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2255                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2256                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2257                 </links>
2258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2259                         <actions>
2260                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2261                                 <retrieve/>
2262                                 <update permission="UPDATE_MARC" global_required="true"/>
2263                                 <delete permission="UPDATE_MARC" global_required="true"/>
2264                         </actions>
2265                 </permacrud>
2266         </class>
2267         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2268                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2269                         <field name="char_encoding" />
2270                         <field name="id" />
2271                         <field name="record" />
2272                         <field name="record_status" />
2273                         <field name="thesaurus" />
2274                 </fields>
2275                 <links>
2276                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2277                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2278                 </links>
2279         </class>
2280         <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">
2281                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2282                         <field name="id" reporter:datatype="id" />
2283                         <field name="bib" reporter:datatype="link" />
2284                         <field name="authority" reporter:datatype="link" />
2285                 </fields>
2286                 <links>
2287                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2288                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2289                 </links>
2290         </class>
2291         <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">
2292                 <fields oils_persist:primary="code" oils_persist:sequence="">
2293                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2294                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2295                 </fields>
2296                 <links/>
2297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2298             <actions>
2299                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2300                 <retrieve/>
2301                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2302                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2303             </actions>
2304         </permacrud>
2305         </class>
2306         <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">
2307                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2308                         <field name="accepting_usr" />
2309                         <field name="amount" reporter:datatype="money" />
2310                         <field name="amount_collected" reporter:datatype="money" />
2311                         <field name="approval_code" reporter:datatype="text"/>
2312                         <field name="cash_drawer" reporter:datatype="link"/>
2313                         <field name="cc_first_name" reporter:datatype="text"/>
2314                         <field name="cc_last_name" reporter:datatype="text"/>
2315                         <field name="cc_number" reporter:datatype="text"/>
2316                         <field name="cc_order_number" reporter:datatype="text"/>
2317                         <field name="cc_type" reporter:datatype="text"/>
2318                         <field name="cc_processor" reporter:datatype="text"/>
2319                         <field name="expire_month" reporter:datatype="int" />
2320                         <field name="expire_year" reporter:datatype="int" />
2321                         <field name="id" reporter:datatype="id" />
2322                         <field name="note" reporter:datatype="text"/>
2323                         <field name="payment_ts" reporter:datatype="timestamp"/>
2324                         <field name="xact" reporter:datatype="link"/>
2325                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2326                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2327                 </fields>
2328                 <links>
2329                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2330                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2331                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2332                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2333                 </links>
2334         </class>
2335         <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">
2336                 <fields oils_persist:primary="name">
2337                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2338                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2339                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2340                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2341                 </fields>
2342                 <links/>
2343         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2344             <actions>
2345                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2346                 <retrieve/>
2347                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2348                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2349             </actions>
2350         </permacrud>
2351         </class>
2352
2353         <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">
2354                 <fields oils_persist:primary="alias">
2355                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2356                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2357                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2358                 </fields>
2359                 <links>
2360                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2361                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2362                 </links>
2363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2364             <actions>
2365                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2366                 <retrieve/>
2367                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2368                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2369             </actions>
2370         </permacrud>
2371         </class>
2372
2373         <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">
2374                 <fields oils_persist:primary="name">
2375                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2376                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2377                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2378                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2379                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2380                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2381                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2382                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2383                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2384                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2385                 </fields>
2386                 <links>
2387                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2388                 </links>
2389         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2390             <actions>
2391                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2392                 <retrieve/>
2393                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2394                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2395             </actions>
2396         </permacrud>
2397         </class>
2398
2399         <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">
2400                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2401                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2402                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2403                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2404                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2405                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2406                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2407                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2408                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2409                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2410                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2411                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2412                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2413                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2414                 </fields>
2415                 <links>
2416                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2417                 </links>
2418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2419             <actions>
2420                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2421                 <retrieve/>
2422                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2423                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2424             </actions>
2425         </permacrud>
2426         </class>
2427         <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">
2428                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2429                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2430                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2431                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2432                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2433                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2434                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2435                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2436                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2437                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2438                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2439                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2440                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2441                 </fields>
2442                 <links>
2443                 </links>
2444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2445                         <actions>
2446                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2447                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2448                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2449                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2450                         </actions>
2451                 </permacrud>
2452         </class>
2453         <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">
2454                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2455                         <field name="id" reporter:datatype="id" />
2456                         <field name="name" reporter:datatype="text"/>
2457                         <field name="xpath" reporter:datatype="text"/>
2458                         <field name="format" reporter:datatype="link"/>
2459                         <field name="first_word" reporter:datatype="bool" />
2460                 </fields>
2461                 <links/>
2462         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2463             <actions>
2464                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2465                 <retrieve/>
2466                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2467                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2468             </actions>
2469         </permacrud>
2470         </class>
2471         <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">
2472                 <fields oils_persist:primary="code" oils_persist:sequence="">
2473                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2474                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2475                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2476                 </fields>
2477                 <links/>
2478         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2479             <actions>
2480                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2481                 <retrieve/>
2482                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2483                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2484             </actions>
2485         </permacrud>
2486         </class>
2487         <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">
2488                 <fields oils_persist:primary="code" oils_persist:sequence="">
2489                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2490                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2491                 </fields>
2492                 <links/>
2493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2494             <actions>
2495                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2496                 <retrieve/>
2497                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2498                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2499             </actions>
2500         </permacrud>
2501         </class>
2502     <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">
2503         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2504             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2505             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2506             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2507             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2508         </fields>
2509         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2510             <actions>
2511                 <retrieve/>
2512             </actions>
2513         </permacrud>
2514     </class>
2515         <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">
2516                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2517                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2518                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2519                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2520                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2521                 </fields>
2522                 <links>
2523                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2524                 </links>
2525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2526             <actions>
2527                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2528                 <retrieve/>
2529                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2530                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2531             </actions>
2532         </permacrud>
2533         </class>
2534         <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">
2535                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2536                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2537                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2538                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2539                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2540                 </fields>
2541                 <links>
2542                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2543                 </links>
2544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2545             <actions>
2546                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2547                 <retrieve/>
2548                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2549                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2550             </actions>
2551         </permacrud>
2552         </class>
2553         <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">
2554                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2555                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2556                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2557                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2558                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2559                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2560                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2561                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2562                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2563                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2564                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2565                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2566                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2567                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2568                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2569                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2570                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2571                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2572                 </fields>
2573                 <links>
2574                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2575                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2576                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2577                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2578                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2579                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2580                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2581                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2582                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2583                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2584                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2585                 </links>
2586         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2587             <actions>
2588                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2589                 <retrieve/>
2590                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2591                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2592             </actions>
2593         </permacrud>
2594         </class>
2595         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2596                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2597                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2598                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2599                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2600                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2601                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2602                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2603                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2604                 </fields>
2605                 <links>
2606                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2607                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2608         </links>
2609         </class>
2610         <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">
2611                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2612                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2613                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2614                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2615                 </fields>
2616                 <links>
2617                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2618                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2619                 </links>
2620         </class>
2621         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2622                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2623                         <field name="id" reporter:datatype="id" />
2624                         <field name="value" oils_persist:i18n="true" />
2625                 </fields>
2626                 <links/>
2627         </class>
2628         <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">
2629                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2630                         <field name="balance_owed" reporter:datatype="money" />
2631                         <field name="total_owed" reporter:datatype="money" />
2632                         <field name="total_paid" reporter:datatype="money" />
2633                         <field name="usr" reporter:datatype="link"/>
2634                 </fields>
2635                 <links>
2636                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2637         </links>
2638         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2639             <actions>
2640                 <retrieve permission="VIEW_USER">
2641                     <context link="usr" field="home_ou"/>
2642                 </retrieve>
2643             </actions>
2644         </permacrud>
2645         </class>
2646         <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">
2647                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2648                         <field name="collector" />
2649                         <field name="enter_time" reporter:datatype="timestamp"/>
2650                         <field name="id" reporter:datatype="id" />
2651                         <field name="location" reporter:datatype="link"/>
2652                         <field name="usr" reporter:datatype="link"/>
2653                 </fields>
2654                 <links>
2655                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2656                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2657                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2658                 </links>
2659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2660             <actions>
2661                 <create permission="money.collections_tracker.create" context_field="location"/>
2662                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2663                 <delete permission="money.collections_tracker.create" context_field="location"/>
2664             </actions>
2665         </permacrud>
2666         </class>
2667         <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">
2668                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2669                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2670                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2671                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2672                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2673                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2674                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2675                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2676                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2677                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2678                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2679                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2680                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2681                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2682                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2683                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2684                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2685                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2686                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2687                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2689                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2693                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2694                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2695                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2697                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2699                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2700                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2701                 </fields>
2702                 <links>
2703                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2704                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2705                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2706                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2707                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2708                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2709                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2710                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2711                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2712                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2713                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2714                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2715                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2716                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2717                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2718                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2719                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2720                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2721                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2722                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2723                 </links>
2724         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2725             <actions>
2726                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2727                 <retrieve/>
2728                 <update permission="UPDATE_MARC" global_required="true"/>
2729             </actions>
2730         </permacrud>
2731         </class>
2732         <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">
2733                 <fields oils_persist:primary="id">
2734                         <field name="dow_0_close" />
2735                         <field name="dow_0_open" />
2736                         <field name="dow_1_close" />
2737                         <field name="dow_1_open" />
2738                         <field name="dow_2_close" />
2739                         <field name="dow_2_open" />
2740                         <field name="dow_3_close" />
2741                         <field name="dow_3_open" />
2742                         <field name="dow_4_close" />
2743                         <field name="dow_4_open" />
2744                         <field name="dow_5_close" />
2745                         <field name="dow_5_open" />
2746                         <field name="dow_6_close" />
2747                         <field name="dow_6_open" />
2748                         <field name="id" reporter:datatype="id" />
2749                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2750                 </fields>
2751                 <links>
2752                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2753                 </links>
2754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2755             <actions>
2756                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2757                 <retrieve/>
2758                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2759                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2760             </actions>
2761         </permacrud>
2762         </class>
2763         <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">
2764                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2765                         <field name="id" reporter:datatype="id" />
2766                         <field name="record" reporter:datatype="link"/>
2767                         <field name="label" reporter:datatype="text"/>
2768                         <field name="label_sortkey" reporter:datatype="text"/>
2769                 </fields>
2770                 <links>
2771                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2772                 </links>
2773         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2774             <actions>
2775                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2776                 <retrieve/>
2777                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2778                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2779             </actions>
2780         </permacrud>
2781         </class>
2782         <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">
2783                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2784                         <field name="id" reporter:datatype="id" />
2785                         <field name="target_copy" reporter:datatype="link" />
2786                         <field name="part" reporter:datatype="link"/>
2787                 </fields>
2788                 <links>
2789                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2790                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2791                 </links>
2792         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2793             <actions>
2794                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2795                 <retrieve/>
2796                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2797                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2798             </actions>
2799         </permacrud>
2800         </class>
2801         <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">
2802                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2803                         <field name="close_end" reporter:datatype="timestamp" />
2804                         <field name="close_start" reporter:datatype="timestamp" />
2805                         <field name="id" reporter:datatype="id" />
2806                         <field name="org_unit" reporter:datatype="org_unit"/>
2807                         <field name="reason" reporter:datatype="text"/>
2808                 </fields>
2809                 <links>
2810                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2811                 </links>
2812         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2813             <actions>
2814                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2815                 <retrieve/>
2816                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2817                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2818             </actions>
2819         </permacrud>
2820         </class>
2821         <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">
2822                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2823                         <field name="extended" reporter:datatype="interval"/>
2824                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2825                         <field name="max_renewals" reporter:datatype="int" />
2826                         <field name="name" reporter:datatype="text"/>
2827                         <field name="normal" reporter:datatype="interval"/>
2828                         <field name="shrt" reporter:datatype="interval"/>
2829                 </fields>
2830                 <links>
2831                 </links>
2832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2833             <actions>
2834                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2835                 <retrieve/>
2836                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2837                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2838             </actions>
2839         </permacrud>
2840         </class>
2841
2842         <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">
2843                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2844                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2845                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2846             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2847                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2848             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2849                 </fields>
2850                 <links>
2851             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2852                 </links>
2853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2854             <actions>
2855                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2856                 <retrieve/>
2857                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2858                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2859             </actions>
2860                 </permacrud>
2861         </class>
2862
2863         <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">
2864                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2865                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2866                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2867                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2868             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2869                 </fields>
2870                 <links>
2871                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2872                 </links>
2873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2874             <actions>
2875                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2876                 <retrieve/>
2877                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2878                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2879             </actions>
2880                 </permacrud>
2881         </class>
2882
2883         <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">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="">
2885                         <field name="balance_owed" reporter:datatype="money"/>
2886                         <field name="id" reporter:datatype="id" />
2887                         <field name="last_billing_note" reporter:datatype="text"/>
2888                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2889                         <field name="last_billing_type" reporter:datatype="text"/>
2890                         <field name="last_payment_note" reporter:datatype="text"/>
2891                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2892                         <field name="last_payment_type" reporter:datatype="text"/>
2893                         <field name="total_owed" reporter:datatype="money"/>
2894                         <field name="total_paid" reporter:datatype="money"/>
2895                         <field name="usr" reporter:datatype="link"/>
2896                         <field name="xact_finish" reporter:datatype="timestamp" />
2897                         <field name="xact_start" reporter:datatype="timestamp" />
2898                         <field name="xact_type" reporter:datatype="text"/>
2899                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2901                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2903                         <field name="billing_location" reporter:datatype="link"/>
2904                 </fields>
2905                 <links>
2906                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2907                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2908                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2909                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2910                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2911                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2912                 </links>
2913         </class>
2914         <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">
2915                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2916                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2918                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2919                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2920                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2921                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2922                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2923                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2924                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2925                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2926                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2927                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2928                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2929                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2930                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2931                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2932                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2933                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2934                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2935                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2936                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2937                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2938                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2939                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2940                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2941                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2942                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2943                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2944                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2945                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2946                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2947                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2948                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2949                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2950                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2951                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2952                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2953                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2954                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2955                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2956                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2957                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2958                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2959                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2960                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2961                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2962                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2963                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2964                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2965                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2966                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2967                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2968                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2969                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2970                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2971                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2972                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2979                 </fields>
2980                 <links>
2981                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2982                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2983                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2984                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2985                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2986                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2987                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2988                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2989                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2990                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2991                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2992                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2993                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2994                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2995                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
2996                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2997                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2998                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2999                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3000                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3001                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3002                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3003                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3004                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3005                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3006                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3007                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3008                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3009                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3010                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3011                 </links>
3012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3013                         <actions>
3014                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3015                         </actions>
3016                 </permacrud>
3017         </class>
3018         <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">
3019                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3020                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3021                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3022                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3023                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3024                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3025                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3026                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3027                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3028         </fields>
3029                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3030                         <actions>
3031                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3032                                 <retrieve/>
3033                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3034                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3035                         </actions>
3036                 </permacrud>
3037         </class>
3038         <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">
3039                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3040                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3041                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3042                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3043                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3044         </fields>
3045         <links>
3046                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3047                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3048                 </links>
3049                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3050                         <actions>
3051                                 <retrieve permission="RUN_REPORTS">
3052                                         <context link="usr" field="home_ou" />
3053                                 </retrieve>
3054                         </actions>
3055                 </permacrud>
3056         </class>
3057         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3058                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3059                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3060                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3061                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3062                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3063                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3064                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3065         </fields>
3066         <links>
3067                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3068                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3069                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3070                 </links>
3071                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3072                         <actions>
3073                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3074                                         <context link="usr" field="home_ou" />
3075                                         <context link="ws" field="owning_lib" />
3076                                 </retrieve>
3077                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3078                                         <context link="usr" field="home_ou" />
3079                                         <context link="ws" field="owning_lib" />
3080                                 </create>
3081                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3082                                         <context link="usr" field="home_ou" />
3083                                         <context link="ws" field="owning_lib" />
3084                                 </update>
3085                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3086                                         <context link="usr" field="home_ou" />
3087                                         <context link="ws" field="owning_lib" />
3088                                 </delete>
3089                         </actions>
3090                 </permacrud>
3091         </class>
3092         <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">
3093                 <fields oils_persist:primary="name">
3094                         <field name="name" reporter:datatype="text"/>
3095                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3096                 </fields>
3097                 <links/>
3098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3099                         <actions>
3100                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3101                                 <retrieve/>
3102                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3103                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3104                         </actions>
3105                 </permacrud>
3106         </class>
3107         <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">
3108                 <fields oils_persist:primary="name">
3109                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3110                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3111                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3112                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3113                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3114                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3115                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3116                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3117                 </fields>
3118                 <links>
3119                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3120                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3121                 </links>
3122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3123                         <actions>
3124                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3125                                 <retrieve/>
3126                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3127                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3128                         </actions>
3129                 </permacrud>
3130         </class>
3131         <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">
3132                 <fields oils_persist:primary="name">
3133                         <field name="name" reporter:datatype="text"/>
3134                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3135                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3136                         <field name="datatype" reporter:datatype="text"/>
3137                         <field name="view_perm" reporter:datatype="link"/>
3138                         <field name="update_perm" reporter:datatype="link"/>
3139                         <field name="fm_class" reporter:datatype="text"/>
3140                         <field name="grp" reporter:datatype="link"/>
3141                 </fields>
3142                 <links>
3143                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3144                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3145                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3146                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3147                 </links>
3148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3149                         <actions>
3150                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3151                                 <retrieve/>
3152                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3153                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3154                         </actions>
3155                 </permacrud>
3156         </class>
3157         <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">
3158                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3159                         <field name="id" />
3160                         <field name="name"  reporter:datatype="text"/>
3161                         <field name="org_unit" reporter:datatype="org_unit"/>
3162                         <field name="value"  reporter:datatype="text"/>
3163                 </fields>
3164                 <links>
3165                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3166                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3167                 </links>
3168         </class>
3169         <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">
3170                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3171                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3172                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3173                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3174                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3175                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3176                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3177                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3178                 </fields>
3179                 <links>
3180                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3181                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3182                 </links>
3183         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3184             <actions>
3185                 <create permission="CREATE_COPY_NOTE">
3186                     <context link="owning_copy" field="circ_lib"/>
3187                 </create>
3188                 <retrieve permission="VIEW_COPY_NOTES">
3189                     <context link="owning_copy" field="circ_lib"/>
3190                 </retrieve>
3191                 <update permission="UPDATE_COPY_NOTE">
3192                     <context link="owning_copy" field="circ_lib"/>
3193                 </update>
3194                 <delete permission="DELETE_COPY_NOTE">
3195                     <context link="owning_copy" field="circ_lib"/>
3196                 </delete>
3197             </actions>
3198         </permacrud>
3199         </class>
3200         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3201                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3202                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3203                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3204                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3205                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3206                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3207                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3208                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3209                 </fields>
3210                 <links>
3211                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3212                 </links>
3213         </class>
3214         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3216                         <field name="fingerprint"  reporter:datatype="text"/>
3217                         <field name="id" reporter:datatype="id" />
3218                         <field name="master_record" reporter:datatype="link"/>
3219                         <field name="mods"  reporter:datatype="text"/>
3220                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3221                 </fields>
3222                 <links>
3223                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3224                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3225                 </links>
3226         </class>
3227         <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">
3228                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3229                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3230                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3231                 </fields>
3232                 <links/>
3233         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3234             <actions>
3235                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3236                 <retrieve/>
3237                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3238                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3239             </actions>
3240         </permacrud>
3241         </class>
3242         <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">
3243                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3244                         <field name="code"  reporter:datatype="text"/>
3245                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3246                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3247                 </fields>
3248                 <links/>
3249         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3250             <actions>
3251                 <create permission="CREATE_PERM" global_required="true"/>
3252                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3253                 <update permission="UPDATE_PERM" global_required="true"/>
3254                 <delete permission="DELETE_PERM" global_required="true"/>
3255             </actions>
3256         </permacrud>
3257         </class>
3258         <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">
3259                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3260                         <field name="id" reporter:datatype="id" />
3261                         <field name="metarecord" reporter:datatype="link"/>
3262                         <field name="source" reporter:datatype="link"/>
3263                 </fields>
3264                 <links>
3265                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3266                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3267                 </links>
3268         </class>
3269         <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">
3270                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3271                         <field name="id" reporter:datatype="id" />
3272                         <field name="field" reporter:datatype="link"/>
3273                         <field name="source" reporter:datatype="link"/>
3274                         <field name="value"  reporter:datatype="text"/>
3275                 </fields>
3276                 <links>
3277                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3278                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3279                 </links>
3280         </class>
3281         <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">
3282                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3283                         <field name="id" reporter:datatype="id" />
3284                         <field name="value" reporter:datatype="text"/>
3285                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3286                 </fields>
3287                 <links>
3288                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3289                 </links>
3290         </class>
3291         <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">
3292                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3293                         <field name="id" reporter:datatype="id" />
3294                         <field name="entry" reporter:datatype="link"/>
3295                         <field name="def" reporter:datatype="link"/>
3296                         <field name="source" reporter:datatype="link"/>
3297                 </fields>
3298                 <links>
3299                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3300                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3301                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3302                 </links>
3303         </class>
3304         <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">
3305                 <oils_persist:source_definition>
3306                         SELECT * FROM metabib.author_field_entry
3307                                                 UNION ALL
3308                         SELECT * FROM metabib.keyword_field_entry
3309                                                 UNION ALL
3310                         SELECT * FROM metabib.identifier_field_entry
3311                                                 UNION ALL
3312                         SELECT * FROM metabib.title_field_entry
3313                                                 UNION ALL
3314                         SELECT * FROM metabib.subject_field_entry
3315                                                 UNION ALL
3316                         SELECT * FROM metabib.series_field_entry
3317                 </oils_persist:source_definition>
3318                 <fields>
3319                         <field name="field" reporter:datatype="link"/>
3320                         <field name="id" reporter:datatype="id" />
3321                         <field name="source" reporter:datatype="link"/>
3322                         <field name="value"  reporter:datatype="text"/>
3323                 </fields>
3324                 <links>
3325                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3326                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3327                 </links>
3328         </class>
3329         <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">
3330                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3331                         <field name="field" reporter:datatype="link"/>
3332                         <field name="id" reporter:datatype="id" />
3333                         <field name="source" reporter:datatype="link"/>
3334                         <field name="value"  reporter:datatype="text"/>
3335                 </fields>
3336                 <links>
3337                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3338                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3339                 </links>
3340         </class>
3341         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3342                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3343                         <field name="accepting_usr" reporter:datatype="link"/>
3344                         <field name="amount" reporter:datatype="money" />
3345                         <field name="amount_collected" reporter:datatype="money" />
3346                         <field name="cash_drawer" reporter:datatype="link"/>
3347                         <field name="id" reporter:datatype="id" />
3348                         <field name="note"  reporter:datatype="text"/>
3349                         <field name="payment_ts" reporter:datatype="timestamp"/>
3350                         <field name="xact" reporter:datatype="link"/>
3351                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3352                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3353                 </fields>
3354                 <links>
3355                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3356                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3357                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3358                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3359                 </links>
3360         </class>
3361         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3362                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3363                         <field name="accepting_usr" reporter:datatype="link"/>
3364                         <field name="amount" reporter:datatype="money" />
3365                         <field name="amount_collected" reporter:datatype="money" />
3366                         <field name="id" reporter:datatype="id" />
3367                         <field name="note"  reporter:datatype="text"/>
3368                         <field name="payment_ts" reporter:datatype="timestamp"/>
3369                         <field name="xact" reporter:datatype="link"/>
3370                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3371                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3372                 </fields>
3373                 <links>
3374                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3375                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3376                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3377                 </links>
3378         </class>
3379         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3380                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3381                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3382                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3383                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3384                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3385                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3386                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3387                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3388                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3389                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3390                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3391                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3392                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3393                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3394                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3395                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3396                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3397                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3398                 </fields>
3399                 <links>
3400                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3401                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3402                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3403                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3404                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3405                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3406                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3407                 </links>
3408         </class>
3409
3410         <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">
3411                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3412                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3413                         <field name="name"  reporter:datatype="text"/>
3414                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3415                         <field name="block_list" reporter:datatype="text"/>
3416                         <field name="staff_alert" reporter:datatype="bool"/>
3417                         <field name="org_depth" reporter:datatype="int"/>
3418                 </fields>
3419                 <links/>
3420         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3421             <actions>
3422                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3423                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3424                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3425                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3426             </actions>
3427         </permacrud>
3428         </class>
3429         <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">
3430                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3431                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3432                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3433                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3434                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3435                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3436                 </fields>
3437                 <links>
3438                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3439                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3440                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3441         </links>
3442         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3443             <actions>
3444                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3445                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3446                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3447                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3448             </actions>
3449         </permacrud>
3450         </class>
3451         <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">
3452                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3453                         <field name="holdable" reporter:datatype="bool"/>
3454                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3455                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3456                         <field name="opac_visible" reporter:datatype="bool"/>
3457             <field name="copy_active" reporter:datatype="bool"/>
3458             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3459                 </fields>
3460                 <links/>
3461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3462             <actions>
3463                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3464                 <retrieve/>
3465                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3466                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3467             </actions>
3468         </permacrud>
3469         </class>
3470         <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">
3471                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3472                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3473                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3474                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3475                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3476                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3477                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3478                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3479                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3480                 </fields>
3481                 <links>
3482                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3483                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3484                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3485                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3486                 </links>
3487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3488                         <actions>
3489                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3490                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3491                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3492                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3493                         </actions>
3494                 </permacrud>
3495         </class>
3496         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3497                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3498                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3499                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3500                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3501                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3502                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3503                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3504                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3505                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3506                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3507                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3508                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3509                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3510                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3511                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3512                 </fields>
3513                 <links>
3514                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3515                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3516                 </links>
3517         </class>
3518         <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">
3519                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3520                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3521                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3522                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3523                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3524                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3525                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3526                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3527                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3528                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3529                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3530                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3531                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3532                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3533                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3534                 </fields>
3535                 <links>
3536                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3537                 </links>
3538                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3539                         <actions>
3540                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3541                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3542                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3543                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3544                         </actions>
3545                 </permacrud>
3546         </class>
3547
3548
3549         <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">
3550                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3551                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3552                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3553                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3554                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3555                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3556                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3557                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3558                 </fields>
3559                 <links>
3560                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3561                 </links>
3562         </class>
3563
3564         <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">
3565                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3566                         <field name="call_number" />
3567                         <field name="create_date" reporter:datatype="timestamp"/>
3568                         <field name="creator" reporter:datatype="link"/>
3569                         <field name="id" reporter:datatype="id" />
3570                         <field name="pub" reporter:datatype="bool"/>
3571                         <field name="title"  reporter:datatype="text"/>
3572                         <field name="value"  reporter:datatype="text"/>
3573                 </fields>
3574                 <links>
3575                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3576                 </links>
3577         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3578             <actions>
3579                 <create permission="CREATE_VOLUME_NOTE">
3580                     <context link="call_number" field="owning_lib"/>
3581                 </create>
3582                 <retrieve permission="VIEW_VOLUME_NOTES">
3583                     <context link="call_number" field="owning_lib"/>
3584                 </retrieve>
3585                 <update permission="UPDATE_VOLUME_NOTE">
3586                     <context link="call_number" field="owning_lib"/>
3587                 </update>
3588                 <delete permission="DELETE_VOLUME_NOTE">
3589                     <context link="call_number" field="owning_lib"/>
3590                 </delete>
3591             </actions>
3592         </permacrud>
3593         </class>
3594         <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">
3595                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3596                         <field name="create_date" reporter:datatype="timestamp"/>
3597                         <field name="creator" reporter:datatype="link"/>
3598                         <field name="edit_date" reporter:datatype="timestamp"/>
3599                         <field name="editor" reporter:datatype="link"/>
3600                         <field name="id" reporter:datatype="id" />
3601                         <field name="record" reporter:datatype="link"/>
3602                         <field name="value" reporter:datatype="text"/>
3603                 </fields>
3604                 <links>
3605                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3606                 </links>
3607         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3608             <actions>
3609                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3610                 <retrieve/>
3611                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3612                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3613             </actions>
3614         </permacrud>
3615         </class>
3616         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3617         <oils_persist:source_definition>
3618 SELECT  usr,
3619         SUM(
3620             CASE
3621                 WHEN (
3622                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3623                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3624                 ) THEN 1
3625                 ELSE 0
3626             END
3627         ) AS out,
3628
3629         SUM(
3630             CASE
3631                 WHEN (
3632                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3633                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3634                 ) THEN 1
3635                 ELSE 0
3636             END
3637         ) AS overdue,
3638
3639         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3640         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3641         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3642   FROM  action.circulation
3643   WHERE checkin_time IS NULL
3644   GROUP BY 1
3645         </oils_persist:source_definition>
3646         <fields oils_persist:primary="usr">
3647             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3648             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3649             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3650             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3651             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3652             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3653         </fields>
3654         <links>
3655             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3656         </links>
3657         </class>
3658         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3659         <oils_persist:source_definition>
3660 SELECT  usr,
3661         ARRAY_TO_STRING(ARRAY_ACCUM(
3662             CASE
3663                 WHEN (
3664                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3665                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3666                 ) THEN id
3667                 ELSE 0
3668             END
3669         ),',') AS out,
3670
3671         ARRAY_TO_STRING(ARRAY_ACCUM(
3672             CASE
3673                 WHEN (
3674                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3675                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3676                 ) THEN id
3677                 ELSE 0
3678             END
3679         ),',') AS overdue,
3680
3681         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3682         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3683         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3684   FROM  action.circulation
3685   WHERE checkin_time IS NULL
3686   GROUP BY 1
3687         </oils_persist:source_definition>
3688         <fields oils_persist:primary="usr">
3689             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3690             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3691             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3692             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3693             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3694             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3695         </fields>
3696         <links>
3697             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3698         </links>
3699         </class>
3700         <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">
3701                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3702                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3703                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3704                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3705                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3706                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3707                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3708                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3709                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3710                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3711                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3712                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3713                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3714                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3715                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3716                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3717                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3718                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3719                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3720                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3721                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3722                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3723                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3724                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3725                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3726                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3727                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3728                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3729                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3730                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3731                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3732                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3733                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3734                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3735                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3736                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3737                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3738                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3739                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3740                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3741                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3742                 </fields>
3743                 <links>
3744                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3745                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3746                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3747                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3748                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3749                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3750                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3751                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3752                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3753                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3754                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3755                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3756                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3757                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3758                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3759                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3760                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3761                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3762                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3763                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3764                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3765                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3766                 </links>
3767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3768                         <actions>
3769                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3770                         </actions>
3771                 </permacrud>
3772         </class>
3773         <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">
3774                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3775                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3776                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3777                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3778                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3779                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3780                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3781                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3782                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3783                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3784                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3785                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3786                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3787                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3788                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3789                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3790                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3791                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3792                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3793                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3794                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3795                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3796                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3797                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3798                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3799                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3800                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3801                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3802                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3803                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3804                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3805                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3806                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3807                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3808                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3809                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3810                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3811                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3812                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3813                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3814                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3815                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3816                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3817                 </fields>
3818                 <links>
3819                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3820                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3821                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3822                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3823                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3824                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3825                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3826                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3827                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3828                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3829                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3830                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3831                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3832                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3833                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3834                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3835                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3836                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3837                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3838                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3839                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3840                 </links>
3841         </class>
3842         <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">
3843                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3844                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3845                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3846                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3847                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3848                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3849                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3850                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3851                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3852                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3853                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3854                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3855                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3856                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3857                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3858                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3859                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3860                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3861                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3862                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3863                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3864                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3865                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3866                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3867                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3868                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3869                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3870                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3871                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3872                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3873                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3874                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3875                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3876                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3877                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3878                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3879                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3880                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3881                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3882                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3883                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3884                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3885                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3886                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3887                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3888                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3889                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3890                 </fields>
3891                 <links>
3892                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3893                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3894                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3895                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3896                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3897                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3898                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3899                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3900                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3901                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3902                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3903                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3904                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3905                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3906                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3907                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3908                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3909                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3910                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3911                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3912                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3913                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3914                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3915                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3916                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3917                 </links>
3918         </class>
3919
3920         <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">
3921                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3922                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3923                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3924                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3925                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3926                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3927                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3928                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3929                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3930                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3931                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3932                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3934                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3935                 </fields>
3936                 <links>
3937                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3938                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3939                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3940                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3941                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3942                 </links>
3943                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3944                         <actions>
3945                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3946                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3947                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3948                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3949                         </actions>
3950                 </permacrud>
3951         </class>
3952
3953         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3954                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3955                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3956                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3957                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3958                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3959                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3960                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3961                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3962                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3963                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3964                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3965                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3966                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3967                 </fields>
3968                 <links>
3969                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3970                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3971                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3972                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3973                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3974                 </links>
3975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3976                         <actions>
3977                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3978                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3979                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3980                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3981                         </actions>
3982                 </permacrud>
3983         </class>
3984         
3985         <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">
3986                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3987                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3988                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3989                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3990                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3991                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3992                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3993                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3994                 </fields>
3995                 <links>
3996                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3997                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3998                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3999                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4000                 </links>
4001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4002                         <actions>
4003                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4004                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4005                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4006                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4007                         </actions>
4008                 </permacrud>
4009         </class>
4010         
4011         <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">
4012                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4013                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4014                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4015                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4016                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4017                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4018                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4019                 </fields>
4020                 <links>
4021                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4022                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4023                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4024                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4025                 </links>
4026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4027                         <actions>
4028                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4029                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4030                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4031                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4032                         </actions>
4033                 </permacrud>
4034         </class>
4035         
4036         <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">
4037                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4038                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4039                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4040                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4041                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4042                 </fields>
4043                 <links>
4044                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4045                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4046                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4047                 </links>
4048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4049                         <actions>
4050                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4051                     <context link="resource" field="owner" />
4052                 </create>
4053                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4054                     <context link="resource" field="owner" />
4055                 </retrieve>
4056                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4057                     <context link="resource" field="owner" />
4058                 </update>
4059                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4060                     <context link="resource" field="owner" />
4061                 </delete>
4062                         </actions>
4063                 </permacrud>
4064         </class>
4065         
4066         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4067                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4068                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4069                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4070                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4071                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4072                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4073                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4074                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4075                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4076                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4077                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4078                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4080                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4081                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4082                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4083                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4084                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4085                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4086                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4087                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4088                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4089                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4090                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4091                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4092                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4093                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4094                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4095                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4096                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4097                 </fields>
4098                 <links>
4099                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4100                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4101                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4102                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4103                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4104                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4105                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4106                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4107                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4108                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4109                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4110                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4111                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4112                 </links>
4113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4114                         <actions>
4115                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4116                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4117                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4118                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4119                         </actions>
4120                 </permacrud>
4121         </class>
4122         
4123         <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">
4124                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4125                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4126                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4127                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4128                 </fields>
4129                 <links>
4130                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4131                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4132                 </links>
4133                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4134                         <actions>
4135                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4136                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4137                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4138                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4139                         </actions>
4140                 </permacrud>
4141         </class>
4142
4143         <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">
4144                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4145                         <field name="bucket" reporter:datatype="link"/>
4146                         <field name="id" reporter:datatype="id" />
4147                         <field name="target_call_number" reporter:datatype="link" />
4148                         <field name="create_time" reporter:datatype="timestamp" />
4149                         <field name="pos" reporter:datatype="int" />
4150                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4151                 </fields>
4152                 <links>
4153                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4154                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4155             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4156                 </links>
4157         </class>
4158         <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">
4159                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4160                         <field name="id" reporter:datatype="id" />
4161                         <field name="item" reporter:datatype="link"/>
4162                         <field name="note" reporter:datatype="text" />
4163                 </fields>
4164                 <links>
4165                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4166                 </links>
4167         </class>
4168         <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">
4169                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4170                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4171                         <field name="btype" reporter:datatype="text"/>
4172                         <field name="id" reporter:datatype="id" />
4173                         <field name="name" reporter:datatype="text"/>
4174                         <field name="description" reporter:datatype="text"/>
4175                         <field name="owner" reporter:datatype="link"/>
4176                         <field name="pub" reporter:datatype="bool"/>
4177                         <field name="create_time" reporter:datatype="timestamp" />
4178                 </fields>
4179                 <links>
4180                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4181                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4182                 </links>
4183         </class>
4184         <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">
4185                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4186                         <field name="id" reporter:datatype="id" />
4187                         <field name="bucket" reporter:datatype="link"/>
4188                         <field name="note" reporter:datatype="text" />
4189                 </fields>
4190                 <links>
4191                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4192                 </links>
4193         </class>
4194         <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">
4195                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4196                         <field name="hold" reporter:datatype="link"/>
4197                         <field name="id" reporter:datatype="id" />
4198                         <field name="target_copy" reporter:datatype="link"/>
4199                         <field name="proximity" reporter:datatype="number"/>
4200                 </fields>
4201                 <links>
4202                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4203                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4204                 </links>
4205         </class>
4206         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4207                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4208                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4209                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4210                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4211                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4212                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4213                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4214                 </fields>
4215                 <links>
4216                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4217                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4218                 </links>
4219         </class>
4220         <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">
4221                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4222                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4223                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4224                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4225                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4226                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4227                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4228                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4229                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4230                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4231                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4232                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4233                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4234                 </fields>
4235                 <links>
4236                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4237                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4238                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4239                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4240                 </links>
4241         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4242             <actions>
4243                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4244                 <retrieve/>
4245                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4246                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4247             </actions>
4248         </permacrud>
4249         </class>
4250         <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">
4251                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4252                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4253                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4254                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4255                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4256             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4257             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4258             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4259                 </fields>
4260                 <links>
4261                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4262                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4263                 </links>
4264         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4265             <actions>
4266                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4267                 <retrieve/>
4268                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4269                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4270             </actions>
4271         </permacrud>
4272         </class>
4273         <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">
4274                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4275                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4276             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4277             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4278                 </fields>
4279                 <links>
4280                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4281                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4282                 </links>
4283         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4284             <actions>
4285                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4286                                         <context link="lgroup" field="owner" />
4287                 </create>
4288                 <retrieve/>
4289                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4290                                         <context link="lgroup" field="owner" />
4291                 </update>
4292                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4293                                         <context link="lgroup" field="owner" />
4294                 </delete>
4295             </actions>
4296         </permacrud>
4297         </class>
4298
4299     <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">
4300         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4301             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4302             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4303             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4304             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4305         </fields>
4306         <links>
4307             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4308             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4309         </links>
4310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4311             <actions>
4312                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4313                 <retrieve/>
4314                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4315                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4316             </actions>
4317         </permacrud>
4318     </class>
4319
4320         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4321                 <fields>
4322                         <field name="sre_id" oils_persist:virtual="true" />
4323                         <field name="location" oils_persist:virtual="true" />
4324                         <field name="owning_lib" oils_persist:virtual="true" />
4325                         <field name="basic_holdings" oils_persist:virtual="true" />
4326                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4327                         <field name="supplement_holdings" oils_persist:virtual="true" />
4328                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4329                         <field name="index_holdings" oils_persist:virtual="true" />
4330                         <field name="index_holdings_add" oils_persist:virtual="true" />
4331                         <field name="online" oils_persist:virtual="true" />
4332                         <field name="missing" oils_persist:virtual="true" />
4333                         <field name="incomplete" oils_persist:virtual="true" />
4334                 </fields>
4335         </class>
4336
4337         <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">
4338                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4339                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4340                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4341                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4342                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4343                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4344                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4345                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4346                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4347                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4348                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4349                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4350                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4351                 </fields>
4352                 <links>
4353                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4354                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4355                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4356                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4357                 </links>
4358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4359                         <actions>
4360                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4361                                 <retrieve/>
4362                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4363                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4364                         </actions>
4365                 </permacrud>
4366         </class>
4367
4368         <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">
4369                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4370                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4371                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4372                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4373                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4374                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4375                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4376                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4377                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4378                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4379                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4380                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4381                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4382                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4383                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4384                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4385                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4386                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4387                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4388                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4389                 </fields>
4390                 <links>
4391                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4392                 </links>
4393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4394                         <actions>
4395                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4396                                         <context link="subscription" field="owning_lib" />
4397                                 </create>
4398                                 <retrieve />
4399                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4400                                         <context link="subscription" field="owning_lib" />
4401                                 </update>
4402                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4403                                         <context link="subscription" field="owning_lib" />
4404                                 </delete>
4405                         </actions>
4406                 </permacrud>
4407         </class>
4408
4409         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4410                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4411                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4412                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4413                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4414                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4415                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4416                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4417                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4419                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4420                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4421                 </fields>
4422                 <links>
4423                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4424                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4425                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4426                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4427                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4428                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4429                 </links>
4430                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4431                         <actions>
4432                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4433                                 <retrieve />
4434                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4435                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4436                         </actions>
4437                 </permacrud>
4438         </class>
4439
4440         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4441                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4442                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4443                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4444                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4445                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4446                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4447                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4448                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4449                 </fields>
4450                 <links>
4451                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4452                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4453                 </links>
4454         </class>
4455
4456         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4457                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4458                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4459                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4460                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4461                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4462                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4463                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4464                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4465                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4466                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4467                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4468                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4469                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4470                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4471                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4472                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4474                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4475                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4476                 </fields>
4477                 <links>
4478                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4479                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4480                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4481                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4482                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4483                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4484                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4485                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4486                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4487                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4488                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4489                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4490                 </links>
4491                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4492                         <actions>
4493                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4494                                 <retrieve />
4495                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4496                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4497                         </actions>
4498                 </permacrud>
4499         </class>
4500
4501         <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">
4502                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4503                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4504                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4505                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4506                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4507                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4508                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4509                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4510                 </fields>
4511                 <links>
4512                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4513                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4514                 </links>
4515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4516                         <actions>
4517                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4518                                         <context link="distribution" field="holding_lib" />
4519                                 </create>
4520                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4521                                         <context link="distribution" field="holding_lib" />
4522                                 </retrieve>
4523                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4524                                         <context link="distribution" field="holding_lib" />
4525                                 </update>
4526                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4527                                         <context link="distribution" field="holding_lib" />
4528                                 </delete>
4529                         </actions>
4530                 </permacrud>
4531         </class>
4532
4533         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4534                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4535                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4536                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4537                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4538                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4539                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4540                 </fields>
4541                 <links>
4542                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4543                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4544                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4545                 </links>
4546                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4547                         <actions>
4548                                 <create permission="ADMIN_SERIAL_STREAM">
4549                                         <context link="distribution" field="holding_lib" />
4550                                 </create>
4551                                 <retrieve />
4552                                 <update permission="ADMIN_SERIAL_STREAM">
4553                                         <context link="distribution" field="holding_lib" />
4554                                 </update>
4555                                 <delete permission="ADMIN_SERIAL_STREAM">
4556                                         <context link="distribution" field="holding_lib" />
4557                                 </delete>
4558                         </actions>
4559                 </permacrud>
4560         </class>
4561
4562         <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">
4563                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4564                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4565                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4566                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4567                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4568                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4569                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4570                 </fields>
4571                 <links>
4572                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4573                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4574                 </links>
4575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4576                         <actions>
4577                                 <create permission="ADMIN_SERIAL_STREAM">
4578                                         <context link="stream" jump="distribution" field="holding_lib" />
4579                                 </create>
4580                                 <retrieve permission="RECEIVE_SERIAL">
4581                                         <context link="stream" jump="distribution" field="holding_lib" />
4582                                 </retrieve>
4583                                 <update permission="ADMIN_SERIAL_STREAM">
4584                                         <context link="stream" jump="distribution" field="holding_lib" />
4585                                 </update>
4586                                 <delete permission="ADMIN_SERIAL_STREAM">
4587                                         <context link="stream" jump="distribution" field="holding_lib" />
4588                                 </delete>
4589                         </actions>
4590                 </permacrud>
4591         </class>
4592
4593         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4594                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4595                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4596                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4597                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4598                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4599                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4600                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4601                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4602                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4603                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4604                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4605                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4606                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4607                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4608                 </fields>
4609                 <links>
4610                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4611                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4612                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4613                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4614                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4615                 </links>
4616                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4617                         <actions>
4618                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4619                                         <context link="subscription" field="owning_lib" />
4620                                 </create>
4621                                 <retrieve/>
4622                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4623                                         <context link="subscription" field="owning_lib" />
4624                                 </update>
4625                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4626                                         <context link="subscription" field="owning_lib" />
4627                                 </delete>
4628                         </actions>
4629                 </permacrud>
4630         </class>
4631
4632         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4633                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4634                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4635                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4636                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4637                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4638                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4639                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4640                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4641                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4642                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4643                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4644                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4645                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4646                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4647                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4648                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4649                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4650                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4651                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4652                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4653                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4654                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4655                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4656                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4657                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4658                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4659                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4660                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4661                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4662                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4663                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4664                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4665                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4666                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4667                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4668                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4669                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4670                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4673                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4674                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4675                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4676                 </fields>
4677                 <links>
4678                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4679                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4680                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4681                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4682                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4683                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4684                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4685                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4686                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4687                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4688                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4689                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4690                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4691                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4692                 </links>
4693                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4694                         <actions>
4695                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4696                                 <retrieve/>
4697                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4698                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4699                         </actions>
4700                 </permacrud>
4701         </class>
4702
4703         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4704                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4705                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4706                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4707                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4708                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4709                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4710                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4711                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4712                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4713                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4714                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4715                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4716                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4717                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4718                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4719                 </fields>
4720                 <links>
4721                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4722                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4723                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4724                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4725                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4726                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4727                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4728                 </links>
4729                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4730                         <actions>
4731                                 <create permission="ADMIN_SERIAL_ITEM">
4732                                         <context link="stream" jump="distribution" field="holding_lib" />
4733                                 </create>
4734                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4735                                         <context link="stream" jump="distribution" field="holding_lib" />
4736                                 </retrieve>
4737                                 <update permission="ADMIN_SERIAL_ITEM">
4738                                         <context link="stream" jump="distribution" field="holding_lib" />
4739                                 </update>
4740                                 <delete permission="ADMIN_SERIAL_ITEM">
4741                                         <context link="stream" jump="distribution" field="holding_lib" />
4742                                 </delete>
4743                         </actions>
4744                 </permacrud>
4745         </class>
4746
4747         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4748                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4749                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4750                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4751                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4752                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4753                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4754                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4755                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4756                 </fields>
4757                 <links>
4758                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4759                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4760                 </links>
4761                 <!-- Not available via PCRUD at this time -->
4762         </class>
4763         <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">
4764                 <fields>
4765                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4766                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4767                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4768                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4769                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4770                 </fields>
4771                 <links>
4772                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4773                 </links>
4774         </class>
4775         <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">
4776                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4777                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4778                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4779                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4780                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4781                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4782                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4783                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4784                 </fields>
4785                 <links>
4786                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4787                 </links>
4788         </class>
4789         <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">
4790                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4791                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4792                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4793                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4794                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4795                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4796                 </fields>
4797                 <links>
4798                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4799                 </links>
4800                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4801                         <actions>
4802                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4803                                         <context link="distribution" field="holding_lib" />
4804                                 </create>
4805                                 <retrieve/>
4806                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4807                                         <context link="distribution" field="holding_lib" />
4808                                 </update>
4809                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4810                                         <context link="distribution" field="holding_lib" />
4811                                 </delete>
4812                         </actions>
4813                 </permacrud>
4814         </class>
4815
4816         <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">
4817                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4818                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4819                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4820                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4821                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4822                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4823                 </fields>
4824                 <links>
4825                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4826                 </links>
4827                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4828                         <actions>
4829                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4830                                         <context link="distribution" field="holding_lib" />
4831                                 </create>
4832                                 <retrieve/>
4833                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4834                                         <context link="distribution" field="holding_lib" />
4835                                 </update>
4836                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4837                                         <context link="distribution" field="holding_lib" />
4838                                 </delete>
4839                         </actions>
4840                 </permacrud>
4841         </class>
4842
4843         <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">
4844                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4845                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4846                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4847                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4848                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4849                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4850                 </fields>
4851                 <links>
4852                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4853                 </links>
4854                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4855                         <actions>
4856                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4857                                         <context link="distribution" field="holding_lib" />
4858                                 </create>
4859                                 <retrieve/>
4860                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4861                                         <context link="distribution" field="holding_lib" />
4862                                 </update>
4863                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4864                                         <context link="distribution" field="holding_lib" />
4865                                 </delete>
4866                         </actions>
4867                 </permacrud>
4868         </class>
4869
4870         <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">
4871                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4872                         <field name="id" reporter:datatype="id" />
4873                         <field name="owning_copy" reporter:datatype="link"/>
4874                         <field name="stat_cat" reporter:datatype="link"/>
4875                         <field name="stat_cat_entry" reporter:datatype="link"/>
4876                 </fields>
4877                 <links>
4878                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4879                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4880                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4881                 </links>
4882         </class>
4883         <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">
4884                 <fields oils_persist:primary="code">
4885                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4886                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4887                 </fields>
4888                 <links/>
4889         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4890             <actions>
4891                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4892                 <retrieve/>
4893                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4894                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4895             </actions>
4896         </permacrud>
4897         </class>
4898         <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">
4899                 <fields oils_persist:primary="code">
4900                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4901                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4902                 </fields>
4903                 <links/>
4904         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4905             <actions>
4906                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4907                 <retrieve/>
4908                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4909                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4910             </actions>
4911         </permacrud>
4912         </class>
4913         <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">
4914                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4915                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4916                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4917                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4918                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4919                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4920                 </fields>
4921                 <links>
4922             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4923         </links>
4924         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4925             <actions>
4926                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4927                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4928                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4929                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4930             </actions>
4931         </permacrud>
4932         </class>
4933         <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">
4934                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4935                         <field name="id" reporter:datatype="id" />
4936                         <field name="name" reporter:datatype="text"/>
4937                 </fields>
4938                 <links/>
4939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4940             <actions>
4941                 <create permission="CREATE_LASSO" global_required="true"/>
4942                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4943                 <update permission="UPDATE_LASSO" global_required="true"/>
4944                 <delete permission="DELETE_LASSO" global_required="true"/>
4945             </actions>
4946         </permacrud>
4947         </class>
4948         <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">
4949                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4950                         <field name="id" reporter:datatype="id" />
4951                         <field name="lasso" reporter:datatype="link"/>
4952                         <field name="org_unit" reporter:datatype="org_unit"/>
4953                 </fields>
4954                 <links>
4955                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4956                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4957                 </links>
4958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4959             <actions>
4960                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4961                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4962                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4963                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4964             </actions>
4965         </permacrud>
4966         </class>
4967         <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">
4968                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4969                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4970                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4971                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4972                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4973                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4974                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4975                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4976                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4977                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4978                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4979                 </fields>
4980                 <links>
4981                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4982                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4983                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4984                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4985                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4986                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4987                 </links>
4988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4989             <actions>
4990                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4991                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4992                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4993                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4994             </actions>
4995         </permacrud>
4996         </class>
4997         <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">
4998                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4999                         <field name="id" reporter:datatype="id" />
5000                         <field name="from_org" reporter:datatype="org_unit"/>
5001                         <field name="to_org" reporter:datatype="org_unit"/>
5002                         <field name="prox" reporter:datatype="int" />
5003                 </fields>
5004                 <links>
5005                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5006                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5007                 </links>
5008         </class>
5009         <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">
5010                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5011                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5012                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5013                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5014                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5015                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5016                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5017                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5018                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5019                 </fields>
5020                 <links/>
5021         </class>
5022         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5023                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5024                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5025                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5026                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5027                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5028                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5029                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5030                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5031                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5032                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5033                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5034                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5035                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5036                 </fields>
5037                 <links>
5038                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5039                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5040                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5041                 </links>
5042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5043             <actions>
5044                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5045                 <retrieve/>
5046                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5047                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5048             </actions>
5049         </permacrud>
5050         </class>
5051         <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">
5052                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5053                         <field name="address_type"  reporter:datatype="text"/>
5054                         <field name="city"  reporter:datatype="text"/>
5055                         <field name="country"  reporter:datatype="text"/>
5056                         <field name="county"  reporter:datatype="text"/>
5057                         <field name="id" reporter:datatype="id" />
5058                         <field name="org_unit" reporter:datatype="org_unit"/>
5059                         <field name="post_code"  reporter:datatype="text"/>
5060                         <field name="state"  reporter:datatype="text"/>
5061                         <field name="street1"  reporter:datatype="text"/>
5062                         <field name="street2"  reporter:datatype="text"/>
5063                         <field name="valid" reporter:datatype="bool"/>
5064                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5065                 </fields>
5066                 <links>
5067                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5068                 </links>
5069         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5070             <actions>
5071                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5072                 <retrieve/>
5073                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5074                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5075             </actions>
5076         </permacrud>
5077         </class>
5078         <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">
5079                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5080                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5081                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5082                         <field name="query_text" reporter:datatype="text"/>
5083                 </fields>
5084         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5085             <actions>
5086                 <retrieve/>
5087             </actions>
5088         </permacrud>
5089         </class>
5090
5091         <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">
5092                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5093                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5094                         <field name="owner" reporter:datatype="org_unit"/>
5095                         <field name="code" reporter:datatype="text"/>
5096                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5097                         <field name="create_date" reporter:datatype="timestamp"/>
5098                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5099                 </fields>
5100                 <links>
5101                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5102                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5103                 </links>
5104         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5105             <actions>
5106                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5107                 <retrieve/>
5108                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5109                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5110             </actions>
5111         </permacrud>
5112         </class>
5113         <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">
5114                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5115                         <field name="id" reporter:datatype="id"/>
5116                         <field name="grp" reporter:datatype="link"/>
5117                         <field name="pos" reporter:datatype="int"/>
5118                         <field name="query" reporter:datatype="link"/>
5119                 </fields>
5120                 <links>
5121                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5122                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5123                 </links>
5124         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5125             <actions>
5126                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5127                     <context link="grp" field="owner"/>
5128                 </create>
5129                 <retrieve/>
5130                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5131                     <context link="grp" field="owner"/>
5132                 </update>
5133                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5134                     <context link="grp" field="owner"/>
5135                 </delete>
5136             </actions>
5137         </permacrud>
5138         </class>
5139
5140         <!-- A note: Please update alhr and ahopl when updating ahr -->
5141         <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">
5142                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5143                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5144                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5145                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5146                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5147                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5148                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5149                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5150                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5151                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5152                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5153                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5154                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5155                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5156                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5157                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5158                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5159                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5161                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5162                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5163                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5164                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5165                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5166                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5167                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5168                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5169                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5170                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5172                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5173                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5174                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5175                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5176                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5177                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5178                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5179                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5180                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5181                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5182                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5183                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5184                 </fields>
5185                 <links>
5186                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5187                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5188                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5189                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5190                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5191                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5192                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5193                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5194                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5195                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5196                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5197                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5198                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5199                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5200                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5201                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5202                 </links>
5203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5204                         <actions>
5205                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5206                         </actions>
5207                 </permacrud>
5208         </class>
5209         <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">
5210                 <oils_persist:source_definition><![CDATA[
5211                 SELECT
5212                         ahr.*,
5213                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5214                                 copy_location_order_position,
5215                         CASE WHEN au.alias IS NOT NULL THEN
5216                                 au.alias
5217                         ELSE
5218                                 au.first_given_name
5219                         END AS usr_alias_or_first_given_name,
5220                         au.first_given_name AS usr_first_given_name,
5221                         au.second_given_name AS usr_second_given_name,
5222                         au.family_name AS usr_family_name,
5223                         au.prefix AS usr_prefix,
5224                         au.suffix AS usr_suffix,
5225                         au.alias AS usr_alias,
5226                         CASE WHEN au.alias IS NOT NULL THEN
5227                                 au.alias
5228                         ELSE
5229                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5230                                         COALESCE(au.family_name, ''),
5231                                         COALESCE(au.suffix, ''),
5232                                         ', ',
5233                                         COALESCE(au.prefix, ''),
5234                                         COALESCE(au.first_given_name, ''),
5235                                         COALESCE(au.second_given_name, '')
5236                                 ], ' '), E'\\s+,', ',')
5237                         END AS usr_alias_or_display_name,
5238                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5239                                 COALESCE(au.family_name, ''),
5240                                 COALESCE(au.suffix, ''),
5241                                 ', ',
5242                                 COALESCE(au.prefix, ''),
5243                                 COALESCE(au.first_given_name, ''),
5244                                 COALESCE(au.second_given_name, '')
5245                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5246                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5247                                 AS call_number_label,
5248                         siss.label AS issuance_label,
5249                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5250                         ahcm_1.copy_count AS potential_copies
5251                 FROM action.hold_request ahr
5252                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5253                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5254                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5255                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5256                 JOIN actor.usr au ON (au.id = ahr.usr)
5257                 JOIN (
5258                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5259                         FROM asset.copy_location
5260                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5261                 LEFT JOIN actor.usr_standing_penalty ausp 
5262                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5263                 LEFT JOIN config.standing_penalty csp
5264                         ON (
5265                                 csp.id = ausp.standing_penalty AND 
5266                                 csp.block_list LIKE '%CAPTURE%' AND (
5267                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5268                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5269                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5270                                         )
5271                                 )
5272                         )
5273                 JOIN (
5274                         SELECT COUNT(target_copy) AS copy_count, hold
5275                         FROM action.hold_copy_map
5276                         GROUP BY 2
5277                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5278                 LEFT JOIN serial.issuance siss
5279                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5280                 LEFT JOIN asset.copy_location_order acplo
5281                         ON (acp.location = acplo.location AND
5282                                 acp.circ_lib = acplo.org)
5283                 WHERE
5284                         ahr.capture_time IS NULL AND
5285                         ahr.cancel_time IS NULL AND
5286                         csp.id IS NULL AND
5287                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5288                 ]]></oils_persist:source_definition>
5289                 <fields oils_persist:primary="id">
5290                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5291                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5292                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5293                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5294                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5295                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5296                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5297                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5298                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5299                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5300                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5301                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5302                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5303                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5304                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5305                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5306                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5307                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5308                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5309                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5310                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5311                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5312                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5313                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5314                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5315                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5316                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5317                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5318                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5319                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5320                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5321                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5322                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5323                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5324                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5325                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5326                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5327                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5328                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5329                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5330                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5331                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5332                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5333                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5334                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5335                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5336                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5337                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5338                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5339                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5340                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5341                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5342                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5343                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5344                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5345                 </fields>
5346                 <links>
5347                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5348                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5349                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5350                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5351                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5352                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5353                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5354                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5355                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5356                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5357                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5358                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5359                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5360                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5361                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5362                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5363                 </links>
5364                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5365                         <actions>
5366                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5367                         </actions>
5368                 </permacrud>
5369         </class>
5370         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5371                 <oils_persist:source_definition>
5372                         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)
5373                 </oils_persist:source_definition>
5374                 <fields oils_persist:primary="id">
5375                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5376                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5377                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5378                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5379                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5380                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5381                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5382                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5383                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5384                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5385                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5386                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5387                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5388                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5389                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5390                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5391                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5392                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5393                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5394                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5395                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5396                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5397                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5398                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5399                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5400                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5401                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5402                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5403                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5404                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5405                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5406                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5407                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5408                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5409                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5410                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5411                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5412                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5413                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5414                 </fields>
5415                 <links>
5416                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5417                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5418                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5419                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5420                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5421                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5422                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5423                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5424                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5425                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5426                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5427                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5428                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5429                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5430                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5431                 </links>
5432         </class>
5433
5434         <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">
5435                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5436                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5437                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5438                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5439                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5440                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5441                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5442                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5443                 </fields>
5444                 <links>
5445                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5446                 </links>
5447                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5448                         <actions>
5449                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5450                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5451                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5452                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5453                         </actions>
5454                 </permacrud>
5455         </class>
5456         <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">
5457                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5458                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5459                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5460                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5461                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5462                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5463                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5464                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5465                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5466                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5467                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5468                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5469                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5470                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5471                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5472                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5473                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5474                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5475                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5476                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5477                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5478                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5479                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5480                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5481                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5482                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5483                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5484                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5485                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5486                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5487                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5488                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5489                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5490                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5491                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5492                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5493                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5494                 </fields>
5495                 <links>
5496                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5497                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5498                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5499                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5500                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5501                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5502                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5503                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5504                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5505                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5506                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5507                 </links>
5508                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5509                         <actions>
5510                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5511                         </actions>
5512                 </permacrud>
5513         </class>
5514         <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">
5515                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5516                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5517                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5518                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5519                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5520                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5521                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5522                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5523                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5524                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5525                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5526                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5527                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5528                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5529                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5530                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5531                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5532                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5533                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5534                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5535                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5536                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5537                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5538                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5539                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5540                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5541                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5542                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5543                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5544                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5545                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5546                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5547                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5548                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5549                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5550                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5551                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5552                 </fields>
5553                 <links>
5554                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5555                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5556                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5557                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5558                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5559                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5560                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5561                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5562                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5563                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5564                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5565                 </links>
5566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5567                         <actions>
5568                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5569                         </actions>
5570                 </permacrud>
5571         </class>
5572
5573         <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">
5574                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5575                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5576                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5577                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5578                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5579                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5580                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5581                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5582                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5583                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5584                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5585                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5586                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5587                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5588                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5589                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5590                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5591                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5592                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5593                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5594                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5595                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5596                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5597                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5598                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5599                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5600                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5601                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5602                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5603                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5604                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5605                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5606                 </fields>
5607                 <links>
5608                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5609                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5610                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5611                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5612                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5613                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5614                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5615                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5616                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5617                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5618                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5619                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5620                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5621                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5622                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5623                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5624                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5625                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5626                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5627                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5628                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5629                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5630                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5631                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5632                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5633                 </links>
5634         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5635             <actions>
5636                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5637                 <retrieve />
5638                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5639                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5640             </actions>
5641         </permacrud>
5642         </class>
5643         <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">
5644                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5645                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5646                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5647                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5648                 </fields>
5649                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5650                         <actions>
5651                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5652                                 <retrieve/>
5653                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5654                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5655                         </actions>
5656                 </permacrud>
5657         </class>
5658         <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">
5659                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5660                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5661                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5662                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5663                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5664                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5665                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5666                 </fields>
5667                 <links>
5668                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5669                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5670                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5671                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5672                 </links>
5673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5674                         <actions>
5675                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5676                                 <retrieve/>
5677                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5678                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5679                         </actions>
5680                 </permacrud>
5681         </class>
5682         <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">
5683                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5684                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5685                         <field name="btype" reporter:datatype="text"/>
5686                         <field name="id" reporter:datatype="id" />
5687                         <field name="name"  reporter:datatype="text"/>
5688                         <field name="description" reporter:datatype="text"/>
5689                         <field name="owner" reporter:datatype="link"/>
5690                         <field name="pub" reporter:datatype="bool"/>
5691                         <field name="create_time" reporter:datatype="timestamp" />
5692                 </fields>
5693                 <links>
5694                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5695                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5696                 </links>
5697         </class>
5698         <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">
5699                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5700                         <field name="id" reporter:datatype="id" />
5701                         <field name="bucket" reporter:datatype="link"/>
5702                         <field name="note" reporter:datatype="text" />
5703                 </fields>
5704                 <links>
5705                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5706                 </links>
5707         </class>
5708         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5709                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5710                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5711                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5712                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5713                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5714                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5715                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5716                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5717                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5718                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5719                 </fields>
5720                 <links>
5721                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5722                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5723                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5724                 </links>
5725         </class>
5726         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5727                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5728                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5729                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5730                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5731                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5732                 </fields>
5733                 <links>
5734                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5735                 </links>
5736                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5737                         <actions>
5738                                 <retrieve permission="VIEW_USER">
5739                                         <context link="usr" field="home_ou" />
5740                                 </retrieve>
5741                         </actions>
5742                 </permacrud>
5743         </class>
5744     <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">
5745         <fields oils_persist:primary="field">
5746             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5747             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5748             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5749         </fields>
5750         <links/>
5751         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5752             <actions>
5753                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5754                 <retrieve />
5755                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5756                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5757             </actions>
5758         </permacrud>
5759     </class>
5760         <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">
5761                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5762                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5763                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5764                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5765                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5766                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5767                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5768                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5769                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5770                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5771                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5772                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5773                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5774                 </fields>
5775                 <links>
5776                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5777                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5778                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5779                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5780                 </links>
5781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5782             <actions>
5783                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5784                 <retrieve />
5785                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5786                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5787             </actions>
5788         </permacrud>
5789         </class>
5790         <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">
5791                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5792                         <field name="field" reporter:datatype="link"/>
5793                         <field name="id" reporter:datatype="id" />
5794                         <field name="source" reporter:datatype="link"/>
5795                         <field name="value"  reporter:datatype="text"/>
5796                 </fields>
5797                 <links>
5798                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5799                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5800                 </links>
5801         </class>
5802         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5803                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5804                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5805                         <field name="btype" reporter:datatype="text"/>
5806                         <field name="id" reporter:datatype="id" />
5807                         <field name="name"  reporter:datatype="text"/>
5808                         <field name="description" reporter:datatype="text"/>
5809                         <field name="owner" reporter:datatype="link"/>
5810                         <field name="pub" reporter:datatype="bool"/>
5811                         <field name="create_time" reporter:datatype="timestamp" />
5812                 </fields>
5813                 <links>
5814                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5815                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5816                 </links>
5817         </class>
5818         <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">
5819                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5820                         <field name="id" reporter:datatype="id" />
5821                         <field name="bucket" reporter:datatype="link"/>
5822                         <field name="note" reporter:datatype="text" />
5823                 </fields>
5824                 <links>
5825                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5826                 </links>
5827         </class>
5828         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5829                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5830                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5831                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5832                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5833                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5834                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5835                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5836                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5837                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5838                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5839                 </fields>
5840                 <links>
5841                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5842                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5843                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5844                 </links>
5845         </class>
5846         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5847                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5848                         <field name="id" reporter:datatype="id" />
5849                         <field name="ind1" />
5850                         <field name="ind2" />
5851                         <field name="record" />
5852                         <field name="subfield" />
5853                         <field name="tag" />
5854                         <field name="value" />
5855                 </fields>
5856                 <links>
5857                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5858                 </links>
5859         </class>
5860         <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">
5861                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
5862                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5863                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
5864                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
5865                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
5866                 </fields>
5867                 <links>
5868                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
5869                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
5870                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
5871                 </links>
5872         </class>
5873         <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">
5874                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5875                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5876                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5877                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5878                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5879                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5880                 </fields>
5881                 <links>
5882                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5883                 </links>
5884         </class>
5885         <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">
5886                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5887                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5888                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5889                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5890                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5891                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5892                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5893                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5894                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5895                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5896                 </fields>
5897                 <links>
5898                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5899                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5900                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5901                 </links>
5902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5903             <actions>
5904                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5905                 <retrieve/>
5906                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5907                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5908             </actions>
5909         </permacrud>
5910         </class>
5911         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5912                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5913                         <field name="create_date" reporter:datatype="timestamp"/>
5914                         <field name="creator" reporter:datatype="link"/>
5915                         <field name="edit_date" reporter:datatype="timestamp"/>
5916                         <field name="editor" reporter:datatype="link"/>
5917                         <field name="id" reporter:datatype="id" />
5918                         <field name="pub" reporter:datatype="bool"/>
5919                         <field name="record" reporter:datatype="link"/>
5920                         <field name="value"  reporter:datatype="text"/>
5921                 </fields>
5922                 <links>
5923                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5924                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5925                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5926                 </links>
5927         </class>
5928         <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">
5929                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5930                         <field name="balance_owed" reporter:datatype="money" />
5931                         <field name="total_owed" reporter:datatype="money" />
5932                         <field name="total_paid" reporter:datatype="money" />
5933                         <field name="usr" reporter:datatype="link"/>
5934                 </fields>
5935                 <links>
5936                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5937                 </links>
5938         </class>
5939         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5940                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5941                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5942                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5943                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5944                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5945                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5946                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5947                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5948                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5949                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5950                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5951                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5952                 </fields>
5953                 <links>
5954                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5955                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5956                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5957                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5958                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5959                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5960                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5961                 </links>
5962         </class>
5963         <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">
5964                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5965                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5966                         <field name="quality" reporter:datatype="int" />
5967                         <field name="source" reporter:datatype="text"/>
5968                         <field name="transcendant" reporter:datatype="bool"/>
5969                         <field name="can_have_copies" reporter:datatype="bool"/>
5970                 </fields>
5971                 <links/>
5972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5973             <actions>
5974                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5975                 <retrieve/>
5976                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5977                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5978             </actions>
5979         </permacrud>
5980         </class>
5981         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5982                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5983                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5984                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5985                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5986                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5987                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5988                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5989                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5990                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5991                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5992                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5993                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5994                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5995                 </fields>
5996                 <links>
5997                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5998                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5999                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6000                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6001                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6002                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6003                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6004                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6005                 </links>
6006         </class>
6007         <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">
6008                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6009                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6010                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6011                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6012                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6013                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6014                 </fields>
6015                 <links>
6016                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6017                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6018                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6019                 </links>
6020         </class>
6021         <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">
6022                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6023                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6024                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6025                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6026                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6027                 </fields>
6028                 <links>
6029                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6030                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6031                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6032                 </links>
6033         </class>
6034         <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">
6035                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6036                         <field name="bucket" reporter:datatype="link"/>
6037                         <field name="id" reporter:datatype="id" />
6038                         <field name="target_user" reporter:datatype="link"/>
6039                         <field name="create_time" reporter:datatype="timestamp" />
6040                         <field name="pos" reporter:datatype="int" />
6041                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6042                 </fields>
6043                 <links>
6044                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6045                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6046             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6047                 </links>
6048         </class>
6049         <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">
6050                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6051                         <field name="id" reporter:datatype="id" />
6052                         <field name="item" reporter:datatype="link"/>
6053                         <field name="note" reporter:datatype="text" />
6054                 </fields>
6055                 <links>
6056                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6057                 </links>
6058         </class>
6059         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6060                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6061                         <field name="balance_owed" reporter:datatype="money" />
6062                         <field name="total_owed" reporter:datatype="money" />
6063                         <field name="total_paid" reporter:datatype="money" />
6064                         <field name="usr" reporter:datatype="link"/>
6065                 </fields>
6066                 <links>
6067                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6068                 </links>
6069         </class>
6070         <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">
6071                 <fields oils_persist:primary="code" oils_persist:sequence="">
6072                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6073                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6074                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6075                 </fields>
6076                 <links/>
6077         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6078             <actions>
6079                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6080                 <retrieve/>
6081                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6082                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6083             </actions>
6084         </permacrud>
6085         </class>
6086         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6087                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6088                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6089                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6090                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6091                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6092                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6093                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6094                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6095                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6096                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6097                 </fields>
6098                 <links>
6099                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6100                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6101                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6102                 </links>
6103         </class>
6104         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6105                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6106                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6107                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6108                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6109                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6110                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6111                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6112                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6113                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6114                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6115                 </fields>
6116                 <links>
6117                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6118                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6119                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6120                 </links>
6121         </class>
6122         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6123                 <fields oils_persist:primary="id" oils_persist:sequence="">
6124                         <field name="checkin_lib" reporter:datatype="link"/>
6125                         <field name="checkin_staff" reporter:datatype="link"/>
6126                         <field name="checkin_time" reporter:datatype="timestamp"/>
6127                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6128                         <field name="circ_staff" reporter:datatype="link"/>
6129                         <field name="desk_renewal" reporter:datatype="bool"/>
6130                         <field name="due_date" reporter:datatype="timestamp"/>
6131                         <field name="duration" reporter:datatype="interval"/>
6132                         <field name="duration_rule" reporter:datatype="link"/>
6133                         <field name="fine_interval" reporter:datatype="interval"/>
6134                         <field name="id" reporter:datatype="id" />
6135                         <field name="max_fine" reporter:datatype="money" />
6136                         <field name="max_fine_rule" reporter:datatype="link"/>
6137                         <field name="opac_renewal" reporter:datatype="bool"/>
6138                         <field name="phone_renewal" reporter:datatype="bool"/>
6139                         <field name="recurring_fine" reporter:datatype="money" />
6140                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6141                         <field name="renewal_remaining" reporter:datatype="int" />
6142             <field name="grace_period" reporter:datatype="interval" />
6143                         <field name="stop_fines" reporter:datatype="text"/>
6144                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6145                         <field name="target_copy" reporter:datatype="link"/>
6146                         <field name="usr" reporter:datatype="link"/>
6147                         <field name="xact_finish" reporter:datatype="timestamp" />
6148                         <field name="xact_start" reporter:datatype="timestamp" />
6149                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6150                 </fields>
6151                 <links>
6152                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6153                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6154                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6155                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6156                 </links>
6157         </class>
6158         <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">
6159                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6160                         <field name="field" reporter:datatype="link"/>
6161                         <field name="id" reporter:datatype="id" />
6162                         <field name="source" reporter:datatype="link"/>
6163                         <field name="value" reporter:datatype="text"/>
6164                 </fields>
6165                 <links>
6166                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6167                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6168                 </links>
6169         </class>
6170         <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">
6171                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6172                         <field name="high" reporter:datatype="money" />
6173                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6174                         <field name="low" reporter:datatype="money" />
6175                         <field name="name" reporter:datatype="text"/>
6176                         <field name="normal" reporter:datatype="money" />
6177                         <field name="recurrence_interval" reporter:datatype="interval"/>
6178             <field name="grace_period" reporter:datatype="interval" />
6179                 </fields>
6180                 <links/>
6181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6182             <actions>
6183                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6184                 <retrieve/>
6185                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6186                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6187             </actions>
6188         </permacrud>
6189         </class>
6190         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6191                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6192                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6193                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6194                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6195                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6196                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6197                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6198                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6199                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6200                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6201                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6202                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6203                 </fields>
6204                 <links>
6205                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6206                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6207                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6208                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6209                 </links>
6210         </class>
6211         <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">
6212                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6213                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6214                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6215                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6216                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6217                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6218                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6219                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6220                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6221                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6222                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6223                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6224                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6225                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6226                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6227                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6228                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6229                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6230                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6231                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6232                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6233                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6234                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6235                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6236                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6237                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6238                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6239                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6240                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6241                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6242                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6243                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6244                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6245                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6246                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6247                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6248                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6249                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6250                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6251                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6252                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6253                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6254                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6255                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6256                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6257                 </fields>
6258                 <links>
6259                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6260                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6261                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6262                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6263                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6264                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6265                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6266                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6267                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6268                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6269                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6270                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6271                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6272                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6273                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6274                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6275                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6276                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6277                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6278                 </links>
6279         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6280             <actions>
6281                 <create permission="CREATE_COPY">
6282                     <context link="call_number" field="owning_lib"/>
6283                 </create>
6284                 <retrieve/>
6285                 <update permission="UPDATE_COPY">
6286                     <context link="call_number" field="owning_lib"/>
6287                 </update>
6288                 <delete permission="DELETE_COPY">
6289                     <context link="call_number" field="owning_lib"/>
6290                 </delete>
6291             </actions>
6292         </permacrud>
6293         </class>
6294
6295         <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">
6296                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6297                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6298                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6299                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6300                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6301                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6302                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6303                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6304                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6305                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6306                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6307                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6308                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6309                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6310                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6311                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6312                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6313                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6314                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6315                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6316                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6317                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6318                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6319                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6320                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6321                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6322                 </fields>
6323                 <links>
6324                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6325                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6326                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6327                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6328                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6329                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6330                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6331                 </links>
6332                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6333                         <actions>
6334                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6335                                 <retrieve />
6336                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6337                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6338                         </actions>
6339                 </permacrud>
6340         </class>
6341
6342         <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">
6343                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6344                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6345                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6346                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6347                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6348                 </fields>
6349                 <links/>
6350         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6351             <actions>
6352                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6353                 <retrieve/>
6354                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6355                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6356             </actions>
6357         </permacrud>
6358         </class>
6359         <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">
6360                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6361                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6362                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6363                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6364                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6365                 </fields>
6366                 <links/>
6367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6368             <actions>
6369                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6370                 <retrieve/>
6371                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6372                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6373             </actions>
6374         </permacrud>
6375         </class>
6376         <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">
6377                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6378                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6379                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6380                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6381                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6382                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6383                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6384                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6385                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6386                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6387                 </fields>
6388                 <links>
6389                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6390                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6391                 </links>
6392         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6393             <actions>
6394                 <create permission="CREATE_PERM" global_required="true"/>
6395                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6396                 <update permission="UPDATE_PERM" global_required="true"/>
6397                 <delete permission="DELETE_PERM" global_required="true"/>
6398             </actions>
6399         </permacrud>
6400         </class>
6401         <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">
6402                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6403                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6404                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6405                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6406                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6407                 </fields>
6408                 <links>
6409                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6410                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6411                 </links>
6412         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6413             <actions>
6414                 <create permission="ADMIN_SURVEY">
6415                     <context link="question" jump="survey" field="owner"/>
6416                 </create>
6417                 <retrieve/>
6418                 <update permission="ADMIN_SURVEY">
6419                     <context link="question" jump="survey" field="owner"/>
6420                 </update>
6421                 <delete permission="ADMIN_SURVEY">
6422                     <context link="question" jump="survey" field="owner"/>
6423                 </delete>
6424             </actions>
6425         </permacrud>
6426         </class>
6427         <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">
6428                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6429                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6430                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6431                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6432                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6433                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6434                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6435                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6436                 </fields>
6437                 <links>
6438                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6439                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6440                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6441                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6442                 </links>
6443         </class>
6444         <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">
6445                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6446                         <field name="balance_owed" reporter:datatype="money" />
6447                         <field name="total_owed" reporter:datatype="money" />
6448                         <field name="total_paid" reporter:datatype="money" />
6449                         <field name="usr" reporter:datatype="link"/>
6450                 </fields>
6451                 <links>
6452                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6453                 </links>
6454         </class>
6455         <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">
6456                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6457                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6458                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6459                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6460                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6461                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6462                 </fields>
6463                 <links>
6464                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6465                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6466                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6467                 </links>
6468         </class>
6469         <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">
6470                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6471                         <field name="field" reporter:datatype="link"/>
6472                         <field name="id" reporter:datatype="id" />
6473                         <field name="source" reporter:datatype="link"/>
6474                         <field name="value" reporter:datatype="text"/>
6475                 </fields>
6476                 <links>
6477                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6478                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6479                 </links>
6480         </class>
6481         <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">
6482                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6483                         <field name="field" reporter:datatype="link"/>
6484                         <field name="id" reporter:datatype="id" />
6485                         <field name="source" reporter:datatype="link"/>
6486                         <field name="value" reporter:datatype="text"/>
6487                 </fields>
6488                 <links>
6489                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6490                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6491                 </links>
6492         </class>
6493         <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">
6494                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6495                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6496                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6497                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6498                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6499                 </fields>
6500                 <links>
6501                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6502                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6503                 </links>
6504         </class>
6505         <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">
6506                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6507                         <field name="depth" reporter:datatype="int" />
6508                         <field name="grantable" reporter:datatype="bool"/>
6509                         <field name="grp" reporter:datatype="link"/>
6510                         <field name="id" reporter:datatype="id" />
6511                         <field name="perm" reporter:datatype="link"/>
6512                 </fields>
6513                 <links>
6514                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6515                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6516                 </links>
6517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6518             <actions>
6519                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6520                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6521                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6522                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6523             </actions>
6524         </permacrud>
6525         </class>
6526         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6527                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6528                         <field name="items" oils_persist:virtual="true" />
6529                         <field name="btype" reporter:datatype="text"/>
6530                         <field name="id" reporter:datatype="id" />
6531                         <field name="name" reporter:datatype="text"/>
6532                         <field name="description" reporter:datatype="text"/>
6533                         <field name="owner" reporter:datatype="link"/>
6534                         <field name="pub" reporter:datatype="bool"/>
6535                         <field name="create_time" reporter:datatype="timestamp" />
6536                 </fields>
6537                 <links>
6538                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6539                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6540                 </links>
6541         </class>
6542         <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">
6543                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6544                         <field name="id" reporter:datatype="id" />
6545                         <field name="bucket" reporter:datatype="link"/>
6546                         <field name="note" reporter:datatype="text" />
6547                 </fields>
6548                 <links>
6549                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6550                 </links>
6551         </class>
6552         <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">
6553                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6554                         <field name="id" reporter:datatype="int" />
6555                         <field name="usr" reporter:datatype="link"/>
6556                         <field name="work_ou" reporter:datatype="link"/>
6557                 </fields>
6558                 <links>
6559                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6560                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6561                 </links>
6562         </class>
6563         <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">
6564                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6565                         <field name="depth" reporter:datatype="int"/>
6566                         <field name="grantable" reporter:datatype="bool"/>
6567                         <field name="id" reporter:datatype="id" />
6568                         <field name="perm" reporter:datatype="link"/>
6569                         <field name="usr" reporter:datatype="link"/>
6570                 </fields>
6571                 <links>
6572                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6573                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6574                 </links>
6575         </class>
6576         <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">
6577                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6578                         <field name="object_id" reporter:datatype="text"/>
6579                         <field name="grantable" reporter:datatype="bool"/>
6580                         <field name="id" reporter:datatype="id" />
6581                         <field name="perm" reporter:datatype="link"/>
6582                         <field name="usr" reporter:datatype="link"/>
6583                         <field name="object_type" reporter:datatype="text"/>
6584                 </fields>
6585                 <links>
6586                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6587                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6588                 </links>
6589         </class>
6590         <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">
6591                 <fields oils_persist:primary="id" oils_persist:sequence="">
6592                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6593                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6594                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6595                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6596                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6597                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6598                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6599                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6600                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6601                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6602                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6603                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6604                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6605                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6606                 </fields>
6607                 <links>
6608                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6609                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6610                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6611                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6612                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6613                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6614                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6615                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6616                 </links>
6617         </class>
6618         <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">
6619                 <fields oils_persist:primary="id" oils_persist:sequence="">
6620                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6621                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6622                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6623                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6624                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6625                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6626                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6627                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6628                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6629                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6630                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6631                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6632                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6633                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6634                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6635                 </fields>
6636                 <links>
6637                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6638                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6639                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6640                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6641                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6642                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6643                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6644                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6645                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6646                 </links>
6647         </class>
6648         <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">
6649                 <fields oils_persist:primary="id" oils_persist:sequence="">
6650                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6651                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6652                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6653                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6654                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6655                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6656                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6657                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6658                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6659                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6660                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6661                 </fields>
6662                 <links>
6663                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6664                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6665                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6666                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6667                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6668                 </links>
6669         </class>
6670         <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">
6671                 <fields oils_persist:primary="id" oils_persist:sequence="">
6672                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6673                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6674                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6675                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6676                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6677                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6678                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6679                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6680                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6681                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6682                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6683                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6684                 </fields>
6685                 <links>
6686                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6687                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6688                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6689                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6690                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6691                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6692                 </links>
6693         </class>
6694         <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">
6695                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6696                         <field name="bucket" reporter:datatype="link"/>
6697                         <field name="id" reporter:datatype="id" />
6698                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6699                         <field name="create_time" reporter:datatype="timestamp" />
6700                         <field name="pos" reporter:datatype="int" />
6701                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6702                 </fields>
6703                 <links>
6704                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6705                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6706             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6707                 </links>
6708         </class>
6709         <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">
6710                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6711                         <field name="id" reporter:datatype="id" />
6712                         <field name="item" reporter:datatype="link"/>
6713                         <field name="note" reporter:datatype="text" />
6714                 </fields>
6715                 <links>
6716                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6717                 </links>
6718         </class>
6719         <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">
6720                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6721                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6722                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6723                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6724                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6725                 </fields>
6726                 <links>
6727                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6728                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6729                 </links>
6730         </class>
6731     <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">
6732         <fields oils_persist:primary="field">
6733             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6734             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6735             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6736         </fields>
6737         <links/>
6738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6739             <actions>
6740                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6741                 <retrieve />
6742                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6743                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6744             </actions>
6745         </permacrud>
6746     </class>
6747         <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">
6748                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6749                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6750                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6751                 </fields>
6752                 <links/>
6753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6754             <actions>
6755                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6756                 <retrieve/>
6757                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6758                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6759             </actions>
6760         </permacrud>
6761         </class>
6762
6763
6764         <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">
6765                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6766                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6767                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6768                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6769                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6770                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6771                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6772                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6773                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6774                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6775                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6776                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6777                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6778                 </fields>
6779                 <links>
6780                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6781                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6782                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6783                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6784                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6785                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6786                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6787                 </links>
6788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6789             <actions>
6790                 <create permission="TRANSIT_COPY">
6791                     <context link="target_copy" field="owner"/>
6792                 </create>
6793                 <retrieve/>
6794                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6795                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6796             </actions>
6797         </permacrud>
6798         </class>
6799         <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">
6800                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6801                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6802                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6803                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6804                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6805                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6806                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6807                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6808                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6809                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6810                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6811                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6812                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6813                 </fields>
6814                 <links>
6815                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6816                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6817                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6818                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6819                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6820                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6821                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6822                 </links>
6823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6824             <actions>
6825                 <create permission="TRANSIT_COPY" context_field="owner">
6826                     <context link="target_copy" field="circ_lib"/>
6827                 </create>
6828                 <retrieve/>
6829                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6830                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6831             </actions>
6832         </permacrud>
6833         </class>
6834         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6835                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6836                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6837                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6838                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6839                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6840                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6841                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6842                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6843                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6844                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6845                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6846                 </fields>
6847                 <links>
6848                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6849                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6850                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6851                 </links>
6852         </class>
6853         <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">
6854                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6855                         <field name="grp" />
6856                         <field name="id" reporter:datatype="id" />
6857                         <field name="usr" />
6858                 </fields>
6859                 <links>
6860                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6861                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6862                 </links>
6863         </class>
6864         <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">
6865                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6866                         <field name="id" reporter:datatype="id" />
6867                         <field name="fq_field" reporter:datatype="text"/>
6868                         <field name="identity_value" reporter:datatype="text"/>
6869                         <field name="translation" reporter:datatype="text"/>
6870                         <field name="string" reporter:datatype="text"/>
6871                 </fields>
6872                 <links>
6873                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6874                 </links>
6875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6876             <actions>
6877                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6878                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6879                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6880                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6881             </actions>
6882         </permacrud>
6883         </class>
6884         <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">
6885                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6886                         <field name="id" reporter:datatype="id" />
6887                         <field name="fm_class" reporter:datatype="text"/>
6888                         <field name="field" reporter:datatype="text"/>
6889                         <field name="owner" reporter:datatype="org_unit"/>
6890                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6891                 </fields>
6892                 <links>
6893                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6894                 </links>
6895         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6896             <actions>
6897                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6898                 <retrieve/>
6899                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6900                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6901             </actions>
6902         </permacrud>
6903         </class>
6904         <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">
6905                 <fields oils_persist:primary="code">
6906                         <field name="code" reporter:datatype="id" />
6907                         <field name="marc_code" reporter:datatype="text"/>
6908                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6909                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6910                 </fields>
6911                 <links/>
6912         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6913             <actions>
6914                 <create permission="CREATE_LOCALE" global_required="true"/>
6915                 <retrieve/>
6916                 <update permission="UPDATE_LOCALE" global_required="true"/>
6917                 <delete permission="DELETE_LOCALE" global_required="true"/>
6918             </actions>
6919         </permacrud>
6920         </class>
6921         <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">
6922                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6923                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6924                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6925                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6926             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6927                 </fields>
6928                 <links>
6929                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6930                 </links>
6931         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6932             <actions>
6933                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6934                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6935                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6936                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6937             </actions>
6938         </permacrud>
6939         </class>
6940
6941         <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">
6942                 <fields oils_persist:primary="id">
6943                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6944                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6945                 </fields>
6946                 <links/>
6947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6948             <actions>
6949                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6950                 <retrieve/>
6951                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6952                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6953             </actions>
6954         </permacrud>
6955         </class>
6956
6957         <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">
6958                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6959                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6960                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6961                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6962                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6963                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6964                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6965                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6966                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6967                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6968                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6969                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6970                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6971                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6972                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6973                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6974                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6975                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6976                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6977                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6978                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6979                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6980                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6981                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6982                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6983                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6984                 </fields>
6985                 <links>
6986                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6987                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6988                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6989                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6990                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6991                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6992                 </links>
6993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6994             <actions>
6995                 <create permission="user_request.create">
6996                     <context link="usr" field="home_ou"/>
6997                                 </create>
6998                 <retrieve permission="user_request.view">
6999                     <context link="usr" field="home_ou"/>
7000                                 </retrieve>
7001                 <update permission="user_request.update">
7002                     <context link="usr" field="home_ou"/>
7003                                 </update>
7004                 <delete permission="user_request.delete">
7005                     <context link="usr" field="home_ou"/>
7006                                 </delete>
7007             </actions>
7008         </permacrud>
7009         </class>
7010
7011         <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">
7012                 <fields oils_persist:primary="code">
7013                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7014                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7015                 </fields>
7016                 <links/>
7017         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7018             <actions>
7019                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7020                 <retrieve/>
7021                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7022                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7023             </actions>
7024         </permacrud>
7025         </class>
7026
7027         <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">
7028                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7029                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7030                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7031                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7032                         <field reporter:label="Ratio" name="ratio" />
7033                 </fields>
7034                 <links>
7035                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7036                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7037                 </links>
7038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7039                         <actions>
7040                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7041                                 <retrieve/>
7042                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7043                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7044                         </actions>
7045                 </permacrud>
7046         </class>
7047
7048         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7049                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7050                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7051                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7052                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7053                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7054                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7055                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7056                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7057                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7058                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7059                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7060                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7061                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7062                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7063                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7064                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7065                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7066                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7067                 </fields>
7068                 <links>
7069                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7070                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7071             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7072             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7073             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7074                 </links>
7075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7076             <actions>
7077                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7078                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7079                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7080                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7081             </actions>
7082         </permacrud>
7083         </class>
7084
7085         <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">
7086                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7087                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7088                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7089                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7090                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7091                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7092                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7093                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7094                 </fields>
7095                 <links>
7096                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7097                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7098                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7099                 </links>
7100         </class>
7101
7102         <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">
7103                 <fields oils_persist:primary="code">
7104                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7105                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7106                 </fields>
7107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7108             <actions>
7109                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7110                 <retrieve/>
7111                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7112                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7113             </actions>
7114                 </permacrud>
7115         </class>
7116
7117         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7118                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7119                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7120                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7121                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7122                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7123                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7124                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7125                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7126                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7127                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7128                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7129                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7130                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7131                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7132                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7133                 </fields>
7134                 <links>
7135                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7136                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7137                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7138                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7139                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7140                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7141                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7142                 </links>
7143         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7144             <actions>
7145                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7146                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7147                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7148                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7149             </actions>
7150         </permacrud>
7151         </class>
7152
7153         <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">
7154                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7156                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7157                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7158                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7159                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7160                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7161                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7162                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7163                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7164                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7165                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7166                 </fields>
7167                 <links>
7168                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7169                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7170                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7171                 </links>
7172         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7173             <actions>
7174                 <create   permission="ADMIN_INVOICE">
7175                                         <context link="invoice" field="receiver"/>
7176                                 </create>
7177                 <retrieve permission="ADMIN_INVOICE">
7178                                         <context link="invoice" field="receiver"/>
7179                                 </retrieve>
7180                 <update   permission="ADMIN_INVOICE">
7181                                         <context link="invoice" field="receiver"/>
7182                                 </update>
7183                                 <delete   permission="ADMIN_INVOICE">
7184                                         <context link="invoice" field="receiver"/>
7185                                 </delete>
7186             </actions>
7187         </permacrud>
7188         </class>
7189
7190         <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">
7191                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7192                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7193                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7194                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7195                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7196                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7197                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7198                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7199                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7200                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7201                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7202                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7203                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7204                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7205                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7206                 </fields>
7207                 <links>
7208                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7209                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7210                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7211                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7212                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7213                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7214                 </links>
7215         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7216             <actions>
7217                 <create   permission="ADMIN_INVOICE">
7218                                         <context link="invoice" field="receiver"/>
7219                                 </create>
7220                 <retrieve permission="ADMIN_INVOICE">
7221                                         <context link="invoice" field="receiver"/>
7222                                 </retrieve>
7223                 <update   permission="ADMIN_INVOICE">
7224                                         <context link="invoice" field="receiver"/>
7225                                 </update>
7226                                 <delete   permission="ADMIN_INVOICE">
7227                                         <context link="invoice" field="receiver"/>
7228                                 </delete>
7229             </actions>
7230         </permacrud>
7231         </class>
7232
7233         <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">
7234                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7235                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7236                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7237                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7238                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7239                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7240                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7241                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7242                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7243                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7244                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7245                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7246                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7247                 </fields>
7248                 <links>
7249                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7250                 </links>
7251         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7252             <actions>
7253                 <create permission="ADMIN_PROVIDER">
7254                     <context link="provider" field="owner"/>
7255                 </create>
7256                 <retrieve permission="ADMIN_PROVIDER">
7257                     <context link="provider" field="owner"/>
7258                 </retrieve>
7259                 <update permission="ADMIN_PROVIDER">
7260                     <context link="provider" field="owner"/>
7261                 </update>
7262                 <delete permission="ADMIN_PROVIDER">
7263                     <context link="provider" field="owner"/>
7264                 </delete>
7265             </actions>
7266         </permacrud>
7267         </class>
7268
7269         <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">
7270                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7271                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7272                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7273                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7274                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7275                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7276                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7277         </fields>
7278                 <links>
7279                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7280                 </links>
7281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7282             <actions>
7283                 <create permission="ADMIN_PROVIDER">
7284                     <context link="provider" field="owner"/>
7285                 </create>
7286                 <retrieve permission="ADMIN_PROVIDER">
7287                     <context link="provider" field="owner"/>
7288                 </retrieve>
7289                 <update permission="ADMIN_PROVIDER">
7290                     <context link="provider" field="owner"/>
7291                 </update>
7292                 <delete permission="ADMIN_PROVIDER">
7293                     <context link="provider" field="owner"/>
7294                 </delete>
7295             </actions>
7296         </permacrud>
7297     </class>
7298         <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">
7299                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7300                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7301                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7302                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7303                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7304                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7305                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7306                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7307                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7308                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7309                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7310                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7311                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7312                 </fields>
7313                 <links>
7314                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7315                 </links>
7316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7317             <actions>
7318                 <create permission="ADMIN_PROVIDER">
7319                     <context link="contact" jump='provider' field="owner"/>
7320                 </create>
7321                 <retrieve permission="ADMIN_PROVIDER">
7322                     <context link="contact" jump='provider' field="owner"/>
7323                 </retrieve>
7324                 <update permission="ADMIN_PROVIDER">
7325                     <context link="contact" jump='provider' field="owner"/>
7326                 </update>
7327                 <delete permission="ADMIN_PROVIDER">
7328                     <context link="contact" jump='provider' field="owner"/>
7329                 </delete>
7330             </actions>
7331         </permacrud>
7332         </class>
7333
7334         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7335                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7336                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7337                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7338                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7339                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7340                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7341                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7342                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7343                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7344                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7345                 </fields>
7346                 <links>
7347                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7348                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7349                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7350                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7351                 </links>
7352         </class>
7353
7354         <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">
7355                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7356                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7357                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7358                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7359                 </fields>
7360                 <links>
7361             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7362                 </links>
7363                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7364                         <actions>
7365                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7366                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7367                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7368                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7369                         </actions>
7370                 </permacrud>
7371         </class>
7372
7373         <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">
7374                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7375                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7376                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7377                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7378                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7379                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7380                 </fields>
7381                 <links>
7382                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7383                 </links>
7384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7385                         <actions>
7386                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7387                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7388                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7389                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7390                         </actions>
7391                 </permacrud>
7392         </class>
7393
7394         <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">
7395                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7396                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7397                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7398                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7399                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7400                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7401                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7402                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7403                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7404                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7405                 </fields>
7406                 <links>
7407                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7408                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7409             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7410             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7411                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7412                 </links>
7413         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7414             <actions>
7415                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7416                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7417                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7418                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7419             </actions>
7420         </permacrud>
7421         </class>
7422
7423         <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">
7424                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7425                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7426                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7427                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7428                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7429                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7430                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7431                 </fields>
7432                 <links>
7433                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7434                 </links>
7435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7436                         <actions>
7437                                 <create permission="ADMIN_FUNDING_SOURCE">
7438                     <context link="funding_source" field="owner"/>
7439                 </create>
7440                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7441                     <context link="funding_source" field="owner"/>
7442                 </retrieve>
7443                                 <update permission="ADMIN_FUNDING_SOURCE">
7444                     <context link="funding_source" field="owner"/>
7445                 </update>
7446                                 <delete permission="ADMIN_FUNDING_SOURCE">
7447                     <context link="funding_source" field="owner"/>
7448                 </delete>
7449                         </actions>
7450                 </permacrud>
7451         </class>
7452
7453         <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">
7454                 <fields oils_persist:primary="id">
7455                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7456                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7457                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7458                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7459                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7460                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7461                 </fields>
7462                 <links>
7463                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7464                 </links>
7465         </class>
7466
7467         <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">
7468                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7469                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7470                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7471                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7472                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7473                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7474                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7475                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7476                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7477                 </fields>
7478                 <links>
7479                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7480                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7481                 </links>
7482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7483                         <actions>
7484                                 <create permission="ADMIN_ACQ_FUND">
7485                     <context link="fund" field="org"/>
7486                 </create>
7487                                 <retrieve permission="ADMIN_ACQ_FUND">
7488                     <context link="fund" field="org"/>
7489                 </retrieve>
7490                                 <update permission="ADMIN_ACQ_FUND">
7491                     <context link="fund" field="org"/>
7492                 </update>
7493                                 <delete permission="ADMIN_ACQ_FUND">
7494                     <context link="fund" field="org"/>
7495                 </delete>
7496                         </actions>
7497                 </permacrud>
7498         </class>
7499
7500         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7501                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7502                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7503                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7504                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7505                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7506                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7507                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7508                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7509                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7510                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7511                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7512                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7513                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7514                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7515                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7516                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7517                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7518                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7519                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7520                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7521                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7522                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7523                 </fields>
7524                 <links>
7525                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7526                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7527             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7528             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7529             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7530             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7531             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7532             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7533             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7534             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7535             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7536                 </links>
7537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7538             <actions>
7539                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7540                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7541                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7542                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7543             </actions>
7544         </permacrud>
7545         </class>
7546
7547         <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">
7548                 <fields oils_persist:primary="fund">
7549                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7550                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7551                 </fields>
7552                 <links>
7553                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7554                 </links>
7555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7556             <actions>
7557                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7558                                         <context link="fund" field="org" />
7559                 </retrieve>
7560             </actions>
7561         </permacrud>
7562         </class>
7563
7564         <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">
7565                 <fields oils_persist:primary="fund">
7566                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7567                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7568                 </fields>
7569                 <links>
7570                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7571                 </links>
7572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7573             <actions>
7574                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7575                                         <context link="fund" field="org" />
7576                 </retrieve>
7577             </actions>
7578         </permacrud>
7579         </class>
7580
7581         <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">
7582                 <fields oils_persist:primary="fund">
7583                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7584                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7585                 </fields>
7586                 <links>
7587                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7588                 </links>
7589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7590             <actions>
7591                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7592                                         <context link="fund" field="org" />
7593                 </retrieve>
7594             </actions>
7595         </permacrud>
7596         </class>
7597
7598         <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">
7599                 <fields oils_persist:primary="fund">
7600                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7601                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7602                 </fields>
7603                 <links>
7604                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7605                 </links>
7606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7607             <actions>
7608                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7609                                         <context link="fund" field="org" />
7610                 </retrieve>
7611             </actions>
7612         </permacrud>
7613         </class>
7614
7615         <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">
7616                 <fields oils_persist:primary="fund">
7617                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7618                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7619                 </fields>
7620                 <links>
7621                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7622                 </links>
7623         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7624             <actions>
7625                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7626                                         <context link="fund" field="org" />
7627                 </retrieve>
7628             </actions>
7629         </permacrud>
7630         </class>
7631
7632    <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">
7633         <fields oils_persist:primary="fund">
7634             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7635             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7636         </fields>
7637         <links>
7638             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7639         </links>
7640     </class>
7641
7642    <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">
7643         <fields oils_persist:primary="fund">
7644             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7645             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7646         </fields>
7647         <links>
7648             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7649         </links>
7650     </class>
7651
7652    <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">
7653         <fields oils_persist:primary="fund">
7654             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7655             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7656         </fields>
7657         <links>
7658             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7659         </links>
7660     </class>
7661
7662    <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">
7663         <fields oils_persist:primary="fund">
7664             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7665             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7666         </fields>
7667         <links>
7668             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7669         </links>
7670     </class>
7671
7672    <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">
7673         <fields oils_persist:primary="fund">
7674             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7675             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7676         </fields>
7677         <links>
7678             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7679         </links>
7680     </class>
7681
7682         <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">
7683                 <fields oils_persist:primary="funding_source">
7684                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7685                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7686                 </fields>
7687                 <links>
7688                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7689                 </links>
7690         </class>
7691
7692         <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">
7693                 <fields oils_persist:primary="funding_source">
7694                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7695                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7696                 </fields>
7697                 <links>
7698                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7699                 </links>
7700         </class>
7701
7702         <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">
7703                 <fields oils_persist:primary="funding_source">
7704                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7705                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7706                 </fields>
7707                 <links>
7708                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7709                 </links>
7710         </class>
7711
7712         <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">
7713                 <fields oils_persist:primary="fund">
7714                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7715                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7716                 </fields>
7717                 <links>
7718                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7719                 </links>
7720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7721             <actions>
7722                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7723                                         <context link="fund" field="org" />
7724                 </retrieve>
7725             </actions>
7726         </permacrud>
7727     </class>
7728     <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">
7729         <oils_persist:source_definition><![CDATA[
7730             SELECT
7731                 acqf.*,
7732                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7733                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7734                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7735                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7736             FROM
7737                 acq.fund acqf
7738                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7739                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7740                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7741                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7742         ]]></oils_persist:source_definition>
7743         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7744             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7745             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7746             <field reporter:label="Name" name="name" reporter:datatype="text" />
7747             <field reporter:label="Year" name="year" reporter:datatype="int" />
7748             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7749             <field reporter:label="Code" name="code" reporter:datatype="text" />
7750             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7751             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7752             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7753             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7754             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7755
7756             <!-- non fund-native fields -->
7757             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7758             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7759             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7760             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7761         </fields>
7762         <links>
7763             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7764             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7765             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7766         </links>
7767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7768             <actions>
7769                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7770             </actions>
7771         </permacrud>
7772         </class>
7773         <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">
7774                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7775                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7776                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7777                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7778                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7779                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7780                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7781                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7782                 </fields>
7783                 <links>
7784                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7785                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7786                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7787                 </links>
7788                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7789                         <actions>
7790                                 <create permission="ADMIN_ACQ_FUND">
7791                     <context link="fund" field="org"/>
7792                 </create>
7793                                 <retrieve permission="ADMIN_ACQ_FUND">
7794                     <context link="fund" field="org"/>
7795                 </retrieve>
7796                                 <update permission="ADMIN_ACQ_FUND">
7797                     <context link="fund" field="org"/>
7798                 </update>
7799                                 <delete permission="ADMIN_ACQ_FUND">
7800                     <context link="fund" field="org"/>
7801                 </delete>
7802                         </actions>
7803                 </permacrud>
7804         </class>
7805
7806     <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">
7807         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7808             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7809             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7810             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7811             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7812             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7813             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7814             <field reporter:label="Note" name="note" reporter:datatype="text" />
7815             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7816         </fields>
7817         <links>
7818             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7819             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7820             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7821         </links>
7822                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7823                         <actions>
7824                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7825                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7826                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7827                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7828                         </actions>
7829                 </permacrud>
7830     </class>
7831
7832         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7834                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7835                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7836                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7837                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7838                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7839                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7840                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7841                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7842                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7843                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7844                 </fields>
7845                 <links>
7846                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7847                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7848                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7849                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7850                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7851                 </links>
7852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7853                         <actions>
7854                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7855                         </actions>
7856                 </permacrud>
7857         </class>
7858
7859         <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">
7860                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7861                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7862                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7863                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
7864                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7865                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7866                 </fields>
7867                 <links>
7868                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7869                 </links>
7870                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7871                         <actions>
7872                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7873                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7874                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7875                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7876                         </actions>
7877                 </permacrud>
7878         </class>
7879
7880         <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">
7881                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7882                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7883                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7884                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7885                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7886                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7887                         <field reporter:label="State" name="state" reporter:datatype="text" />
7888                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7889                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7890                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7891                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7892                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7893                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7894                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7895                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7896                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7897                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7898                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7899                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7900                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7901                 </fields>
7902                 <links>
7903                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7904                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7905                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7906                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7907                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7908                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7909                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7910                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7911                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7912                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7913                 </links>
7914                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7915                         <actions>
7916                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7917                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7918                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7919                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7920                         </actions>
7921                 </permacrud>
7922         </class>
7923
7924         <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">
7925                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7926                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7927                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7928                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7929                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7930                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7931                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7932                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7933                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7934                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7935                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7936                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7937                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7938                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7939                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7940                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7941                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7942                 </fields>
7943                 <links>
7944                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7945                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7946                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7947                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7948                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7949                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7950                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7951                 </links>
7952                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7953             <actions>
7954                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7955             </actions>
7956                 </permacrud>
7957         </class>
7958
7959         <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">
7960                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7961                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7962                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7963                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7964                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7965                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7966                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7967                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7968                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7969                 </fields>
7970                 <links>
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="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7974                 </links>
7975                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7976             <actions>
7977                 <create permission="CREATE_PURCHASE_ORDER">
7978                     <context link="purchase_order" field="ordering_agency"/>
7979                 </create>
7980                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7981                     <context link="purchase_order" field="ordering_agency"/>
7982                 </retrieve>
7983                 <update permission="CREATE_PURCHASE_ORDER">
7984                     <context link="purchase_order" field="ordering_agency"/>
7985                 </update>
7986                 <delete permission="CREATE_PURCHASE_ORDER">
7987                     <context link="purchase_order" field="ordering_agency"/>
7988                 </delete>
7989             </actions>
7990                 </permacrud>
7991         </class>
7992
7993         <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">
7994                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7995                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7996                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7997                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7998                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7999                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8000                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8001                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8002                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8003                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8004                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8005                 </fields>
8006                 <links>
8007                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8008                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8009                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8010                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8011                 </links>
8012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8013             <actions>
8014                 <create permission="CREATE_PURCHASE_ORDER">
8015                     <context link="purchase_order" field="ordering_agency"/>
8016                 </create>
8017                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8018                     <context link="purchase_order" field="ordering_agency"/>
8019                 </retrieve>
8020                 <update permission="CREATE_PURCHASE_ORDER">
8021                     <context link="purchase_order" field="ordering_agency"/>
8022                 </update>
8023                 <delete permission="CREATE_PURCHASE_ORDER">
8024                     <context link="purchase_order" field="ordering_agency"/>
8025                 </delete>
8026             </actions>
8027                 </permacrud>
8028         </class>
8029
8030         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8031                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8032                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8033                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8034                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8035                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8036                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8037                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8038                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8039                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8040                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8041                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8042                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8043                         <field reporter:label="State" name="state" reporter:datatype="text" />
8044                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8045                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8046                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8047                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8048                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8049                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8050                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8051                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8052                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8053                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8054                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8055                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8056                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8057                 </fields>
8058                 <links>
8059                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8060                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8061                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8062                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8063                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8064                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8065                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8066                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8067                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8068                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8069                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8070                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8071                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8072                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8073                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8074                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
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 CREATE_PICKLIST VIEW_PICKLIST">
8079                                         <context link="purchase_order" field="ordering_agency"/>
8080                                         <context link="picklist" field="org_unit"/>
8081                                 </retrieve>
8082                         </actions>
8083                 </permacrud>
8084         </class>
8085
8086         <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">
8087                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8088                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8089                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8090                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8091                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8092                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8093                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8094                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8095                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8096                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8097                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8098                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8099                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8100                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8101                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8102                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8103                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8104                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8105                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8106                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8107                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8108                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8109                 </fields>
8110                 <links>
8111                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8112                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8113                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8114                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8115                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8116                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8117                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8118                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8119                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8120                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8121                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8122                 </links>
8123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8124                         <actions>
8125                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8126                                         <context link="purchase_order" field="ordering_agency"/>
8127                                         <context link="picklist" field="org_unit"/>
8128                                 </retrieve>
8129                         </actions>
8130                 </permacrud>
8131         </class>
8132
8133         <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">
8134                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8135                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8136                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8137                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8138                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8139                 </fields>
8140                 <links>
8141                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8142                 </links>
8143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8144                         <actions>
8145                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8146                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8147                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8148                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8149                         </actions>
8150                 </permacrud>
8151         </class>
8152
8153         <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">
8154                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8155                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8156                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8157                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8158                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8159                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8160                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8161                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8162                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8163                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8164                 </fields>
8165                 <links>
8166                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8167                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8168                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8169                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8170                 </links>
8171         </class>
8172
8173         <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">
8174                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8175                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8176                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8177                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8178                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8179                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8180                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8181                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8182                 </fields>
8183                 <links>
8184                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8185                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8186                 </links>
8187         </class>
8188
8189         <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">
8190                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8191                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8192                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8193                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8194                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8195                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8196                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8197                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8198                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8199                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8200                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8201                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8202                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8203                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8204                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8205                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8206                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8207                 </fields>
8208                 <links>
8209                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8210                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8211                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8212                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8213                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8214                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8215                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8216                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8217                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8218                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8219                 </links>
8220         </class>
8221
8222         <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">
8223                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8224                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8225                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8226                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8227                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8228                 </fields>
8229                 <links/>
8230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8231                         <actions>
8232                                 <retrieve />
8233                         </actions>
8234                 </permacrud>
8235         </class>
8236
8237         <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">
8238                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8239                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8240                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8241                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8242                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8243                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8244             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8245                 </fields>
8246                 <links/>
8247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8248             <actions>
8249                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8250                 <retrieve />
8251                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8252                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8253             </actions>
8254         </permacrud>
8255         </class>
8256
8257         <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">
8258                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8259                         <field reporter:label="Definition 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" oils_persist:i18n="true" />
8262                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8263                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8264                 </fields>
8265                 <links/>
8266         </class>
8267         <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">
8268                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8269                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8270                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8271                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8272                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8273                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8274                 </fields>
8275                 <links>
8276                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8277                 </links>
8278         </class>
8279
8280         <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">
8281             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8282                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8283                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8284                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8285                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8286                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8287                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8288         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8289
8290             </fields>
8291             <links>
8292                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8293             </links>
8294             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8295                 <actions>
8296                     <create permission="ADMIN_PROVIDER">
8297                         <context link="provider" field="owner"/>
8298                     </create>
8299                     <retrieve permission="ADMIN_PROVIDER">
8300                         <context link="provider" field="owner"/>
8301                     </retrieve>
8302                     <update permission="ADMIN_PROVIDER">
8303                         <context link="provider" field="owner"/>
8304                     </update>
8305                     <delete permission="ADMIN_PROVIDER">
8306                         <context link="provider" field="owner"/>
8307                     </delete>
8308                 </actions>
8309             </permacrud>
8310         </class>
8311         
8312         <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">
8313             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8314                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8315                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8316                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8317                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8318             </fields>
8319             <links>
8320                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8321             </links>
8322             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8323                 <actions>
8324                     <create permission="ADMIN_PROVIDER">
8325                         <context link="provider" field="owner"/>
8326                     </create>
8327                     <retrieve permission="ADMIN_PROVIDER">
8328                         <context link="provider" field="owner"/>
8329                     </retrieve>
8330                     <update permission="ADMIN_PROVIDER">
8331                         <context link="provider" field="owner"/>
8332                     </update>
8333                     <delete permission="ADMIN_PROVIDER">
8334                         <context link="provider" field="owner"/>
8335                     </delete>
8336                 </actions>
8337             </permacrud>
8338         </class>
8339         
8340         <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">
8341             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8342                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8343                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8344                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8345                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8346                 </fields>
8347                 <links/>
8348         </class>
8349
8350         <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">
8351                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8352                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8353                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8354                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8355                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8356                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8357                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8358                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8359                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8360                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8361                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8362                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8363                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8364                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8365                 </fields>
8366                 <links>
8367                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8368                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8369                 </links>
8370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8371             <actions>
8372                 <create permission="ADMIN_PROVIDER">
8373                     <context link="provider" field="owner"/>
8374                 </create>
8375                 <retrieve permission="ADMIN_PROVIDER">
8376                     <context link="provider" field="owner"/>
8377                 </retrieve>
8378                 <update permission="ADMIN_PROVIDER">
8379                     <context link="provider" field="owner"/>
8380                 </update>
8381                 <delete permission="ADMIN_PROVIDER">
8382                     <context link="provider" field="owner"/>
8383                 </delete>
8384             </actions>
8385         </permacrud>
8386         </class>
8387
8388         <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">
8389                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8390                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8391                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8392                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8393                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8394                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8395                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8396                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8397                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8398                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8399                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8400                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8401                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8402                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8403                 </fields>
8404                 <links>
8405                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8406                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8407                 </links>
8408         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8409             <actions>
8410                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8411                     <context link="account" jump="provider" field="owner"/>
8412                 </retrieve>
8413                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8414                     <context link="account" jump="provider" field="owner"/>
8415                 </update>
8416                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8417                     <context link="account" jump="provider" field="owner"/>
8418                 </delete>
8419             </actions>
8420         </permacrud>
8421         </class>
8422
8423
8424         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8425                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8426                         <field name="id" reporter:datatype="id" />
8427                         <field name="parent" reporter:datatype="link"/>
8428                         <field name="owner" reporter:datatype="link"/>
8429                         <field name="create_time" reporter:datatype="timestamp"/>
8430                         <field name="name" reporter:datatype="text"/>
8431                         <field name="shared" reporter:datatype="bool"/>
8432                         <field name="share_with" reporter:datatype="link"/>
8433                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8434                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8435                 </fields>
8436                 <links>
8437                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8438                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8439                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8440                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8441                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8442                 </links>
8443         </class>
8444         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8445                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8446                         <field name="id" reporter:datatype="id" />
8447                         <field name="parent" reporter:datatype="link"/>
8448                         <field name="owner" reporter:datatype="link"/>
8449                         <field name="create_time" reporter:datatype="timestamp"/>
8450                         <field name="name" reporter:datatype="text"/>
8451                         <field name="shared" reporter:datatype="bool"/>
8452                         <field name="share_with" reporter:datatype="link"/>
8453                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8454                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8455                 </fields>
8456                 <links>
8457                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8458                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8459                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8460                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8461                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8462                 </links>
8463         </class>
8464         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8465                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8466                         <field name="id" reporter:datatype="id" />
8467                         <field name="parent" reporter:datatype="link"/>
8468                         <field name="owner" reporter:datatype="link"/>
8469                         <field name="create_time" reporter:datatype="timestamp"/>
8470                         <field name="name" reporter:datatype="text"/>
8471                         <field name="shared" reporter:datatype="bool"/>
8472                         <field name="share_with" reporter:datatype="link"/>
8473                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8474                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8475                 </fields>
8476                 <links>
8477                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8478                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8479                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8480                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8481                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8482                 </links>
8483         </class>
8484         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8485                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8486                         <field name="id" reporter:datatype="id" />
8487                         <field name="owner" reporter:datatype="link"/>
8488                         <field name="create_time" reporter:datatype="timestamp"/>
8489                         <field name="name" reporter:datatype="text"/>
8490                         <field name="data" reporter:datatype="text"/>
8491                         <field name="folder" reporter:datatype="link"/>
8492                         <field name="description" reporter:datatype="text"/>
8493                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8494                 </fields>
8495                 <links>
8496                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8497                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8498                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8499                 </links>
8500         </class>
8501         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8502                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8503                         <field name="id" reporter:datatype="id" />
8504                         <field name="owner" reporter:datatype="link"/>
8505                         <field name="create_time" reporter:datatype="timestamp"/>
8506                         <field name="template" reporter:datatype="link"/>
8507                         <field name="data" reporter:datatype="text"/>
8508                         <field name="folder" reporter:datatype="link"/>
8509                         <field name="recur" reporter:datatype="bool"/>
8510                         <field name="recurrence" reporter:datatype="interval"/>
8511                         <field name="name" reporter:datatype="text"/>
8512                         <field name="description" reporter:datatype="text"/>
8513                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8514                 </fields>
8515                 <links>
8516                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8517                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8518                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8519                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8520                 </links>
8521         </class>
8522         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8523                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8524                         <field name="id" reporter:datatype="id" />
8525                         <field name="runner" reporter:datatype="link"/>
8526                         <field name="start_time" reporter:datatype="timestamp"/>
8527                         <field name="complete_time" reporter:datatype="timestamp"/>
8528                         <field name="run_time" reporter:datatype="timestamp"/>
8529                         <field name="email" reporter:datatype="text"/>
8530                         <field name="excel_format" reporter:datatype="bool"/>
8531                         <field name="csv_format" reporter:datatype="bool"/>
8532                         <field name="html_format" reporter:datatype="bool"/>
8533                         <field name="error_code" reporter:datatype="int"/>
8534                         <field name="error_text" reporter:datatype="text"/>
8535                         <field name="report" reporter:datatype="link"/>
8536                         <field name="folder" reporter:datatype="link"/>
8537                         <field name="chart_pie" reporter:datatype="bool"/>
8538                         <field name="chart_bar" reporter:datatype="bool"/>
8539                         <field name="chart_line" reporter:datatype="bool"/>
8540                 </fields>
8541                 <links>
8542                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8543                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8544                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8545                 </links>
8546         </class>
8547         <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">
8548                 <fields oils_persist:primary="id">
8549                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8550                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8551                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8552                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8553                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8554                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8555                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8556                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8557                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8558                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8559                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8560                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8561                 </fields>
8562                 <links>
8563                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8564                 </links>
8565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8566                         <actions>
8567                                 <retrieve />
8568                         </actions>
8569                 </permacrud>
8570         </class>
8571         <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">
8572                 <fields oils_persist:primary="id">
8573                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8574                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8575                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8576                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8577                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8578                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8579                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8580                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8581                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8582                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8583                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8584                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8585                 </fields>
8586                 <links>
8587                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8588                 </links>
8589         </class>
8590         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8591                 <fields oils_persist:primary="id">
8592                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8593                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8594                         <field reporter:label="Fingerprint" name="fingerprint" />
8595                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8596                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8597                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8598                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8599                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8600                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8601                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8602                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8603                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8604                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8605                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8606                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8607                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8608                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8609                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8610                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8611                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8612                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8613                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8614                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8615                 </fields>
8616                 <links>
8617                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8618                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8619                 </links>
8620         </class>
8621         <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">
8622                 <fields oils_persist:primary="id">
8623                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8624                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8625                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8626                 </fields>
8627                 <links>
8628                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8629                 </links>
8630         </class>
8631         <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">
8632                 <fields oils_persist:primary="id">
8633                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8634                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8635                 </fields>
8636                 <links>
8637                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8638                 </links>
8639         </class>
8640         <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">
8641                 <fields oils_persist:primary="id">
8642                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8643                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8644                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8645                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8646                 </fields>
8647                 <links>
8648                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8649                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8650                 </links>
8651         </class>
8652         <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">
8653                 <fields oils_persist:primary="xact">
8654                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8655                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8656                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8657                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8658                 </fields>
8659                 <links>
8660                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8661                 </links>
8662         </class>
8663         <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">
8664                 <fields oils_persist:primary="xact">
8665                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8666                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8667                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8668                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8669                 </fields>
8670                 <links>
8671                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8672                 </links>
8673         </class>
8674         <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)">
8675                 <fields oils_persist:primary="id">
8676                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8677                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8678                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8679                 </fields>
8680                 <links>
8681                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8682                 </links>
8683         </class>
8684         <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">
8685                 <fields oils_persist:primary="id">
8686                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8687                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8688                 </fields>
8689                 <links>
8690                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8691                 </links>
8692         </class>
8693         <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">
8694                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8695                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8696                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8697                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8698                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8699                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8700                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8701                 </fields>
8702                 <links>
8703                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8704                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8705                 </links>
8706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8707                         <actions>
8708                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8709                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8710                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8711                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8712                         </actions>
8713                 </permacrud>
8714         </class>
8715         <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">
8716                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8717                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8718                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8719                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8720                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8721                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8722                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8723                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8724                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8725                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8726                 </fields>
8727                 <links>
8728                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8729                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8730                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8731                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8732                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8733                 </links>
8734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8735                         <actions>
8736                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8737                                         <context link="formula" field="owner"/>
8738                                 </create>
8739                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8740                                         <context link="formula" field="owner"/>
8741                                 </retrieve>
8742                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8743                                         <context link="formula" field="owner"/>
8744                                 </update>
8745                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8746                                         <context link="formula" field="owner"/>
8747                                 </delete>
8748                         </actions>
8749                 </permacrud>
8750         </class>
8751
8752         <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">
8753                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8754                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8755                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8756                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8757                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8758                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8759                 </fields>
8760                 <links>
8761                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8762                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8763                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8764                 </links>
8765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8766                         <actions>
8767                                 <create permission="CREATE_PURCHASE_ORDER">
8768                                         <context link="formula" field="owner"/>
8769                 </create>
8770                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8771                                         <context link="formula" field="owner"/>
8772                 </retrieve>
8773                                 <update permission="CREATE_PURCHASE_ORDER">
8774                                         <context link="formula" field="owner"/>
8775                 </update>
8776                                 <delete permission="CREATE_PURCHASE_ORDER">
8777                                         <context link="formula" field="owner"/>
8778                 </delete>
8779                         </actions>
8780                 </permacrud>
8781         </class>
8782
8783         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8784                 <fields oils_persist:primary="id">
8785                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8786                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8787                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8788                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8789                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8790                 </fields>
8791                 <links>
8792                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8793                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8794                 </links>
8795         </class>
8796
8797         <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">
8798                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8799                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8800                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8801                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8802                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8803                 </fields>
8804                 <links>
8805                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8806                 </links>
8807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8808                         <actions>
8809                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8810                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8811                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8812                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8813                         </actions>
8814                 </permacrud>
8815         </class>
8816
8817         <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">
8818                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8819                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8820                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8821                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8822                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8823                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8824                 </fields>
8825                 <links>
8826                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8827                 </links>
8828                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8829                         <actions>
8830                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8831                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8832                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8833                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8834                         </actions>
8835                 </permacrud>
8836         </class>
8837
8838         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8839                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8840                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8841                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8842                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8843                 </fields>
8844                 <links>
8845                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8846                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8847                 </links>
8848         </class>
8849
8850         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8851                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8852                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8853                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8854                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8855                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8856                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8857                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8858                 </fields>
8859                 <links>
8860                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8861                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8862                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8863                 </links>
8864         </class>
8865
8866         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8867                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8868                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8869                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8870                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8871                 </fields>
8872                 <links>
8873                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8874                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8875                 </links>
8876         </class>
8877
8878         <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">
8879                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8880                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8881                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8882                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8883                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8884                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8885                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8886                 </fields>
8887                 <links>
8888                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8889                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8890                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8891                 </links>
8892         </class>
8893
8894         <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">
8895                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8896                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8897                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8898                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8899                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8900                 </fields>
8901                 <links>
8902                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8903                 </links>
8904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8905             <actions>
8906                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8907                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8908                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8909                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8910             </actions>
8911                 </permacrud>
8912         </class>
8913
8914         <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">
8915                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8916                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8917                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8918                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8919                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8920                 </fields>
8921                 <links>
8922                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8923                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8924                 </links>
8925                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8926                         <actions>
8927                                 <create permission="ADMIN_CLAIM_POLICY">
8928                                         <context link="claim_policy" field="org_unit"/>
8929                 </create>
8930                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8931                                         <context link="claim_policy" field="org_unit"/>
8932                 </retrieve>
8933                                 <update permission="ADMIN_CLAIM_POLICY">
8934                                         <context link="claim_policy" field="org_unit"/>
8935                 </update>
8936                                 <delete permission="ADMIN_CLAIM_POLICY">
8937                                         <context link="claim_policy" field="org_unit"/>
8938                 </delete>
8939                         </actions>
8940                 </permacrud>
8941         </class>
8942
8943     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8944         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
8945             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8946             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8947             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8948             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8949             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8950             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8951             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8952             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8953             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8954             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8955             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8956             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8957             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8958             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8959             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8960             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
8961         </fields>
8962         <links>
8963             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
8964         </links>
8965     </class>
8966
8967     <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">
8968         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8969             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8970             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8971             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8972             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8973             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8974         </fields>
8975     </class>
8976
8977     <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">
8978         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8979             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8980             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8981             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8982             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8983             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8984             <field reporter:label="City" name="city" reporter:datatype="text"/>
8985             <field reporter:label="County" name="county"  reporter:datatype="text"/>
8986             <field reporter:label="State" name="state" reporter:datatype="text"/>
8987             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8988             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8989             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8990         </fields>
8991     </class>
8992
8993     <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">
8994         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8995             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8996             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8997             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8998             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8999             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9000             <field reporter:label="City" name="city" reporter:datatype="text"/>
9001             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9002             <field reporter:label="State" name="state" reporter:datatype="text"/>
9003             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9004             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9005             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9006         </fields>
9007     </class>
9008
9009     <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">
9010         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9011             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9012             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9013             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9014             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9015             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9016             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9017         </fields>
9018     </class>
9019
9020         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9021                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9022                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9023                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9024                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9025                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9026                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9027                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9028                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9029                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9030                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9031                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9032                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9033                 </fields>
9034                 <links>
9035                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9036                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9037                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9038                 </links>
9039         </class>
9040
9041         <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">
9042                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9043                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9044                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9045                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9046                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9047                 </fields>
9048                 <links>
9049                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9050                 </links>
9051         </class>
9052
9053     <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">
9054         <fields>
9055             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9056             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9057             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9058         </fields>
9059                 <links>
9060                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9061                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9062                 </links>
9063     </class>
9064
9065     <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">
9066         <fields>
9067             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9068             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9069         </fields>
9070                 <links>
9071                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9072                 </links>
9073     </class>
9074
9075     <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">
9076         <fields>
9077             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9078             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9079             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9080         </fields>
9081                 <links>
9082                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9083                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9084                 </links>
9085     </class>
9086
9087     <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">
9088         <fields>
9089             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9090             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9091         </fields>
9092                 <links>
9093                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9094                 </links>
9095     </class>
9096
9097     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9098                 <oils_persist:source_definition>
9099
9100             SELECT  DISTINCT l.*
9101               FROM  action.unfulfilled_hold_loops l
9102                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9103               WHERE l.count = m.max
9104
9105                 </oils_persist:source_definition>
9106         <fields>
9107             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9108             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9109             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9110         </fields>
9111                 <links>
9112                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9113                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9114                 </links>
9115     </class>
9116
9117         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9118                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9119                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9120                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9121                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9122                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9123                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9124                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9125                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9126                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9127                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9128                 </fields>
9129                 <links>
9130                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9131                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9132                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9133                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9134                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9135                 </links>
9136         </class>
9137
9138         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9139                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9140                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9141                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9142                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9143                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9144                 </fields>
9145                 <links>
9146                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9147                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9148                 </links>
9149         </class>
9150
9151         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9152                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9153                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9154                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9155                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9156                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9157                 </fields>
9158                 <links>
9159                 </links>
9160         </class>
9161
9162         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9163                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9164                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9165                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9166                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9167                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9168                 </fields>
9169                 <links>
9170                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9171                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9172                 </links>
9173         </class>
9174         
9175         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9176                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9177                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9178                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9179                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9180                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9181                 </fields>
9182                 <links>
9183                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9184                 </links>
9185         </class>
9186         
9187         <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">
9188                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9189                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9190                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9191                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9192                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9193                 </fields>
9194                 <links>
9195                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9196                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9197                 </links>
9198         </class>
9199
9200         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9201                 <fields oils_persist:primary="name">
9202                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9203                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9204                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9205                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9206                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9207                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9208                 </fields>
9209                 <links>
9210                 </links>
9211         </class>
9212
9213         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9214                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9215                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9216                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9217                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9218                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9219                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9220                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9221                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9222                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9223                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9224                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9225                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9226                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9227                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9228                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9229                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9230                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9231                 </fields>
9232                 <links>
9233                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9234                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9235                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9236                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9237                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9238                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9239                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9240                 </links>
9241         </class>
9242
9243         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9244                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9245                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9246                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9247                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9248                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9249                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9250                 </fields>
9251                 <links>
9252                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9253                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9254                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9255                 </links>
9256         </class>
9257
9258         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9259                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9260                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9261                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9262                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9263                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9264                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9265                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9266                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9267                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9268                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9269                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9270                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9271                 </fields>
9272                 <links>
9273                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9274                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9275                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9276                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9277                 </links>
9278         </class>
9279
9280         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9281                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9282                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9283                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9284                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9285                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9286                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9287                 </fields>
9288                 <links>
9289                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9290                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9291                 </links>
9292         </class>
9293
9294         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9295                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9296                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9297                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9298                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9299                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9300                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9301                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9302                 </fields>
9303                 <links>
9304                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9305                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9306                 </links>
9307         </class>
9308
9309         <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">
9310                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9311                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9312                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9313                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9314                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9315                 </fields>
9316                 <links>
9317                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9318                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9319                 </links>
9320         </class>
9321
9322         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9323                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9324                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9325                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9326                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9327                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9328                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9329                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9330                 </fields>
9331                 <links>
9332                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9333                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9334                 </links>
9335         </class>
9336
9337         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable 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="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9341                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9342                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9343                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9344                 </fields>
9345                 <links>
9346                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9347                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9348                 </links>
9349         </class>
9350
9351         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9352                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9353                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9354                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9355                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9356                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9357                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9358                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9359                 </fields>
9360                 <links>
9361                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9362                 </links>
9363         </class>
9364
9365         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9366                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9367                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9368                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9369                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9370                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9371                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9372                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9373                 </fields>
9374                 <links>
9375                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9376                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9377                 </links>
9378         </class>
9379
9380         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9381                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9382                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9383                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9384                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9385                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9386                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9387                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9388                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9389                 </fields>
9390                 <links>
9391                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9392                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9393                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9394                 </links>
9395         </class>
9396
9397         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9398                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9399                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9400                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9401                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9402                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9403                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9404                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9405                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9406                 </fields>
9407                 <links>
9408                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9409                 </links>
9410         </class>
9411
9412         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9413                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9414                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9415                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9416                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9417                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9418                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9419                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9420                 </fields>
9421                 <links>
9422                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9423                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9424                 </links>
9425         </class>
9426
9427         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9428                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9429                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9430                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9431                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9432                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9433                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9434                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9435                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9436                 </fields>
9437                 <links>
9438                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9439                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9440                 </links>
9441         </class>
9442
9443         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9444                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9445                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9446                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9447                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9448                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9449                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9450                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9451                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9452                 </fields>
9453                 <links>
9454                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9455                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9456                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9457                 </links>
9458         </class>
9459
9460         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9461                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9462                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9463                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9464                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9465                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9466                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9467                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9468                 </fields>
9469                 <links>
9470                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9471                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9472                 </links>
9473         </class>
9474
9475         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null 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="Negate?" name="negate" reporter:datatype="bool"/>
9482                 </fields>
9483                 <links>
9484                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9485                 </links>
9486         </class>
9487
9488         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9489                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9490                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9491                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9492                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9493                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9494                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9495                 </fields>
9496                 <links>
9497                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9498                 </links>
9499         </class>
9500
9501         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9502                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9503                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9504                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9505                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9506                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9507                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9508                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9509                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9510                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9511                 </fields>
9512                 <links>
9513                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9514                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9515                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9516                 </links>
9517         </class>
9518
9519         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9520                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9521                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9522                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9523                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9524                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9525                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9526                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9527                 </fields>
9528                 <links>
9529                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9530                 </links>
9531         </class>
9532
9533         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9534                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9535                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9536                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9537                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9538                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9539                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9540                 </fields>
9541                 <links>
9542                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9543                 </links>
9544         </class>
9545
9546         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9547                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9548                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9549                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9550                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9551                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9552                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9553                 </fields>
9554                 <links>
9555                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9556                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9557                 </links>
9558         </class>
9559
9560         <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">
9561                 <fields oils_persist:primary="id">
9562                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9563                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9564                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9565                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9566                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9567                 </fields>
9568                 <links>
9569                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9570                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9571                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9572                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9573                 </links>
9574         </class>
9575
9576         <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">
9577                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9578                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9579                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9580                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9581                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9582                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9583                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9584                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9585                 </fields>
9586                 <links/>
9587                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9588                         <actions>
9589                                 <retrieve/>
9590                         </actions>
9591                 </permacrud>
9592         </class>
9593
9594         <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">
9595                 <fields oils_persist:primary="ptype_key">
9596                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9597                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9598                 </fields>
9599                 <links/>
9600                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9601                         <actions>
9602                                 <retrieve/>
9603                         </actions>
9604                 </permacrud>
9605         </class>
9606
9607         <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">
9608                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9609                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9610                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9611                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9612                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9613                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9614                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9615                 </fields>
9616                 <links>
9617                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9618                 </links>
9619                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9620                         <actions>
9621                                 <retrieve/>
9622                         </actions>
9623                 </permacrud>
9624         </class>
9625
9626         <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">
9627                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9628                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9629                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9630                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9631                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9632                 </fields>
9633                 <links>
9634                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9635                 </links>
9636                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9637                         <actions>
9638                                 <retrieve/>
9639                         </actions>
9640                 </permacrud>
9641         </class>
9642
9643     <class
9644         id="uvs"
9645         controller="open-ils.cstore open-ils.pcrud"
9646         oils_obj:fieldmapper="url_verify::session"
9647         oils_persist:tablename="url_verify.session"
9648         reporter:label="URL Verification Session"
9649     >
9650         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9651             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9652             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9653                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9654             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9655             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9656             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9657             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9658             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9659             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9660         </fields>
9661
9662         <links>
9663             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9664             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9665             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9666             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9667             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9668         </links>
9669
9670         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9671             <actions>
9672                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9673             </actions>
9674         </permacrud>
9675
9676     </class>
9677
9678     <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">
9679         <oils_persist:source_definition>
9680             SELECT
9681                 cbrebi.id AS id,  -- so we can have a pkey in our view
9682                 uvs.id AS session,
9683                 uvs.owning_lib,
9684                 cbrebi.target_biblio_record_entry
9685             FROM url_verify.session uvs
9686             JOIN container.biblio_record_entry_bucket cbreb
9687                 ON (uvs.container = cbreb.id)
9688             JOIN container.biblio_record_entry_bucket_item cbrebi
9689                 ON (cbrebi.bucket = cbreb.id)
9690         </oils_persist:source_definition>
9691         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9692             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9693             <field reporter:label="Session" name="session" reporter:datatype="link" />
9694             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9695             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9696         </fields>
9697         <links>
9698             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9699             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9700             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9701         </links>
9702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9703             <actions>
9704                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9705             </actions>
9706         </permacrud>
9707     </class>
9708
9709     <class
9710         id="uvus"
9711         controller="open-ils.cstore open-ils.pcrud"
9712         oils_obj:fieldmapper="url_verify::url_selector"
9713         oils_persist:tablename="url_verify.url_selector"
9714         reporter:label="URL Verification URL Selector"
9715     >
9716         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9717             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9718             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9719                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9720             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9721         </fields>
9722
9723         <links>
9724             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9725             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9726         </links>
9727
9728         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9729             <actions>
9730                 <create permission="URL_VERIFY">
9731                     <context link="session" field="owning_lib"/>
9732                 </create>
9733                 <retrieve permission="URL_VERIFY">
9734                     <context link="session" field="owning_lib"/>
9735                 </retrieve>
9736                 <update permission="URL_VERIFY">
9737                     <context link="session" field="owning_lib"/>
9738                 </update>
9739                 <delete permission="URL_VERIFY">
9740                     <context link="session" field="owning_lib"/>
9741                 </delete>
9742             </actions>
9743         </permacrud>
9744
9745     </class>
9746
9747     <class
9748         id="uvu"
9749         controller="open-ils.cstore open-ils.pcrud"
9750         oils_obj:fieldmapper="url_verify::url"
9751         oils_persist:tablename="url_verify.url"
9752         reporter:label="URL Verification URL"
9753     >
9754         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9755             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9756                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9757                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9758                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9759                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9760             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9761             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9762             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9763             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9764             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9765             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9766             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9767             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9768             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9769             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9770             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9771             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9772             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9773         </fields>
9774
9775         <links>
9776             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9777             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9778             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9779             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9780             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9781         </links>
9782
9783         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9784             <actions>
9785                 <create permission="URL_VERIFY">
9786                     <context link="session" field="owning_lib"/>
9787                 </create>
9788                 <retrieve permission="URL_VERIFY">
9789                     <context link="session" field="owning_lib"/>
9790                 </retrieve>
9791                 <update permission="URL_VERIFY">
9792                     <context link="session" field="owning_lib"/>
9793                 </update>
9794                 <delete permission="URL_VERIFY">
9795                     <context link="session" field="owning_lib"/>
9796                 </delete>
9797             </actions>
9798         </permacrud>
9799
9800     </class>
9801
9802     <class
9803         id="uvva"
9804         controller="open-ils.cstore open-ils.pcrud"
9805         oils_obj:fieldmapper="url_verify::verification_attempt"
9806         oils_persist:tablename="url_verify.verification_attempt"
9807         reporter:label="URL Verification Attempt"
9808     >
9809         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9810             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9811                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9812                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9813             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9814             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9815         </fields>
9816
9817         <links>
9818             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9819             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9820         </links>
9821
9822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9823             <actions>
9824                 <create permission="URL_VERIFY">
9825                     <context link="session" field="owning_lib"/>
9826                 </create>
9827                 <retrieve permission="URL_VERIFY">
9828                     <context link="session" field="owning_lib"/>
9829                 </retrieve>
9830                 <update permission="URL_VERIFY">
9831                     <context link="session" field="owning_lib"/>
9832                 </update>
9833                 <delete permission="URL_VERIFY">
9834                     <context link="session" field="owning_lib"/>
9835                 </delete>
9836             </actions>
9837         </permacrud>
9838
9839     </class>
9840
9841     <class
9842         id="uvuv"
9843         controller="open-ils.cstore open-ils.pcrud"
9844         oils_obj:fieldmapper="url_verify::url_verification"
9845         oils_persist:tablename="url_verify.url_verification"
9846         reporter:label="URL Verification"
9847     >
9848         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9849             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9850                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9851                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9852             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9853             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9854             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9855             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9856                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9857         </fields>
9858
9859         <links>
9860             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9861             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9862             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9863         </links>
9864
9865         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9866             <actions>
9867                 <create permission="URL_VERIFY">
9868                     <context link="attempt" jump="session" field="owning_lib"/>
9869                 </create>
9870                 <retrieve permission="URL_VERIFY">
9871                     <context link="attempt" jump="session" field="owning_lib"/>
9872                 </retrieve>
9873                 <update permission="URL_VERIFY">
9874                     <context link="attempt" jump="session" field="owning_lib"/>
9875                 </update>
9876                 <delete permission="URL_VERIFY">
9877                     <context link="attempt" jump="session" field="owning_lib"/>
9878                 </delete>
9879             </actions>
9880         </permacrud>
9881
9882     </class>
9883
9884         <class
9885                 id="cfdi"
9886                 controller="open-ils.cstore open-ils.pcrud"
9887                 oils_obj:fieldmapper="config::filter_dialog_interface"
9888                 oils_persist:tablename="config.filter_dialog_interface"
9889                 reporter:label="FilterDialog Interface">
9890                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9891                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9892                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9893                 </fields>
9894                 <links>
9895                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9896                 </links>
9897                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9898                         <actions>
9899                                 <retrieve />
9900                         </actions>
9901                 </permacrud>
9902         </class>
9903
9904         <class
9905                 id="cfdfs"
9906                 controller="open-ils.cstore open-ils.pcrud"
9907                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9908                 oils_persist:tablename="config.filter_dialog_filter_set"
9909                 reporter:label="FilterDialog Filter Set">
9910                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9911                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9912                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9913                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9914                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9915                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9916                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9917                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9918                 </fields>
9919                 <links>
9920                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9921                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9922                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9923                 </links>
9924                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9925                         <actions>
9926                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9927                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9928                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9929                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9930                         </actions>
9931                 </permacrud>
9932
9933         </class>
9934
9935         <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">
9936                 <fields oils_persist:primary="code">
9937                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9938                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9939                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9940                 </fields>
9941                 <links/>
9942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9943                         <actions>
9944                                 <retrieve/>
9945                         </actions>
9946                 </permacrud>
9947         </class>
9948
9949         <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">
9950                 <oils_persist:source_definition>
9951
9952             SELECT  b.id,
9953                     MAX(dcp.edit_date) AS last_delete_date
9954              FROM   biblio.record_entry b
9955                     JOIN asset.call_number cn ON (cn.record = b.id)
9956                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9957              WHERE  NOT b.deleted
9958              GROUP BY b.id
9959              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9960
9961                 </oils_persist:source_definition>
9962                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9963                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9964                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9965                 </fields>
9966                 <links>
9967                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9968                 </links>
9969                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9970                         <actions>
9971                                 <retrieve/>
9972                         </actions>
9973                 </permacrud>
9974         </class>
9975
9976         <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">
9977                 <oils_persist:source_definition>
9978
9979             -- -- 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.
9980             -- -- 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
9981             -- -- may not.
9982             -- SELECT
9983             --     bre.id AS "bib_id",
9984             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9985             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9986             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9987             -- FROM (
9988                 SELECT
9989                     y.bre AS "id",
9990                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9991                     y.hold_count AS "hold_count",
9992                     (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"
9993                 FROM (
9994                         SELECT
9995                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9996                             COUNT(*) AS "hold_count"
9997                         FROM action.hold_request h
9998                         WHERE
9999                             cancel_time IS NULL
10000                             AND fulfillment_time IS NULL
10001                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10002                         GROUP BY 1
10003                     )y LEFT JOIN (
10004                         SELECT 
10005                             (SELECT id
10006                                 FROM biblio.record_entry 
10007                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
10008                             ) AS "bre", 
10009                             COUNT(*) AS "copy_count"
10010                         FROM asset.copy
10011                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10012                         WHERE copy.holdable 
10013                             AND NOT copy.deleted 
10014                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10015                         GROUP BY 1
10016                     )x ON x.bre = y.bre
10017                 -- )z RIGHT JOIN (
10018                 --     SELECT id
10019                 --     FROM biblio.record_entry
10020                 --     WHERE NOT deleted
10021                 -- )bre ON (z.bib_id = bre.id)
10022                 
10023
10024                 </oils_persist:source_definition>
10025                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10026                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10027                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10028                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10029                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10030                 </fields>
10031                 <links>
10032                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10033                 </links>
10034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10035                         <actions>
10036                                 <retrieve/>
10037                         </actions>
10038                 </permacrud>
10039         </class>
10040
10041         <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">
10042                 <oils_persist:source_definition>
10043             SELECT *,
10044                 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,
10045                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10046             FROM
10047                 (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
10048                     FROM
10049                         action.hold_request ahr
10050                         JOIN reporter.hold_request_record rhrr USING (id)
10051                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10052                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10053                     WHERE
10054                         ahr.cancel_time IS NULL
10055                         AND ahr.fulfillment_time IS NULL
10056                     GROUP BY bib_record, pickup_lib
10057                 )x
10058                 JOIN
10059                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10060                     FROM
10061                         action.hold_request ahr
10062                         JOIN reporter.hold_request_record rhrr USING (id)
10063                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10064                     WHERE
10065                         ahr.cancel_time IS NULL
10066                         AND ahr.fulfillment_time IS NULL
10067                     GROUP BY bib_record
10068                 )y
10069                 USING (id)
10070                 </oils_persist:source_definition>
10071                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10072                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10073                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10074                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10075                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10076                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10077                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10078                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10079                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10080                 </fields>
10081                 <links>
10082                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10083                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10084                 </links>
10085                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10086                         <actions>
10087                                 <retrieve/>
10088                         </actions>
10089                 </permacrud>
10090         </class>
10091
10092         <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">
10093                 <oils_persist:source_definition>
10094             SELECT
10095                 ac.id,
10096                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10097                 MAX(actac.xact_start) AS last_circ
10098             FROM asset.copy ac
10099                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10100             GROUP BY ac.id
10101
10102             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10103             --SELECT
10104             --    ac.id,
10105             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10106             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10107             --FROM asset.copy ac
10108             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10109             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10110             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10111                 </oils_persist:source_definition>
10112                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10113                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10114                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10115                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10116                 </fields>
10117                 <links>
10118                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10119                 </links>
10120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10121                         <actions>
10122                                 <retrieve/>
10123                         </actions>
10124                 </permacrud>
10125         </class>
10126
10127         <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">
10128                 <fields oils_persist:primary="id">
10129                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10130                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10131                 </fields>
10132                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10133                         <actions>
10134                                 <retrieve/>
10135                         </actions>
10136                 </permacrud>
10137         </class>
10138
10139         <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">
10140                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10141                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10142                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10143                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10144                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10145                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10146                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10147                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10148                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10149                 </fields>
10150                 <links>
10151                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10152                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10153                 </links>
10154                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10155                         <actions>
10156                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10157                                 <retrieve/>
10158                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10159                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10160                         </actions>
10161                 </permacrud>
10162         </class>
10163
10164         <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">
10165                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10166                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10167                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10168                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10169                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10170                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10171                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10172                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10173                 </fields>
10174                 <links>
10175                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10176                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10177                 </links>
10178                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10179                         <actions>
10180                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10181                                 <retrieve/>
10182                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10183                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10184                         </actions>
10185                 </permacrud>
10186         </class>
10187
10188
10189         <!-- ********************************************************************************************************************* -->
10190         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10191         <!-- ********************************************************************************************************************* -->
10192         <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">
10193                 <fields oils_persist:primary="id">
10194                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10195                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10196                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10197                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10198                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10199                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10200                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10201                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10202                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10203                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10204                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10205                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10206                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10207                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10208                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10209                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10210                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10211                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10212                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10213                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10214                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10215                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10216                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10217                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10218                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10219                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10220                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10221                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10222                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10223                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10224                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10225                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10226                 </fields>
10227                 <links>
10228                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10229                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10230                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10231                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10232                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10233                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10234                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10235                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10236                 </links>
10237         </class>
10238
10239         <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">
10240                 <fields oils_persist:primary="id">
10241                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10242                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10243                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10244                 </fields>
10245                 <links>
10246                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10247                 </links>
10248         </class>
10249
10250         <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">
10251                 <fields oils_persist:primary="id">
10252                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10253                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10254                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10255                 </fields>
10256                 <links>
10257                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10258                 </links>
10259         </class>
10260
10261         <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">
10262                 <fields oils_persist:primary="id">
10263                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10264
10265                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10266                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10267                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10268
10269                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10270                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10271                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10272
10273                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10274                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10275
10276                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10277                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10278                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10279
10280                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10281                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10282
10283                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10284                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10285                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10286
10287                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10288                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10289                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10290
10291                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10292                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10293                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10294                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10295
10296                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10297                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10298
10299                 </fields>
10300                 <links>
10301                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10302                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10303                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10304                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10305                 </links>
10306         </class>
10307
10308         <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">
10309                 <oils_persist:source_definition>
10310
10311             SELECT
10312                 po.ordering_agency AS ordering_agency,
10313                 po.id AS purchase_order,
10314                 li.id AS lineitem,
10315                 lid.id AS lineitem_detail,
10316                 cpa.id AS claim_policy_action
10317             FROM
10318                 acq.lineitem_detail lid
10319                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10320                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10321                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10322                 JOIN acq.claim_policy_action cpa ON (
10323                     cpa.claim_policy = cp.id
10324
10325                     -- we only care about claim policy actions whose claim
10326                     -- interval we'd reached or exceeded
10327                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10328
10329                     -- filter out all claim policy actions where claim events
10330                     -- have occurred on or after the action's action_interval
10331                     AND NOT EXISTS (
10332                         SELECT 1
10333                         FROM
10334                             acq.claim_event evt
10335                             JOIN acq.claim claim ON (
10336                                 claim.id = evt.claim
10337                                 AND claim.lineitem_detail = lid.id
10338                             )
10339                         WHERE
10340                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10341                     )
10342                 )
10343             WHERE
10344                 lid.cancel_reason IS NULL
10345                 AND li.cancel_reason IS NULL -- belt/suspenders
10346                 AND po.cancel_reason IS NULL -- belt/suspenders
10347                 AND lid.recv_time IS NULL
10348                 AND po.state = 'on-order'
10349             ORDER BY 1, 2, 3, 4, 5
10350
10351                 </oils_persist:source_definition>
10352                 <fields>
10353                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10354                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10355                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10356                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10357                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10358                 </fields>
10359                 <links>
10360                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10361                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10362                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10363                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10364                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10365                 </links>
10366         </class>
10367         <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">
10368                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10369                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10370                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10371                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10372                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10373                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10374                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10375                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10376                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10377                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10378                 </fields>
10379                 <links>
10380                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10381                 </links>
10382     </class>
10383         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10384                 <oils_persist:source_definition>
10385             SELECT * FROM acq.lineitem_summary 
10386                                 WHERE item_count > (invoice_count + cancel_count)
10387         </oils_persist:source_definition>
10388                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10389                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10390                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10391                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10392                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10393                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10394                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10395                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10396                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10397                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10398                 </fields>
10399                 <links>
10400                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10401                 </links>
10402     </class>
10403         <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">
10404                 <oils_persist:source_definition>
10405
10406                         SELECT  t.*
10407                           FROM  action.transit_copy t
10408                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10409                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10410                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10411
10412                 </oils_persist:source_definition>
10413                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10414                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10415                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10416                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10417                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10418                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10419                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10420                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10421                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10422                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10423                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10424                 </fields>
10425                 <links>
10426                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10427                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10428                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10429                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10430                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10431                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10432                 </links>
10433         </class>
10434
10435     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10436                 <oils_persist:source_definition>
10437
10438         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10439                 SELECT
10440                         cp.id as copy,
10441                         COUNT(circ.id),
10442                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10443                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10444                 FROM
10445                         asset.copy cp
10446                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10447                 GROUP BY 1, 3, 4
10448                 UNION ALL
10449                 SELECT
10450                         cp.id as copy,
10451                         COUNT(circ.id),
10452                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10453                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10454                 FROM
10455                         asset.copy cp
10456                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10457                 GROUP BY 1, 3, 4
10458                 UNION ALL
10459                 SELECT
10460                         id as copy,
10461                         circ_count,
10462                         -1 AS year,
10463                         false as is_renewal
10464                 FROM
10465                         extend_reporter.legacy_circ_count
10466         )x GROUP BY 1, 3, 4
10467
10468                 </oils_persist:source_definition>
10469         <fields>
10470             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10471             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10472             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10473             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10474         </fields>
10475                 <links>
10476                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10477                 </links>
10478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10479                         <actions>
10480                                 <retrieve/>
10481                         </actions>
10482                 </permacrud>
10483     </class>
10484
10485         <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">
10486                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10487                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10488                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10489                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10490                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10491                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10492                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10493                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10494                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10495                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10496                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10497                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10498                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10499                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10500                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10501                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10502                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10503                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10504                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10505                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10506                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10507                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10508                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10509                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10510                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10511                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10512                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10513                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10514                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10515                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10516                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10517                 </fields>
10518                 <links>
10519                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10520                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10521                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10522                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10523                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10524                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10525                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10526                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10527                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10528                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10529                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10530                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10531                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10532                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10533                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10534                 </links>
10535         </class>
10536
10537     <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">
10538         <fields oils_persist:primary="id">
10539             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10540             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10541             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10542             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10543             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10544             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10545             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10546             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10547             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10548             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10549             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10550             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10551             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10552             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10553             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10554             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10555             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10556             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10557             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10558             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10559             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10560             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10561             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10562             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10563             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10564             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10565             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10566             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10567             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10568             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10569             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10570             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10571             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10572             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10573         </fields>
10574         <links>
10575             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10576             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10577             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10578             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10579             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10580         </links>
10581     </class>
10582
10583     <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">
10584         <fields oils_persist:primary="id">
10585             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10586             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10587             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10588             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10589         </fields>
10590         <links>
10591             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10592             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10593         </links>
10594     </class>
10595
10596     <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">
10597         <fields oils_persist:primary="owning_lib">
10598             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10599             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10600             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10601         </fields>
10602         <links>
10603             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10604         </links>
10605     </class>
10606
10607     <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">
10608         <fields oils_persist:primary="id">
10609             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10610             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10611             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10612             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10613             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10614         </fields>
10615         <links>
10616             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10617             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10618             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10619         </links>
10620     </class>
10621
10622     <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">
10623         <fields oils_persist:primary="circ_lib">
10624             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10625             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10626             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10627             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10628         </fields>
10629         <links>
10630             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10631             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10632         </links>
10633     </class>
10634
10635     <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">
10636         <fields oils_persist:primary="id">
10637             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10638             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10639             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10640             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10641             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10642         </fields>
10643         <links>
10644             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10645             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10646             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10647         </links>
10648     </class>
10649
10650     <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">
10651         <fields oils_persist:primary="home_ou">
10652             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10653             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10654             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10655             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10656         </fields>
10657         <links>
10658             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10659             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10660         </links>
10661     </class>
10662         <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">
10663                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10664                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10665                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10666                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10667                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10668                 </fields>
10669                 <links>
10670                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10671                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10672                 </links>
10673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10674                         <actions>
10675                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10676                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10677                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10678                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10679                         </actions>
10680                 </permacrud>
10681         </class>
10682         <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">
10683                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10684                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10685                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10686                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10687                 </fields>
10688                 <links>
10689                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10690                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10691                         </links>
10692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10693                 <actions>
10694                                 <create permission="ADMIN_ACQ_FUND_TAG">
10695                                         <context link="tag" field="owner"/>
10696                                 </create>
10697                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10698                                         <context link="tag" field="owner"/>
10699                                 </retrieve>
10700                                 <update permission="ADMIN_ACQ_FUND_TAG">
10701                                         <context link="tag" field="owner"/>
10702                                 </update>
10703                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10704                                         <context link="tag" field="owner"/>
10705                                 </delete>
10706                         </actions>
10707                 </permacrud>
10708         </class>
10709         <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">
10710                 <oils_persist:source_definition><![CDATA[
10711                 SELECT
10712                         poi.purchase_order AS purchase_order,
10713                         ii.invoice AS invoice,
10714                         NULL AS lineitem,
10715                         poi.id AS po_item,
10716                         NULL AS picklist
10717                 FROM
10718                         acq.po_item poi
10719                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10720                 UNION SELECT
10721                         jub.purchase_order AS purchase_order,
10722                         ie.invoice AS invoice,
10723                         jub.id AS lineitem,
10724                         NULL AS po_item,
10725                         jub.picklist AS picklist
10726                 FROM
10727                         acq.lineitem jub
10728                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10729                 UNION SELECT
10730                         ii.purchase_order AS purchase_order,
10731                         ii.invoice AS invoice,
10732                         NULL AS lineitem,
10733                         NULL AS po_item,
10734                         NULL AS picklist
10735                 FROM
10736                         acq.invoice_item ii
10737                 WHERE ii.po_item IS NULL
10738                 UNION SELECT
10739                         ie.purchase_order AS purchase_order,
10740                         ie.invoice AS invoice,
10741                         NULL AS lineitem,
10742                         NULL AS po_item,
10743                         NULL AS picklist
10744                 FROM
10745                         acq.invoice_entry ie
10746                 WHERE ie.lineitem IS NULL
10747                 UNION SELECT
10748                         NULL AS purchase_order,
10749                         NULL AS invoice,
10750                         jub.id AS lineitem,
10751                         NULL AS po_item,
10752                         jub.picklist AS picklist
10753                 FROM
10754                         acq.lineitem jub
10755                 WHERE jub.purchase_order IS NULL
10756                 ]]></oils_persist:source_definition>
10757                 <fields>
10758                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10759                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10760                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10761                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10762                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10763                 </fields>
10764                 <links>
10765                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10766                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10767                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10768                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10769                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10770                 </links>
10771         </class>
10772         <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">
10773                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10774                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10775                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10776                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10777                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10778                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10779                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10780                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10781                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10782                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10783                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10784                 </fields>
10785                 <links>
10786                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10787                 </links>
10788                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10789                         <actions>
10790                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10791                                 <retrieve/>
10792                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10793                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10794                         </actions>
10795                 </permacrud>
10796         </class>
10797
10798         <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">
10799                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10800                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10801                         <field name="date_applied" reporter:datatype="timestamp"/>
10802                         <field name="org" reporter:datatype="org_unit"/>
10803                         <field name="original_value" reporter:datatype="text"/>
10804                         <field name="new_value" reporter:datatype="text"/>
10805                         <field name="field_name" reporter:datatype="link"/>
10806                 </fields>
10807                 <links>
10808                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10809                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10810                 </links>
10811                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10812                         <actions>
10813                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10814                                 <retrieve/>
10815                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10816                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10817                         </actions>
10818                 </permacrud>
10819         </class>
10820         <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">
10821                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10822                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10823                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10824                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10825                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10826                 </fields>
10827                 <links>
10828                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10829                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10830                 </links>
10831         </class>
10832         <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">
10833                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10834                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10835                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10836                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10837                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10838                 </fields>
10839                 <links>
10840                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10841                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10842                 </links>
10843         </class>
10844
10845
10846         <!-- ********************************************************************************************************************* -->
10847
10848 </IDL>
10849
10850 <!--
10851     vim:noet:ts=4:sw=4:
10852 -->